I'm trying to install Majordomo 1.93 on an HP K series server running
HP-UX 10.01 with the HP ANSI C compiler. I am getting the following
errors:
----- Shell Input starts here -----
# make
cc -DBI\"/ford/applinks/majordomo/bin\" -DPATH=\"PATH=/bin:/usr/bin:/usr/ucb\"
-DHOME=\"HOME=/ford/applinks/majordomo/bin\" -DSHELL=\"SHELL=/usr/bin/csh\"
-DMAJORDOMO_CF=\"MAJORDOMO_CF=/ford/applinks/majordomo/bin/majordomo.cf\" -DPOSIX_UID=54
-DPOSIX_GID=54 -DSETGROUP -o wrapper wrapper.c
cc: "wrapper.c", line 99: error 1514: Illegal type for string initializer.
cc: "wrapper.c", line 100: error 1716: Automatic aggregate initialization is an ANSI
feature.
*** ERROR exit code 1
Stop.
#
----- Shell Input stops here -----
Here is the offending lines from the source for wrapper.c
that I unpacked w/ the rest of majordomo 1.93:
----- Program Source code starts here -----
96 #if defined(SETGROUP)
97 /* renounce any previous group memberships if we are running as root */
98 if (geteuid()==0) { /* Should I exit if this test fails? */
99 char setgroups_used = "setgroups_was_included"; /* give strings a hint */
100 int groups[] = { POSIX_GID, 0 };
101
102 if (setgroups(1, groups) != 0) {
103 extern int errno;
104
105 fprintf(stderr, "%s: error setgroups failed errno %d", argv[0],
106 errno);
107 }
108 }
109 #endif
----- Program Source code stops here -----
If I add a switch to the compiler to force ANSI mode (cc -Aa ...) then the error
on line 100 goes away and gets replaced by an error on line 65...
----- Shell Input starts here -----
(make command output mostly deleted)
cc: "wrapper.c", line 65: warning 609: Illegal integer-pointer combination for !=.
cc: "wrapper.c", line 99: error 1514: Illegal type for string initializer.
*** ERROR exit code 1
Stop.
#
----- Shell Input stops here -----
line 65 looks like this:
if (STRCHR(argv[1], '/') != (char *) NULL) {
If anybody is familiar with HP's compiler and knows how to fix this, or just has
suggestions, please e-mail me at frizzo@ford.com.
Thank You.
--
Frank Rizzo
WWW Guru
Process Leadership, Ford Motor Company
|
|