summaryrefslogtreecommitdiff
path: root/libc/stdlib/ptsname.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
commit6737908f74ff566748864548cf35bb1da8e64af6 (patch)
tree6eeafda4548f49d960e1b597c880a810a08a66f0 /libc/stdlib/ptsname.c
parentc734e7ca57f520e55236b21eaef16ac40099a378 (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/ptsname.c')
-rw-r--r--libc/stdlib/ptsname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c
index 7f9b04e93..2472edb3f 100644
--- a/libc/stdlib/ptsname.c
+++ b/libc/stdlib/ptsname.c
@@ -30,7 +30,7 @@
#include <unistd.h>
-#if !defined UNIX98PTY_ONLY
+#if !defined __UNIX98PTY_ONLY__
/* Check if DEV corresponds to a master pseudo terminal device. */
#define MASTER_P(Dev) \
@@ -64,7 +64,7 @@ extern const char _ptyname2[];
int ptsname_r (int fd, char *buf, size_t buflen)
{
int save_errno = errno;
-#if !defined UNIX98PTY_ONLY
+#if !defined __UNIX98PTY_ONLY__
struct stat st;
#endif
int ptyno;
@@ -75,14 +75,14 @@ int ptsname_r (int fd, char *buf, size_t buflen)
return EINVAL;
}
-#if !defined UNIX98PTY_ONLY
+#if !defined __UNIX98PTY_ONLY__
if (!isatty (fd))
{
errno = ENOTTY;
return ENOTTY;
}
#elif !defined TIOCGPTN
-# error "UNIX98PTY_ONLY enabled but TIOCGPTN ioctl not supported by your kernel."
+# error "__UNIX98PTY_ONLY__ enabled but TIOCGPTN ioctl not supported by your kernel."
#endif
#ifdef TIOCGPTN
if (ioctl (fd, TIOCGPTN, &ptyno) == 0)
@@ -113,7 +113,7 @@ int ptsname_r (int fd, char *buf, size_t buflen)
return 0;
}
#endif
-#if defined UNIX98PTY_ONLY
+#if defined __UNIX98PTY_ONLY__
else
{
/* If the ioctl fails it wasn't a Unix 98 master PTY */