Great Circle Associates Majordomo-Users
(December 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: problems compiling wrapper.c
From: Frank Rizzo <frizzo @ ford . com>
Organization: Ford Motor Company
Date: Mon, 04 Dec 1995 02:54:41 -0500
To: majordomo-users @ greatcircle . com

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

Indexed By Date Previous: 660 instead of 664 ?
From: levin@panther.middlebury.edu (Marshall A. Levin)
Next: Tmp files problem remains in v 1.93
From: Erik van der Meulen <eme@ncm.nl>
Indexed By Thread Previous: 660 instead of 664 ?
From: levin@panther.middlebury.edu (Marshall A. Levin)
Next: Re: problems compiling wrapper.c
From: Mark_LoBue%SICU@CCMAIL.CSMC.EDU

Google
 
Search Internet Search www.greatcircle.com