Article View: gnu.utils.bug
Article #27AIX prototype problem in shellutils-1.8 (with fix)
From: Cliff Krumvieda
Date: Thu, 29 Oct 1992 05:56
Date: Thu, 29 Oct 1992 05:56
43 lines
1854 bytes
1854 bytes
Howdy:
I had a small problem compiling shellutils-1.8 under AIX 3.2 on an
RS/6000. It seems that /usr/include/stdlib.h defines the prototype of
putenv to be:
======================================================================
extern int putenv( char *);
======================================================================
However, lib/putenv.c declares putenv with:
======================================================================
int
putenv (string)
const char *string;
======================================================================
I fixed the problem with the following patch:
======================================================================
% diff -c lib/putenv.c~ lib/putenv.c
*** lib/putenv.c~ Sun Aug 23 02:48:16 1992
--- lib/putenv.c Thu Aug 27 08:48:55 1992
***************
*** 49,55 ****
--- 49,59 ----
/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
int
putenv (string)
+ #ifdef _AIX
+ char *string;
+ #else
const char *string;
+ #endif
{
char *name_end = index (string, '=');
register size_t size;
======================================================================
Hope this helps.
--Cliff
Technical Details
Message-ID:
<9210291556.AA09900@ask.cs.cornell.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!mrccrc!doc.ic.ac.uk!aixssc.uk.ibm.com!yktnews!admin!newsgate.watson.ibm.com!news.ans.net!malgudi.oar.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cs.cornell.edu!cliffShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!mrccrc!doc.ic.ac.uk!aixssc.uk.ibm.com!yktnews!admin!newsgate.watson.ibm.com!news.ans.net!malgudi.oar.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cs.cornell.edu!cliff From: cliff@cs.cornell.edu (Cliff Krumvieda) Subject: AIX prototype problem in shellutils-1.8 (with fix) Message-ID: <9210291556.AA09900@ask.cs.cornell.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 29 Oct 1992 05:56:16 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 44