Thu Feb 19 00:51:12 2009 UTC ()
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


(abs)
diff -r1.4 -r1.5 pkgsrc/net/tnftp/files/libnetbsd/glob.c
diff -r1.1.1.1 -r1.2 pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
diff -r1.2 -r1.3 pkgsrc/pkgtools/libnbcompat/files/nbcompat/param.h

cvs diff -r1.4 -r1.5 pkgsrc/net/tnftp/files/libnetbsd/Attic/glob.c (expand / switch to unified diff)

--- pkgsrc/net/tnftp/files/libnetbsd/Attic/glob.c 2007/08/07 02:06:59 1.4
+++ pkgsrc/net/tnftp/files/libnetbsd/Attic/glob.c 2009/02/19 00:51:12 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: glob.c,v 1.4 2007/08/07 02:06:59 lukem Exp $ */ 1/* $NetBSD: glob.c,v 1.5 2009/02/19 00:51:12 abs Exp $ */
2/* from NetBSD: glob.c,v 1.16 2006/03/26 18:11:22 christos Exp */ 2/* from NetBSD: glob.c,v 1.16 2006/03/26 18:11:22 christos Exp */
3 3
4/* 4/*
5 * Copyright (c) 1989, 1993 5 * Copyright (c) 1989, 1993
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to Berkeley by 8 * This code is derived from software contributed to Berkeley by
9 * Guido van Rossum. 9 * Guido van Rossum.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -47,26 +47,31 @@ @@ -47,26 +47,31 @@
47 * not contain any magic characters. [Used in csh style globbing] 47 * not contain any magic characters. [Used in csh style globbing]
48 * GLOB_ALTDIRFUNC: 48 * GLOB_ALTDIRFUNC:
49 * Use alternately specified directory access functions. 49 * Use alternately specified directory access functions.
50 * GLOB_TILDE: 50 * GLOB_TILDE:
51 * expand ~user/foo to the /home/dir/of/user/foo 51 * expand ~user/foo to the /home/dir/of/user/foo
52 * GLOB_BRACE: 52 * GLOB_BRACE:
53 * expand {1,2}{a,b} to 1a 1b 2a 2b  53 * expand {1,2}{a,b} to 1a 1b 2a 2b
54 * gl_matchc: 54 * gl_matchc:
55 * Number of matches in the current invocation of glob. 55 * Number of matches in the current invocation of glob.
56 */ 56 */
57 57
58#include "tnftp.h" 58#include "tnftp.h"
59 59
 60/* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */
 61#if !defined(ARG_MAX)
 62# define ARG_MAX sysconf(_SC_ARG_MAX)
 63#endif
 64
60#undef TILDE /* XXX: AIX 4.1.5 has this in <sys/ioctl.h> */ 65#undef TILDE /* XXX: AIX 4.1.5 has this in <sys/ioctl.h> */
61 66
62#define DOLLAR '$' 67#define DOLLAR '$'
63#define DOT '.' 68#define DOT '.'
64#define EOS '\0' 69#define EOS '\0'
65#define LBRACKET '[' 70#define LBRACKET '['
66#define NOT '!' 71#define NOT '!'
67#define QUESTION '?' 72#define QUESTION '?'
68#define QUOTE '\\' 73#define QUOTE '\\'
69#define RANGE '-' 74#define RANGE '-'
70#define RBRACKET ']' 75#define RBRACKET ']'
71#define SEP '/' 76#define SEP '/'
72#define STAR '*' 77#define STAR '*'

cvs diff -r1.1.1.1 -r1.2 pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk (expand / switch to unified diff)

--- pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk 2006/07/14 23:13:01 1.1.1.1
+++ pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk 2009/02/19 00:51:12 1.2
@@ -1,20 +1,26 @@ @@ -1,20 +1,26 @@
1# $NetBSD: Linux.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $ 1# $NetBSD: Linux.sys.mk,v 1.2 2009/02/19 00:51:12 abs Exp $
2# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp  2# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp
3# @(#)sys.mk 8.2 (Berkeley) 3/21/94 3# @(#)sys.mk 8.2 (Berkeley) 3/21/94
4 4
5unix?= We run Unix. 5unix?= We run Unix.
6OS?= Linux 6OS?= Linux
7 7
 8# At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
 9# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
 10.if !defined(NOGCCERROR)
 11CFLAGS+= -Wno-error
 12.endif
 13
8.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h 14.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
9.SUFFIXES: .sh .m4 15.SUFFIXES: .sh .m4
10  16
11.LIBS: .a 17.LIBS: .a
12 18
13AR?= ar 19AR?= ar
14ARFLAGS?= rl 20ARFLAGS?= rl
15RANLIB?= ranlib 21RANLIB?= ranlib
16 22
17AS?= as 23AS?= as
18AFLAGS?= 24AFLAGS?=
19COMPILE.s?= ${CC} ${AFLAGS} -c 25COMPILE.s?= ${CC} ${AFLAGS} -c
20LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} 26LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}

cvs diff -r1.2 -r1.3 pkgsrc/pkgtools/libnbcompat/files/nbcompat/param.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/nbcompat/param.h 2008/04/29 05:46:08 1.2
+++ pkgsrc/pkgtools/libnbcompat/files/nbcompat/param.h 2009/02/19 00:51:12 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: param.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */ 1/* $NetBSD: param.h,v 1.3 2009/02/19 00:51:12 abs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 2004 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Johnny C. Lam. 8 * by Johnny C. Lam.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -37,14 +37,19 @@ @@ -37,14 +37,19 @@
37#endif 37#endif
38 38
39/* 39/*
40 * Declare macros and functions that may be missing in <sys/param.h>. 40 * Declare macros and functions that may be missing in <sys/param.h>.
41 */ 41 */
42 42
43#if !defined(MIN) 43#if !defined(MIN)
44# define MIN(a, b) ((a) < (b) ? (a) : (b)) 44# define MIN(a, b) ((a) < (b) ? (a) : (b))
45#endif 45#endif
46#if !defined(MAX) 46#if !defined(MAX)
47# define MAX(a, b) ((a) < (b) ? (b) : (a)) 47# define MAX(a, b) ((a) < (b) ? (b) : (a))
48#endif 48#endif
49 49
 50/* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */
 51#if !defined(ARG_MAX)
 52# define ARG_MAX sysconf(_SC_ARG_MAX)
 53#endif
 54
50#endif /* !_NBCOMPAT_SYS_PARAM_H_ */ 55#endif /* !_NBCOMPAT_SYS_PARAM_H_ */