diff options
author | Paul Mackerras <paulus@samba.org> | 1998-03-24 23:57:48 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 1998-03-24 23:57:48 +0000 |
commit | 0f51228cd3a92449070c5d6e7c14f87effd5f9be (patch) | |
tree | 67b3252d6e84f2504cfbf09bc81f88af256d56c2 | |
parent | 4182e4cd4ec9c8ed6a0890dce4e24f31605899bc (diff) | |
download | ppp-0f51228cd3a92449070c5d6e7c14f87effd5f9be.tar.gz |
Kludge to handle solaris 2.6 having usleep; NeXT mods from Steve Perkins
-rw-r--r-- | chat/Makefile.NeXT | 7 | ||||
-rw-r--r-- | chat/Makefile.sol2 | 2 | ||||
-rw-r--r-- | chat/chat.c | 12 |
3 files changed, 16 insertions, 5 deletions
diff --git a/chat/Makefile.NeXT b/chat/Makefile.NeXT index e2d4c43..92a1916 100644 --- a/chat/Makefile.NeXT +++ b/chat/Makefile.NeXT @@ -1,17 +1,18 @@ # # Makefile for chat on NeXTs # -# $Id: Makefile.NeXT,v 1.2 1997/03/04 03:45:38 paulus Exp $ +# $Id: Makefile.NeXT,v 1.3 1998/03/24 23:57:45 paulus Exp $ # ARCHFLAGS = BINDIR = /usr/local/ppp/bin MANDIR = /usr/local/ppp/man -CFLAGS= -O -posix $(ARCHFLAGS) +CFLAGS= -O -D_POSIX_SOURCE $(ARCHFLAGS) SRCS = chat.c OBJS = chat.o +LIBS = ../libposix/libposix.o MANPAGES = chat.8 @@ -22,7 +23,7 @@ MANPAGES = chat.8 all: chat chat: $(OBJS) - $(CC) -o chat $(CFLAGS) $(OBJS) + $(CC) -o chat $(CFLAGS) $(OBJS) $(LIBS) install: /bin/mkdirs $(MANDIR)/man8 $(BINDIR) diff --git a/chat/Makefile.sol2 b/chat/Makefile.sol2 index 0b1d539..ee65fe6 100644 --- a/chat/Makefile.sol2 +++ b/chat/Makefile.sol2 @@ -4,7 +4,7 @@ include ../svr4/Makedefs -CFLAGS = $(COPTS) -DNO_USLEEP +CFLAGS = $(COPTS) -DNO_USLEEP -DSOL2 all: chat diff --git a/chat/chat.c b/chat/chat.c index 90dcc5b..4092856 100644 --- a/chat/chat.c +++ b/chat/chat.c @@ -78,7 +78,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: chat.c,v 1.18 1998/02/04 01:35:49 paulus Exp $"; +static char rcsid[] = "$Id: chat.c,v 1.19 1998/03/24 23:57:48 paulus Exp $"; #endif #include <stdio.h> @@ -1414,6 +1414,16 @@ register char *string; return (0); } +/* + * Gross kludge to handle Solaris versions >= 2.6 having usleep. + */ +#ifdef SOL2 +#include <sys/param.h> +#if MAXUID > 65536 /* then this is Solaris 2.6 or later */ +#undef NO_USLEEP +#endif +#endif /* SOL2 */ + #ifdef NO_USLEEP #include <sys/types.h> #include <sys/time.h> |