diff options
Diffstat (limited to 'nuttx/include/unistd.h')
-rw-r--r-- | nuttx/include/unistd.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/nuttx/include/unistd.h b/nuttx/include/unistd.h index 4e843c5eb..03f617b6c 100644 --- a/nuttx/include/unistd.h +++ b/nuttx/include/unistd.h @@ -97,7 +97,7 @@ #define fdatasync(f) fsync(f) /************************************************************ - * Global Function Prototypes + * Global Variables ************************************************************/ #undef EXTERN @@ -108,6 +108,16 @@ extern "C" { #define EXTERN extern #endif +/* Used by getopt (obviously NOT thread safe!) */ + +EXTERN char *optarg; /* Optional argument following option */ +EXTERN int optind; /* Index into argv */ +EXTERN int optopt; /* unrecognized option character */ + +/************************************************************ + * Global Function Prototypes + ************************************************************/ + /* Task Control Interfaces */ EXTERN pid_t getpid(void); @@ -131,6 +141,10 @@ EXTERN int write(int fd, const void *buf, unsigned int nbytes); EXTERN int unlink(const char *pathname); EXTERN int rmdir(const char *pathname); +/* Other */ + +EXTERN int getopt(int argc, char *const argv[], const char *optstring); + #undef EXTERN #if defined(__cplusplus) } |