]> git.ozlabs.org Git - ppp.git/commitdiff
Kludge to handle solaris 2.6 having usleep; NeXT mods from Steve Perkins
authorPaul Mackerras <paulus@samba.org>
Tue, 24 Mar 1998 23:57:48 +0000 (23:57 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 24 Mar 1998 23:57:48 +0000 (23:57 +0000)
chat/Makefile.NeXT
chat/Makefile.sol2
chat/chat.c

index e2d4c43a9d874ae48abb568416704e8364fbf39d..92a1916dafaaa6f245fc8d8a2dfeb28552082677 100644 (file)
@@ -1,17 +1,18 @@
 #
 # Makefile for chat on NeXTs
 # 
 #
 # 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
 
 #
 
 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
 
 SRCS =  chat.c
 OBJS =  chat.o
+LIBS =   ../libposix/libposix.o
 
 MANPAGES = chat.8
 
 
 MANPAGES = chat.8
 
@@ -22,7 +23,7 @@ MANPAGES = chat.8
 all:   chat
 
 chat:  $(OBJS)
 all:   chat
 
 chat:  $(OBJS)
-       $(CC) -o chat $(CFLAGS) $(OBJS)
+       $(CC) -o chat $(CFLAGS) $(OBJS) $(LIBS)
 
 install:
        /bin/mkdirs $(MANDIR)/man8 $(BINDIR) 
 
 install:
        /bin/mkdirs $(MANDIR)/man8 $(BINDIR) 
index 0b1d5394edc7374a0671017b1efd17305abc2c5b..ee65fe61cbc071259bd69ae3d85a24cba6ca618d 100644 (file)
@@ -4,7 +4,7 @@
 
 include ../svr4/Makedefs
 
 
 include ../svr4/Makedefs
 
-CFLAGS = $(COPTS) -DNO_USLEEP
+CFLAGS = $(COPTS) -DNO_USLEEP -DSOL2
 
 all:   chat
 
 
 all:   chat
 
index 90dcc5be837cac3787c77d9fc5fe66c1bd858699..409285666644e8cecef28e677a66d46e47de61b7 100644 (file)
@@ -78,7 +78,7 @@
  */
 
 #ifndef lint
  */
 
 #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>
 #endif
 
 #include <stdio.h>
@@ -1414,6 +1414,16 @@ register char *string;
     return (0);
 }
 
     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>
 #ifdef NO_USLEEP
 #include <sys/types.h>
 #include <sys/time.h>