Subject: pkg/16447: pkgsrc/devel/cdecl doesn't compile on -current
To: None <gnats-bugs@gnats.netbsd.org>
From: Jan Schaumann <jschauma@dab.cs.stevens-tech.edu>
List: netbsd-bugs
Date: 04/22/2002 14:10:46
>Number:         16447
>Category:       pkg
>Synopsis:       pkgsrc/devel/cdecl doesn't compile on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 22 11:11:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jan Schaumann (jschauma@netbsd.org)
>Release:        NetBSD 1.5ZC
>Organization:
	
>Environment:
	
	
System: NetBSD dab.cs.stevens-tech.edu 1.5ZC NetBSD 1.5ZC (BOCK) #0: Thu Apr 18 10:55:09 EDT 2002 jschauma@dab:/usr/src/sys/arch/i386/compile/BOCK i386
Architecture: i386
Machine: i386
>Description:
	When attempting to compile pkgsrc/devel/cdecl/ under -current, it fails
	since cdecl.c contains a re-declaration/-implementation of setprogname,
	which is included in stdlib.h in -current.
>How-To-Repeat:
	cd /usr/pkgsrc/devel/cdecl
	make
>Fix:

	Apply, test and adjust the below patch.  I just chose an arbitrary
	date for __NetBSD_Version__ (ie the one my -current has), which probably
	can be adjusted back to the exact date that setprogname was introduced.
	
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cdecl/distinfo,v
retrieving revision 1.2
diff -b -u -r1.2 distinfo
--- distinfo	2001/04/21 00:44:12	1.2
+++ distinfo	2002/04/22 18:06:41
@@ -2,5 +2,5 @@
 
 SHA1 (cdecl-2.5.tar.gz) = b955a0b95b635090360b19de888cb29d5c005296
 Size (cdecl-2.5.tar.gz) = 21435 bytes
-SHA1 (patch-aa) = d9208717f3529894ecb4b8339d39b0f222f03a0e
+SHA1 (patch-aa) = da39fc683981bd80ffbc82a31b04ff7b2f3b8202
 SHA1 (patch-ab) = 98757157a7be5f6fc83ec0bf7401f70da38311b5
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cdecl/patches/patch-aa,v
retrieving revision 1.2
diff -b -u -r1.2 patch-aa
--- patch-aa	1999/11/26 13:58:33	1.2
+++ patch-aa	2002/04/22 18:06:44
@@ -1,13 +1,9 @@
-$NetBSD: patch-aa,v 1.2 1999/11/26 13:58:33 hubertf Exp $
+--- cdecl.c.orig	Mon Jan 15 22:54:46 1996
++++ cdecl.c	Mon Apr 22 14:01:54 2002
+@@ -60,6 +60,8 @@
 
---- cdecl.c.orig	Tue Jan 16 04:54:46 1996
-+++ cdecl.c	Fri Nov 26 15:02:00 1999
-@@ -59,7 +59,9 @@
-  */
- 
  char cdeclsccsid[] = "@(#)cdecl.c	2.5 1/15/96";
--
-+
+ 
 +#include <sys/param.h>
 +
  #include <stdio.h>
@@ -48,3 +44,29 @@
    int main(int, char **);
    int yywrap(void);
    int dostdin(void);
+@@ -138,7 +147,9 @@
+   void docast(char*, char*, char*, char*);
+   void dodexplain(char*, char*, char*, char*);
+   void docexplain(char*, char*, char*, char*);
++#if !(defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105290000)
+   void setprogname(char *);
++#endif
+   int dotmpfile(int, char**), dofileargs(int, char**);
+ #else
+   char *ds(), *cat(), *visible();
+@@ -802,6 +813,7 @@
+ #endif
+ }
+ 
++#if !(defined(__NetBSD_Version__) && __NetBSD_Version__ >= 105290000)
+ /* Save away the name of the program from argv[0] */
+ void setprogname(argv0)
+ char *argv0;
+@@ -841,6 +853,7 @@
+ 	real_prompt[len+2] = '\0';
+     }
+ }
++#endif
+ 
+ /* Run down the list of keywords to see if the */
+ /* program is being called named as one of them */
>Release-Note:
>Audit-Trail:
>Unformatted: