Browse code

- auth_radius: alloca()/alloca.h fixes - 64 bit warnings fixed - daemonize _XOPEN_SOURCE_EXTENDED hack modified again

Andrei Pelinescu-Onciul authored on 15/12/2004 17:49:12
Showing 2 changed files
... ...
@@ -35,6 +35,7 @@
35 35
 #  2004-09-12  mips2 & cobalt support introduced (andrei)
36 36
 #  2004-09-28  x86_64 support introduced (andrei)
37 37
 #  2004-12-14  gcc-3.4 special case added (andrei)
38
+#  2004-12-15  HAVE_ALLOCA_H added (andrei)
38 39
 
39 40
 
40 41
 # check if already included/exported
... ...
@@ -787,7 +788,7 @@ LIBS= -lfl -ldl -lresolv
787 787
 #os specific stuff
788 788
 ifeq ($(OS), linux)
789 789
 	DEFS+=-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
790
-			-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
790
+			-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H
791 791
 	ifneq ($(found_lock_method), yes)
792 792
 		DEFS+= -DUSE_SYSV_SEM  # try posix sems
793 793
 		found_lock_method=yes
... ...
@@ -795,7 +796,8 @@ ifeq ($(OS), linux)
795 795
 endif
796 796
 
797 797
 ifeq  ($(OS), solaris)
798
-	DEFS+= -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD
798
+	DEFS+= -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD \
799
+			-DHAVE_ALLOCA_H
799 800
 	ifneq ($(found_lock_method), yes)
800 801
 		DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
801 802
 		found_lock_method=yes
... ...
@@ -36,6 +36,16 @@
36 36
 
37 37
 
38 38
 #include <sys/types.h>
39
+
40
+#define _XOPEN_SOURCE   /* needed on linux for the  getpgid prototype,  but
41
+                           openbsd 3.2 won't include common types (uint a.s.o)
42
+                           if defined before including sys/types.h */
43
+#define _XOPEN_SOURCE_EXTENDED /* same as above */
44
+#define __USE_XOPEN_EXTENDED /* same as above, overrides features.h */
45
+#define __EXTENSIONS__ /* needed on solaris: if XOPEN_SOURCE is defined
46
+                          struct timeval defintion from <sys/time.h> won't
47
+                          be included => workarround define _EXTENSIONS_
48
+                           -andrei */
39 49
 #include <signal.h>
40 50
 #include <syslog.h>
41 51
 #include <errno.h>
... ...
@@ -43,13 +53,6 @@
43 43
 #include <stdio.h>
44 44
 #include <stdlib.h>
45 45
 #include <sys/resource.h> /* setrlimit */
46
-
47
-#define _XOPEN_SOURCE   /* needed on linux for the  getpgid prototype */
48
-#define _XOPEN_SOURCE_EXTENDED /* same as above */
49
-#define __EXTENSIONS__ /* needed on solaris: if XOPEN_SOURCE is defined
50
-                          struct timeval defintion from <sys/time.h> won't
51
-                          be included => workarround define _EXTENSIONS_
52
-                           -andrei */
53 46
 #include <unistd.h>
54 47
 #include <sys/time.h>    
55 48