Subject: pkg/16618: pkgsrc/wm/wm2 fails to compile on -current
To: None <gnats-bugs@gnats.netbsd.org>
From: Jan Schaumann <jschauma@dab.cs.stevens-tech.edu>
List: netbsd-bugs
Date: 05/02/2002 16:21:35
>Number: 16618
>Category: pkg
>Synopsis: pkgsrc/wm/wm2 fails to compile on -current
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 02 13:22:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Jan Schaumann (jschauma@netbsd.org)
>Release: NetBSD 1.5ZC (20010410)
>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 trying to compile wm2 from pkgsrc on a -current machine, the build
fails with the error message:
Manager.C: implicit declaration of function `int putenv(...)'
I've tracked down part of the problem, which is in General.h, where
the following takes place:
#ifdef _POSIX_SOURCE
#undef _POSIX_SOURCE
#endif
#define _POSIX_SOURCE 1
As _POSIX_SOURCE is defined here, in stdlib.h the following
condition is not satisfied:
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 4
[...]
int putenv __P((const char *));
#endif
and "putenv" subsequently not defined.
>How-To-Repeat:
cd /usr/pkgsrc/wm/wm2
make
>Fix:
Include the attached patch in the distribution. However, please
note that the IDENTICAL code *does* compile without a problem
on NetBSD 1.5.2, indicating that my fantastic logic up there is
all wrong. But I couldn't quite figure out what the problem is,
so you're stuck figuring that out for yourself ;-)
--- General.h.orig Thu May 2 16:13:15 2002
+++ General.h Thu May 2 16:13:37 2002
@@ -10,7 +10,9 @@
#undef _POSIX_SOURCE
#endif
+#if 0
#define _POSIX_SOURCE 1
+#endif
#include <stdio.h>
#include <signal.h>
>Release-Note:
>Audit-Trail:
>Unformatted: