From: Paul Mackerras Date: Tue, 24 Mar 1998 23:57:48 +0000 (+0000) Subject: Kludge to handle solaris 2.6 having usleep; NeXT mods from Steve Perkins X-Git-Tag: RELEASE_2_3_6~114 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=0f51228cd3a92449070c5d6e7c14f87effd5f9be Kludge to handle solaris 2.6 having usleep; NeXT mods from Steve Perkins --- 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 @@ -1414,6 +1414,16 @@ register char *string; return (0); } +/* + * Gross kludge to handle Solaris versions >= 2.6 having usleep. + */ +#ifdef SOL2 +#include +#if MAXUID > 65536 /* then this is Solaris 2.6 or later */ +#undef NO_USLEEP +#endif +#endif /* SOL2 */ + #ifdef NO_USLEEP #include #include