pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Fix PR 40151 - bootstrap of pkgsrc fails on Ubuntu 8.10



details:   https://anonhg.NetBSD.org/pkgsrc/rev/56d57ee69ff5
branches:  trunk
changeset: 554725:56d57ee69ff5
user:      abs <abs%pkgsrc.org@localhost>
date:      Thu Feb 19 00:51:12 2009 +0000

description:
Fix PR 40151 - bootstrap of pkgsrc fails on Ubuntu 8.10
- At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
  which means (void)fwrite(...) will *always* generate a warning, so
  set -Wno-error to bypass this in Linux.sys.mk
- Ubuntu 8.1 also jumps through hoops to ensure ARG_MAX is *undefined*, so
  work around this in tnftp and libnbcompat

diffstat:

 net/tnftp/files/libnetbsd/glob.c                    |  7 ++++++-
 pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk |  8 +++++++-
 pkgtools/libnbcompat/files/nbcompat/param.h         |  7 ++++++-
 3 files changed, 19 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r 5833a4642330 -r 56d57ee69ff5 net/tnftp/files/libnetbsd/glob.c
--- a/net/tnftp/files/libnetbsd/glob.c  Wed Feb 18 21:23:21 2009 +0000
+++ b/net/tnftp/files/libnetbsd/glob.c  Thu Feb 19 00:51:12 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: glob.c,v 1.4 2007/08/07 02:06:59 lukem Exp $ */
+/* $NetBSD: glob.c,v 1.5 2009/02/19 00:51:12 abs Exp $ */
 /* from        NetBSD: glob.c,v 1.16 2006/03/26 18:11:22 christos Exp */
 
 /*
@@ -57,6 +57,11 @@
 
 #include "tnftp.h"
 
+/* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */
+#if !defined(ARG_MAX)
+# define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif
+
 #undef TILDE                   /* XXX: AIX 4.1.5 has this in <sys/ioctl.h> */
 
 #define        DOLLAR          '$'
diff -r 5833a4642330 -r 56d57ee69ff5 pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
--- a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk       Wed Feb 18 21:23:21 2009 +0000
+++ b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk       Thu Feb 19 00:51:12 2009 +0000
@@ -1,10 +1,16 @@
-#      $NetBSD: Linux.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
+#      $NetBSD: Linux.sys.mk,v 1.2 2009/02/19 00:51:12 abs Exp $
 #      NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp 
 #      @(#)sys.mk      8.2 (Berkeley) 3/21/94
 
 unix?=         We run Unix.
 OS?=           Linux
 
+# At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
+.if !defined(NOGCCERROR)
+CFLAGS+= -Wno-error
+.endif
+
 .SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
 .SUFFIXES: .sh .m4
   
diff -r 5833a4642330 -r 56d57ee69ff5 pkgtools/libnbcompat/files/nbcompat/param.h
--- a/pkgtools/libnbcompat/files/nbcompat/param.h       Wed Feb 18 21:23:21 2009 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/param.h       Thu Feb 19 00:51:12 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */
+/*     $NetBSD: param.h,v 1.3 2009/02/19 00:51:12 abs Exp $    */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -47,4 +47,9 @@
 # define MAX(a, b)     ((a) < (b) ? (b) : (a))
 #endif
 
+/* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */
+#if !defined(ARG_MAX)
+# define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif
+
 #endif /* !_NBCOMPAT_SYS_PARAM_H_ */



Home | Main Index | Thread Index | Old Index