Last active
August 19, 2018 16:39
-
-
Save scriptnull/a801aee3d7a651e8009c7171df9c5145 to your computer and use it in GitHub Desktop.
Demonstrates error in finding the system configuration of terminal as mentioned in http://man7.org/tlpi/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<unistd.h> | |
| #include<stdio.h> | |
| int main() { | |
| long max_input, max_canon; | |
| max_input = sysconf(_SC_MAX_INPUT); | |
| max_canon = sysconf(_SC_MAX_CANON); | |
| printf("max_input: %ld \n", max_input); | |
| printf("max_canon: %ld \n", max_canon); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ gcc term_limits.c -o term_limit.out | |
| term_limits.c:7:23: error: use of undeclared identifier '_SC_MAX_INPUT' | |
| max_input = sysconf(_SC_MAX_INPUT); | |
| ^ | |
| term_limits.c:8:23: error: use of undeclared identifier '_SC_MAX_CANON' | |
| max_canon = sysconf(_SC_MAX_CANON); | |
| ^ | |
| 2 errors generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment