🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6295

fixincludes fix for strdup too specific

#6295
From: George Mitchell
Date: Mon, 11 Dec 1995 00:00
21 lines
1401 bytes
Version: GCC-2.6.3, 2.7.0, 2.7.1, 2.7.2
Architecture: AIX-3.2.5
Problem: fixincludes attempts to fix strdup prototype but fails

The shell script "fixincludes" in gcc-2.6.3 through gcc-2.7.2 contains
the lines:

  sed -e 's/extern[     ]*int[  ]*strlen();/extern unsigned int strlen();/' \
      -e 's/extern[     ]*int[  ]*ffs[  ]*(long);/extern int ffs(int);/' \
      -e 's/strdup(char \*s1);/strdup(const char *s1);/' \

along with the comment "Add missing const for strdup on OSF/1 V3.0."
AIX-3.2.5 also needs this prototype fixed.  Unfortunately, the specified
"sed" pattern is slightly too specific to fix the AIX-3.2.5 prototype.  I
replaced the third line thus:

  sed -e 's/extern[     ]*int[  ]*strlen();/extern unsigned int strlen();/' \
      -e 's/extern[     ]*int[  ]*ffs[  ]*(long);/extern int ffs(int);/' \
      -e 's/strdup(char \*/strdup(const char */' \

and then AIX was happy, too.     -- George Mitchell (george@protools.com)
Technical Details
Message-ID: <9512112142.AA00487@shuttle.protools.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,5213ea984d68a64d,start
X-Google-Attributes: gid113d02,public
From: george@protools.com (George Mitchell)
Subject: fixincludes fix for strdup too specific
Date: 1995/12/11
Message-ID: <9512112142.AA00487@shuttle.protools.com>
X-Deja-AN: 121609977
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug