diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-31 18:20:21 +0000 |
commit | 6737908f74ff566748864548cf35bb1da8e64af6 (patch) | |
tree | 6eeafda4548f49d960e1b597c880a810a08a66f0 /libc/stdlib/getpt.c | |
parent | c734e7ca57f520e55236b21eaef16ac40099a378 (diff) |
Ok, this commit is _huge_ and its gonna change the world. I've
been working on a new config system on and off for about 6 months
now, but I've never been fully satisfied. Well, I'm finally am
happy with the new config system, so here it is. This completely
removes the old uClibc configuration system, and replaces it with
an entirely new system based on LinuxKernelConf, from
http://www.xs4all.nl/~zippel/lc/
As it turns out, Linus has just merged LinuxKernelConf into Linux
2.5.45, so it looks like I made the right choice.
I have thus far updated only x86. I'll be updating the other
architectures shortly.
-Erik
Diffstat (limited to 'libc/stdlib/getpt.c')
-rw-r--r-- | libc/stdlib/getpt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c index f4e52f672..71d7d6c5f 100644 --- a/libc/stdlib/getpt.c +++ b/libc/stdlib/getpt.c @@ -23,7 +23,7 @@ #include <unistd.h> #include <paths.h> -#if !defined ASSUME_DEVPTS +#if !defined __ASSUME_DEVPTS__ # include <sys/statfs.h> /* Constant that identifies the `devpts' filesystem. */ @@ -37,7 +37,7 @@ /* Directory containing the UNIX98 pseudo terminals. */ #define _PATH_DEVPTS _PATH_DEV "pts" -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ /* Prototype for function that opens BSD-style master pseudo-terminals. */ int __bsd_getpt (void); #endif @@ -46,19 +46,19 @@ int __bsd_getpt (void); int getpt (void) { -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ static int have_no_dev_ptmx; #endif int fd; -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ if (!have_no_dev_ptmx) #endif { fd = open (_PATH_DEVPTMX, O_RDWR); if (fd != -1) { -#if defined ASSUME_DEVPTS +#if defined __ASSUME_DEVPTS__ return fd; #else struct statfs fsbuf; @@ -80,14 +80,14 @@ getpt (void) /* If /dev/pts is not mounted then the UNIX98 pseudo terminals are not usable. */ close (fd); -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ have_no_dev_ptmx = 1; #endif #endif } else { -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ if (errno == ENOENT || errno == ENODEV) have_no_dev_ptmx = 1; else @@ -96,12 +96,12 @@ getpt (void) } } -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ return __bsd_getpt (); #endif } -#if !defined UNIX98PTY_ONLY +#if !defined __UNIX98PTY_ONLY__ # define PTYNAME1 "pqrstuvwxyzabcde"; # define PTYNAME2 "0123456789abcdef"; |