Ticket #1536: patch-preview.txt

File patch-preview.txt, 4.1 KB (added by wish, 5 years ago)

Added by email2trac

Line 
1
2[#1536: Add appropriate macros, headers and storage classes to make SoGE compile on MacOS X 10.9.5
3William Hay (AKA w.hay@ucl.ac.uk) <wish@dumain.com>**20150516140148
4 Ignore-this: 19f747232bc9b483d8aa8be90e033605
5 Also change the sed of DEPEND_FLAGS so that sge_depend doesn't complain about being unable to find
6 the file x86_64.  The storage classes assigned to the variables in drmaa2_list_dict.h may not be
7 correct but really not sure what the original coder though he was doing here as every file that
8 includes that header was creating independent global variables with the same name AFAICT.
9] hunk ./source/aimk 1092
10    # These used to define DARWIN7 and DARWIN8, but they're unused.
11    case "7.*":
12    case "8.*":
13- -      set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
14+      set CFLAGS = "$OFLAG -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -D_DARWIN_C_SOURCE -DDARWIN -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
15       breaksw
16    case "9.*":
17hunk ./source/aimk 1095
18- -      set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN9 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
19+      set CFLAGS = "$OFLAG -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -D_DARWIN_C_SOURCE -DDARWIN -DDARWIN9 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
20+      breaksw
21+   case "10.[1-5].*":
22+      set CFLAGS = "$OFLAG -flat_namespace -arch x86_64 -Wall -Wno-format -Wstrict-prototypes -DFD_SETSIZE=8192 -DHAVE_GETGROUPLIST -D_DARWIN_C_SOURCE -DDARWIN -DDARWIN10 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
23+      set SHARED_CFLAGS = "$SHARED_CFLAGS -arch x86_64"
24+      set SHARED_LFLAGS = "$SHARED_LFLAGS -arch x86_64"
25+      set LFLAGS = "$LFLAGS -arch x86_64"
26       breaksw
27    case "10.*":
28hunk ./source/aimk 1104
29- -      set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -arch x86_64 -Wall -Wno-format -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN10 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
30+      set CFLAGS = "$OFLAG -flat_namespace -arch x86_64 -Wall -Wno-format -Wstrict-prototypes -DFD_SETSIZE=8192 -DHAVE_GETGROUPLIST -D_DARWIN_C_SOURCE -DDARWIN -DDARWIN10 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M -DSECURITYPAMAPPL $DEBUG_FLAG $CFLAGS"
31       set SHARED_CFLAGS = "$SHARED_CFLAGS -arch x86_64"
32       set SHARED_LFLAGS = "$SHARED_LFLAGS -arch x86_64"
33       set LFLAGS = "$LFLAGS -arch x86_64"
34hunk ./source/aimk 1892
35    set CFLAGS = "$CFLAGS -DHAVE_HWLOC=0"
36 endif
37 
38- -set DEPEND_FLAGS = "`echo $DEPEND_FLAGS | sed -e 's/-rpath  *[^ ]*//g' -e 's/-[^DI][^ ]*//g'`"
39+set DEPEND_FLAGS = "`echo $DEPEND_FLAGS | sed -e 's/ -arch / PRESERVEOPTARCH /' -e 's/-rpath  *[^ ]*//g' -e 's/-[^DI][^ ]*//g' -e 's/ PRESERVEOPTARCH / -arch /'`"
40 
41 # we set SGE_ARCH_STRING down here because the sed command above
42 # would mess up the quotes around buildarch
43hunk ./source/libs/japi/drmaa2_list_dict.h 13
44    struct _drmaa2_node *next;
45 } _drmaa2_Node;
46 
47- -struct drmaa2_list_s
48+static struct drmaa2_list_s
49 {
50    _drmaa2_Node   *head;
51    _drmaa2_Node   *tail;
52hunk ./source/libs/japi/drmaa2_list_dict.h 36
53   struct _drmaa2_dictentry_t* next;
54 } _drmaa2_dictentry_t;
55 
56- -struct drmaa2_dict_s
57+static struct drmaa2_dict_s
58 {
59   _drmaa2_dictentry_t    *head;
60   _drmaa2_dictentry_t    *tail;
61hunk ./source/libs/uti/sge_stdlib.h 37
62 
63 #include <stdlib.h>
64 #include <sge.h>                /* for __attribute__ */
65- -
66+#include <sys/types.h>
67+#include <unistd.h>
68 void *sge_malloc(size_t size) __attribute__ ((__malloc__));
69 
70 void *sge_realloc(void *ptr, int size, int do_abort);
71hunk ./source/utilbin/authuser.c 77
72 
73 #if defined(IRIX65) || defined(AIX43) || defined(HP1164) || defined(INTERIX) || defined(ALPHA5) || defined(WINDOWS) || defined(__OpenBSD__) || defined(__CYGWIN__)
74 #define JUTI_NO_PAM
75- -#elif defined(DARWIN)
76+#elif defined(DARWIN) && ! defined(SECURITYPAMAPPL)
77 #include <pam/pam_appl.h>
78 #else
79 #include <security/pam_appl.h>
80