From: Kees van Reeuwijk Date: Thu, 24 Jun 2010 14:17:25 +0000 (+0000) Subject: Some standard Unix functions were feature-dependent on _MINIX. X-Git-Tag: v3.1.8~361 X-Git-Url: http://zhaoyanbai.com/repos/doc/mandoc_char.7.html?a=commitdiff_plain;h=25dc0fc3761c063a6b7e4e7e749ba4004c31fe10;p=minix.git Some standard Unix functions were feature-dependent on _MINIX. --- diff --git a/include/termios.h b/include/termios.h index 5bd1da0c5..ca83dca75 100644 --- a/include/termios.h +++ b/include/termios.h @@ -194,6 +194,7 @@ _PROTOTYPE( int tcsetattr, \ * The ioctls TIOCGWINSZ and TIOCSWINSZ can be used to get and set this * information. */ +#endif /* _MINIX */ struct winsize { @@ -202,6 +203,5 @@ struct winsize unsigned short ws_xpixel; /* horizontal size, pixels */ unsigned short ws_ypixel; /* vertical size, pixels */ }; -#endif /* _MINIX */ #endif /* _TERMIOS_H */ diff --git a/include/unistd.h b/include/unistd.h index a6405f2ee..c8fbf9913 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -157,16 +157,10 @@ _PROTOTYPE( int symlink, (const char *path1, const char *path2) ); _PROTOTYPE( int readlink, (const char *, char *, size_t) ); _PROTOTYPE( int getopt, (int _argc, char * const _argv[], char const *_opts) ); extern char *optarg; +extern int optreset; /* Reset getopt state */ extern int optind, opterr, optopt; _PROTOTYPE( int usleep, (useconds_t _useconds) ); -#ifdef _MINIX -#ifndef _TYPE_H -#include -#endif - -extern int optreset; /* Reset getopt state */ - _PROTOTYPE( int brk, (char *_addr) ); _PROTOTYPE( int chroot, (const char *_name) ); _PROTOTYPE( int lseek64, (int _fd, u64_t _offset, int _whence, @@ -182,9 +176,25 @@ _PROTOTYPE( int fsync, (int fd) ); _PROTOTYPE( int reboot, (int _how, ...) ); _PROTOTYPE( int gethostname, (char *_hostname, size_t _len) ); _PROTOTYPE( int getdomainname, (char *_domain, size_t _len) ); + + +/* For compatibility with other Unix systems */ +_PROTOTYPE( int getpagesize, (void) ); +_PROTOTYPE( int setgroups, (int ngroups, const gid_t *gidset) ); +_PROTOTYPE( int initgroups, (const char *name, gid_t basegid) ); +_PROTOTYPE( void *setmode, (const char *) ); +_PROTOTYPE( mode_t getmode, (const void *, mode_t) ); +_PROTOTYPE( void strmode, (mode_t, char *) ); _PROTOTYPE( int ttyslot, (void) ); _PROTOTYPE( int fttyslot, (int _fd) ); _PROTOTYPE( char *crypt, (const char *_key, const char *_salt) ); + +#ifdef _MINIX +#ifndef _TYPE_H +#include +#endif + + _PROTOTYPE( int getsysinfo, (endpoint_t who, int what, void *where) ); _PROTOTYPE( int getsigset, (sigset_t *sigset) ); _PROTOTYPE( int getprocnr, (void) ); @@ -204,14 +214,6 @@ _PROTOTYPE( pid_t getnpid, (endpoint_t proc_ep) ); _PROTOTYPE( uid_t getnuid, (endpoint_t proc_ep) ); _PROTOTYPE( gid_t getngid, (endpoint_t proc_ep) ); -/* For compatibility with other Unix systems */ -_PROTOTYPE( int getpagesize, (void) ); -_PROTOTYPE( int setgroups, (int ngroups, const gid_t *gidset) ); -_PROTOTYPE( int initgroups, (const char *name, gid_t basegid) ); -_PROTOTYPE( void *setmode, (const char *) ); -_PROTOTYPE( mode_t getmode, (const void *, mode_t) ); -_PROTOTYPE( void strmode, (mode_t, char *) ); - #endif #ifdef _POSIX_SOURCE