From owner-p4-projects Sat May 11 14:57:39 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6921F37B407; Sat, 11 May 2002 14:56:33 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8C72237B406 for ; Sat, 11 May 2002 14:56:31 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4BLuUF48440 for perforce@freebsd.org; Sat, 11 May 2002 14:56:30 -0700 (PDT) (envelope-from jake@freebsd.org) Date: Sat, 11 May 2002 14:56:30 -0700 (PDT) Message-Id: <200205112156.g4BLuUF48440@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jake@freebsd.org using -f From: Jake Burkholder Subject: PERFORCE change 11183 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11183 Change 11183 by jake@jake_sparc64 on 2002/05/11 14:56:05 Integ@11178 Affected files ... ... //depot/projects/sparc64/UPDATING#8 integrate ... //depot/projects/sparc64/bin/cp/cp.c#2 integrate ... //depot/projects/sparc64/bin/dd/args.c#2 integrate ... //depot/projects/sparc64/bin/expr/expr.1#4 integrate ... //depot/projects/sparc64/bin/expr/expr.y#4 integrate ... //depot/projects/sparc64/bin/ln/ln.c#2 integrate ... //depot/projects/sparc64/bin/test/test.c#3 integrate ... //depot/projects/sparc64/contrib/gcc/config/freebsd-spec.h#2 integrate ... //depot/projects/sparc64/contrib/gcc/version.c#3 integrate ... //depot/projects/sparc64/contrib/openpam/lib/pam_get_authtok.c#8 integrate ... //depot/projects/sparc64/crypto/telnet/telnet/commands.c#2 integrate ... //depot/projects/sparc64/crypto/telnet/telnet/network.c#2 integrate ... //depot/projects/sparc64/crypto/telnet/telnet/sys_bsd.c#2 integrate ... //depot/projects/sparc64/crypto/telnet/telnet/terminal.c#2 integrate ... //depot/projects/sparc64/crypto/telnet/telnet/utilities.c#2 integrate ... //depot/projects/sparc64/games/robots/flush_in.c#2 integrate ... //depot/projects/sparc64/games/robots/move_robs.c#2 integrate ... //depot/projects/sparc64/games/robots/play_level.c#2 integrate ... //depot/projects/sparc64/gnu/usr.bin/Makefile#17 integrate ... //depot/projects/sparc64/gnu/usr.bin/awk/Makefile#2 integrate ... //depot/projects/sparc64/gnu/usr.bin/cc/Makefile#5 integrate ... //depot/projects/sparc64/gnu/usr.bin/cc/Makefile.tgt#3 integrate ... //depot/projects/sparc64/gnu/usr.bin/cc/cc_tools/Makefile#4 integrate ... //depot/projects/sparc64/gnu/usr.bin/cc/tradcpp0/Makefile#2 integrate ... //depot/projects/sparc64/kerberos5/usr.bin/k5su/Makefile#3 integrate ... //depot/projects/sparc64/lib/Makefile#4 integrate ... //depot/projects/sparc64/lib/csu/alpha/Makefile#4 integrate ... //depot/projects/sparc64/lib/csu/i386-elf/Makefile#5 integrate ... //depot/projects/sparc64/lib/csu/ia64/Makefile#4 integrate ... //depot/projects/sparc64/lib/csu/powerpc/Makefile#4 integrate ... //depot/projects/sparc64/lib/csu/sparc64/Makefile#8 integrate ... //depot/projects/sparc64/lib/libc/sparc64/fpu/fpu_qp.c#3 integrate ... //depot/projects/sparc64/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c#3 integrate ... //depot/projects/sparc64/lib/libc/sparc64/sys/__sparc_utrap_emul.c#4 integrate ... //depot/projects/sparc64/lib/libc/sparc64/sys/sigcode.S#3 integrate ... //depot/projects/sparc64/lib/libc_r/uthread/Makefile.inc#2 integrate ... //depot/projects/sparc64/lib/libc_r/uthread/uthread_autoinit.c#1 branch ... //depot/projects/sparc64/lib/libc_r/uthread/uthread_autoinit.cc#2 delete ... //depot/projects/sparc64/lib/libradius/radlib.h#2 integrate ... //depot/projects/sparc64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#12 integrate ... //depot/projects/sparc64/release/picobsd/dial/floppy.tree/etc/mfs.rc#2 integrate ... //depot/projects/sparc64/release/picobsd/mfs_tree/etc/rc.network#2 integrate ... //depot/projects/sparc64/release/picobsd/net/floppy.tree/etc/rc.network#2 integrate ... //depot/projects/sparc64/release/picobsd/router/floppy.tree/etc/mfs.rc#2 integrate ... //depot/projects/sparc64/sbin/dumpon/dumpon.c#6 integrate ... //depot/projects/sparc64/sbin/ifconfig/ifconfig.8#3 integrate ... //depot/projects/sparc64/sbin/mount/mount.8#3 integrate ... //depot/projects/sparc64/share/examples/IPv6/USAGE#2 integrate ... //depot/projects/sparc64/share/examples/isdn/FAQ#2 integrate ... //depot/projects/sparc64/share/man/man4/uplcom.4#2 integrate ... //depot/projects/sparc64/share/mk/bsd.cpu.mk#4 integrate ... //depot/projects/sparc64/sys/alpha/include/atomic.h#3 integrate ... //depot/projects/sparc64/sys/alpha/pci/irongate_pci.c#3 integrate ... //depot/projects/sparc64/sys/boot/alpha/libalpha/Makefile#4 integrate ... //depot/projects/sparc64/sys/boot/arc/lib/Makefile#4 integrate ... //depot/projects/sparc64/sys/boot/efi/libefi/Makefile#7 integrate ... //depot/projects/sparc64/sys/boot/ficl/Makefile#4 integrate ... //depot/projects/sparc64/sys/boot/i386/btx/lib/Makefile#2 integrate ... //depot/projects/sparc64/sys/boot/i386/libi386/Makefile#5 integrate ... //depot/projects/sparc64/sys/boot/ia64/libski/Makefile#6 integrate ... //depot/projects/sparc64/sys/boot/ofw/libofw/Makefile#5 integrate ... //depot/projects/sparc64/sys/boot/ofw/libofw/devicename.c#7 integrate ... //depot/projects/sparc64/sys/boot/ofw/libofw/libofw.h#6 integrate ... //depot/projects/sparc64/sys/boot/ofw/libofw/ofw_disk.c#8 integrate ... //depot/projects/sparc64/sys/boot/pc98/btx/lib/Makefile#2 integrate ... //depot/projects/sparc64/sys/boot/pc98/libpc98/Makefile#5 integrate ... //depot/projects/sparc64/sys/compat/linux/linux_mib.c#5 integrate ... //depot/projects/sparc64/sys/conf/kern.post.mk#14 integrate ... //depot/projects/sparc64/sys/dev/aic7xxx/aic7xxx_freebsd.h#3 delete ... //depot/projects/sparc64/sys/dev/bktr/bktr_card.h#2 integrate ... //depot/projects/sparc64/sys/fs/devfs/devfs_vnops.c#13 integrate ... //depot/projects/sparc64/sys/isa/fd.c#10 integrate ... //depot/projects/sparc64/sys/isa/fdreg.h#3 integrate ... //depot/projects/sparc64/sys/net/iso88025.h#3 integrate ... //depot/projects/sparc64/sys/sparc64/include/instr.h#9 integrate ... //depot/projects/sparc64/sys/sys/cdefs.h#11 integrate ... //depot/projects/sparc64/sys/sys/sun_disklabel.h#2 integrate ... //depot/projects/sparc64/usr.bin/awk/Makefile#5 integrate ... //depot/projects/sparc64/usr.bin/passwd/passwd.c#5 integrate ... //depot/projects/sparc64/usr.bin/uudecode/uudecode.c#5 integrate ... //depot/projects/sparc64/usr.bin/uuencode/uuencode.c#3 integrate ... //depot/projects/sparc64/usr.bin/xinstall/xinstall.c#5 integrate ... //depot/projects/sparc64/usr.sbin/faithd/README#3 integrate ... //depot/projects/sparc64/usr.sbin/mrouted/mrouted.8#2 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/add/extract.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/add/pkg_add.1#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/create/perform.c#6 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/create/pl.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/delete/perform.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/info/show.c#5 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/lib/deps.c#4 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/lib/file.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/lib/match.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/lib/pen.c#3 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/lib/plist.c#4 integrate ... //depot/projects/sparc64/usr.sbin/pkg_install/sign/pgp_sign.c#3 integrate ... //depot/projects/sparc64/usr.sbin/ppp/chap_ms.c#2 integrate ... //depot/projects/sparc64/usr.sbin/ppp/mppe.c#5 integrate ... //depot/projects/sparc64/usr.sbin/rpc.yppasswdd/yppasswdd_main.c#3 integrate ... //depot/projects/sparc64/usr.sbin/rpc.yppasswdd/yppasswdd_server.c#3 integrate Differences ... ==== //depot/projects/sparc64/UPDATING#8 (text+ko) ==== @@ -22,6 +22,11 @@ integrity. Re-enabling write caching can substantially improve performance. +20020510: + Due to the way CVS works, it may not properly update src/contrib/gcc + to the 3.1 sources. The easiest fix is to `rm -rf' src/contrib/gcc + and then do a cvs update. + 20020421: When exec'ing set[ug]id executables, the kernel now ensures that the stdio file descriptors (0..2) are open. See FreeBSD-SA-02:23.stdio. @@ -1025,4 +1030,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.204 2002/05/06 09:40:52 dd Exp $ +$FreeBSD: src/UPDATING,v 1.205 2002/05/10 22:56:59 obrien Exp $ ==== //depot/projects/sparc64/bin/cp/cp.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)cp.c 8.2 (Berkeley) 4/1/94"; #endif static const char rcsid[] = - "$FreeBSD: src/bin/cp/cp.c,v 1.32 2002/02/22 21:24:14 markm Exp $"; + "$FreeBSD: src/bin/cp/cp.c,v 1.33 2002/05/11 00:21:00 alfred Exp $"; #endif /* not lint */ /* @@ -272,6 +272,7 @@ badcp = rval = 1; continue; default: + ; } /* ==== //depot/projects/sparc64/bin/dd/args.c#2 (text+ko) ==== @@ -40,7 +40,7 @@ static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94"; #endif static const char rcsid[] = - "$FreeBSD: src/bin/dd/args.c,v 1.31 2002/02/22 20:51:00 markm Exp $"; + "$FreeBSD: src/bin/dd/args.c,v 1.32 2002/05/11 03:12:02 jedgar Exp $"; #endif /* not lint */ #include @@ -372,6 +372,7 @@ mult = sizeof(int); break; default: + ; } if (mult != 0) { ==== //depot/projects/sparc64/bin/expr/expr.1#4 (text+ko) ==== @@ -28,9 +28,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/bin/expr/expr.1,v 1.17 2002/04/22 21:23:09 wollman Exp $ +.\" $FreeBSD: src/bin/expr/expr.1,v 1.19 2002/05/11 03:08:12 wollman Exp $ .\" -.Dd March 22, 2002 +.Dd May 10, 2002 .Dt EXPR 1 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd evaluate expression .Sh SYNOPSIS .Nm -.Op Fl \&- +.Op Fl e .Ar expression .Sh DESCRIPTION The @@ -50,15 +50,25 @@ All operators and operands must be passed as separate arguments. Several of the operators have special meaning to command interpreters and must therefore be quoted appropriately. +All integer operands are interpreted in base 10. .Pp -Arithmetic operations are performed using signed integer math, -in the largest integral type available in the C language. The +Arithmetic operations are performed using signed integer math. +If the +.Fl e +flag is specified, arithmetic uses the C +.Ql intmax_t +data type (the largest integral type available), and .Nm -utility will detect arithmetic overflow and division by zero, and -returns with an exit status of 2 in those cases. If a numeric operand -is specified which is so large as to overflow conversion to an integer, -it is parsed as a string instead. All numeric operands are interpreted -in base 10. +will detect arithmetic overflow and return an error indication. +If a numeric operand is specified which is so large as to overflow +conversion to an integer, it is parsed as a string instead. +If +.Fl e +is not specified, arithmetic operations and parsing of integer +arguments will overflow silently according to the rules of the C +standard, using the +.Ql long +data type. .Pp Operators are listed below in order of increasing precedence; all are left-associative. @@ -129,6 +139,20 @@ will not permit this syntax. See the examples below for portable ways to guarantee the correct interpretation. +The +.Ev EXPR_COMPAT +variable is intended for use as a transition and debugging aid, when +.Nm +is used in complex scripts which cannot easily be recast to avoid the +non-portable usage. +Defining +.Ev EXPR_COMPAT +also implicitly enables the +.Fl e +option, since this matches the historic behavior of +.Nm +in +.Fx . .Pp The .Nm @@ -151,6 +175,8 @@ will emulate historic .Nm implementations which did not obey the Utility Syntax Guidelines. +Implies +.Fl e . .El .Sh EXAMPLES .Bl -bullet @@ -174,7 +200,7 @@ More generally, parenthesize possibly-negative values: .Dl a=$(expr \e( $a \e) + 1) .It -The following example prints the filename portion of a pathname stored +This example prints the filename portion of a pathname stored in variable .Va a . Since @@ -231,9 +257,6 @@ provided that the .Ev EXPR_COMPAT environment variable is not defined. -.Tn POSIX -does not specify whether arithmetic overflow is detected, nor does it specify -the possible range of integer arguments to -.Nm , -so a portable application must assume that the range is small and that -overflow may not be detected. +The +.Fl e +flag is an extension. ==== //depot/projects/sparc64/bin/expr/expr.y#4 (text+ko) ==== @@ -4,7 +4,7 @@ * * Largely rewritten by J.T. Conklin (jtc@wimsey.com) * - * $FreeBSD: src/bin/expr/expr.y,v 1.20 2002/04/22 21:23:09 wollman Exp $ + * $FreeBSD: src/bin/expr/expr.y,v 1.22 2002/05/11 03:08:12 wollman Exp $ */ #include @@ -70,6 +70,7 @@ int yylex(void); int yyparse(void); +static int eflag; char **av; %} @@ -154,7 +155,10 @@ * non-digits MUST NOT be considered integers. strtoimax() will * figure this out for us. */ - (void)strtoimax(s, &ep, 10); + if (eflag) + (void)strtoimax(s, &ep, 10); + else + (void)strtol(s, &ep, 10); if (*ep != '\0') vp->type = string; @@ -186,9 +190,13 @@ /* vp->type == numeric_string, make it numeric */ errno = 0; - i = strtoimax(vp->u.s, (char **)NULL, 10); - if (errno == ERANGE) - err(ERR_EXIT, NULL); + if (eflag) { + i = strtoimax(vp->u.s, (char **)NULL, 10); + if (errno == ERANGE) + err(ERR_EXIT, NULL); + } else { + i = strtol(vp->u.s, (char **)NULL, 10); + } free (vp->u.s); vp->u.i = i; @@ -272,11 +280,17 @@ setlocale (LC_ALL, ""); if (getenv("EXPR_COMPAT") != NULL) { av = argv + 1; + eflag = 1; } else { - while ((c = getopt(argc, argv, "")) != -1) + while ((c = getopt(argc, argv, "e")) != -1) switch (c) { + case 'e': + eflag = 1; + break; + default: - fprintf(stderr,"usage: expr [--] expression\n"); + fprintf(stderr, + "usage: expr [-e] expression\n"); exit(ERR_EXIT); } av = argv + optind; @@ -327,7 +341,7 @@ struct val * op_eq(struct val *a, struct val *b) { - struct val *r; + struct val *r; if (isstring (a) || isstring (b)) { to_string (a); @@ -447,6 +461,7 @@ int chk_plus(intmax_t a, intmax_t b, intmax_t r) { + /* sum of two positive numbers must be positive */ if (a > 0 && b > 0 && r <= 0) return 1; @@ -462,14 +477,18 @@ { struct val *r; - if (!to_integer (a) || !to_integer (b)) { + if (!to_integer(a) || !to_integer(b)) { errx(ERR_EXIT, "non-numeric argument"); } - r = make_integer (/*(intmax_t)*/(a->u.i + b->u.i)); - if (chk_plus (a->u.i, b->u.i, r->u.i)) { - errx(ERR_EXIT, "overflow"); - } + if (eflag) { + r = make_integer(a->u.i + b->u.i); + if (chk_plus(a->u.i, b->u.i, r->u.i)) { + errx(ERR_EXIT, "overflow"); + } + } else + r = make_integer((long)a->u.i + (long)b->u.i); + free_value (a); free_value (b); return r; @@ -478,6 +497,7 @@ int chk_minus(intmax_t a, intmax_t b, intmax_t r) { + /* special case subtraction of INTMAX_MIN */ if (b == INTMAX_MIN) { if (a >= 0) @@ -494,14 +514,18 @@ { struct val *r; - if (!to_integer (a) || !to_integer (b)) { + if (!to_integer(a) || !to_integer(b)) { errx(ERR_EXIT, "non-numeric argument"); } - r = make_integer (/*(intmax_t)*/(a->u.i - b->u.i)); - if (chk_minus (a->u.i, b->u.i, r->u.i)) { - errx(ERR_EXIT, "overflow"); - } + if (eflag) { + r = make_integer(a->u.i - b->u.i); + if (chk_minus(a->u.i, b->u.i, r->u.i)) { + errx(ERR_EXIT, "overflow"); + } + } else + r = make_integer((long)a->u.i - (long)b->u.i); + free_value (a); free_value (b); return r; @@ -524,14 +548,18 @@ { struct val *r; - if (!to_integer (a) || !to_integer (b)) { + if (!to_integer(a) || !to_integer(b)) { errx(ERR_EXIT, "non-numeric argument"); } - r = make_integer (/*(intmax_t)*/(a->u.i * b->u.i)); - if (chk_times (a->u.i, b->u.i, r->u.i)) { - errx(ERR_EXIT, "overflow"); - } + if (eflag) { + r = make_integer(a->u.i * b->u.i); + if (chk_times(a->u.i, b->u.i, r->u.i)) { + errx(ERR_EXIT, "overflow"); + } + } else + r = make_integer((long)a->u.i * (long)b->u.i); + free_value (a); free_value (b); return (r); @@ -553,7 +581,7 @@ { struct val *r; - if (!to_integer (a) || !to_integer (b)) { + if (!to_integer(a) || !to_integer(b)) { errx(ERR_EXIT, "non-numeric argument"); } @@ -561,10 +589,14 @@ errx(ERR_EXIT, "division by zero"); } - r = make_integer (/*(intmax_t)*/(a->u.i / b->u.i)); - if (chk_div (a->u.i, b->u.i)) { - errx(ERR_EXIT, "overflow"); - } + if (eflag) { + r = make_integer(a->u.i / b->u.i); + if (chk_div(a->u.i, b->u.i)) { + errx(ERR_EXIT, "overflow"); + } + } else + r = make_integer((long)a->u.i / (long)b->u.i); + free_value (a); free_value (b); return r; @@ -575,7 +607,7 @@ { struct val *r; - if (!to_integer (a) || !to_integer (b)) { + if (!to_integer(a) || !to_integer(b)) { errx(ERR_EXIT, "non-numeric argument"); } @@ -583,8 +615,12 @@ errx(ERR_EXIT, "division by zero"); } - r = make_integer (/*(intmax_t)*/(a->u.i % b->u.i)); - /* chk_rem necessary ??? */ + if (eflag) + r = make_integer(a->u.i % b->u.i); + /* chk_rem necessary ??? */ + else + r = make_integer((long)a->u.i % (long)b->u.i); + free_value (a); free_value (b); return r; ==== //depot/projects/sparc64/bin/ln/ln.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)ln.c 8.2 (Berkeley) 3/31/94"; #endif static const char rcsid[] = - "$FreeBSD: src/bin/ln/ln.c,v 1.24 2002/02/22 21:06:53 markm Exp $"; + "$FreeBSD: src/bin/ln/ln.c,v 1.25 2002/05/11 00:45:01 jedgar Exp $"; #endif /* not lint */ #include @@ -132,6 +132,7 @@ case 2: /* ln target source */ exit(linkit(argv[0], argv[1], 0)); default: + ; } /* ln target1 target2 directory */ sourcedir = argv[argc - 1]; ==== //depot/projects/sparc64/bin/test/test.c#3 (text+ko) ==== @@ -12,7 +12,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/bin/test/test.c,v 1.44 2002/03/28 16:30:42 ache Exp $"; + "$FreeBSD: src/bin/test/test.c,v 1.47 2002/05/11 01:25:54 alfred Exp $"; #endif /* not lint */ #include @@ -35,8 +35,7 @@ #else #include -static void error(const char *, ...) __attribute__((__noreturn__)) - __printf0like(1, 2); +static void error(const char *, ...) __dead2 __printf0like(1, 2); static void error(const char *msg, ...) ==== //depot/projects/sparc64/contrib/gcc/config/freebsd-spec.h#2 (text+ko) ==== @@ -18,6 +18,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.2 2002/05/10 19:05:07 obrien Exp $ */ + /* Common FreeBSD configuration. All FreeBSD architectures should include this file, which will specify their commonalities. @@ -48,6 +50,10 @@ || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) + +#ifndef FREEBSD_NATIVE /* these bits are here to reduce merge diffs, but I don't want to acutally use the bits right now */ + + #if FBSD_MAJOR == 6 #define FBSD_CPP_PREDEFINES \ "-D__FreeBSD__=6 -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" @@ -73,11 +79,24 @@ "-D__FreeBSD__ -Dunix -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" #endif + +#else /* FREEBSD_NATIVE */ +/* Place spaces around this string. We depend on string splicing to produce + the final CPP_PREDEFINES value. */ + +#define FBSD_CPP_PREDEFINES \ + "-D__FreeBSD__=5 -D__FreeBSD_cc_version=500003 -Dunix -D__KPRINTF_ATTRIBUTE__ -Asystem=unix -Asystem=bsd -Asystem=FreeBSD" +#endif /* ! FREEBSD_NATIVE */ + + /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. */ #define FBSD_CPP_SPEC " \ %(cpp_cpu) \ + %{!maout: -D__ELF__} \ + %{munderscores: -D__UNDERSCORES__} \ + %{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE}" @@ -129,7 +148,8 @@ %{pg: -lc_p} \ }" #else -#if FBSD_MAJOR >= 5 +#include +#if __FreeBSD_version >= 500016 #define FBSD_LIB_SPEC " \ %{!shared: \ %{!pg: %{pthread:-lc_r} -lc} \ ==== //depot/projects/sparc64/contrib/gcc/version.c#3 (text+ko) ==== @@ -1,4 +1,6 @@ +/* $FreeBSD: src/contrib/gcc/version.c,v 1.2 2002/05/11 00:25:50 obrien Exp $ */ + #include "ansidecl.h" #include "version.h" -const char *const version_string = "3.1 20020509 (prerelease)"; +const char *const version_string = "3.1 [FreeBSD] 20020509 (prerelease)"; ==== //depot/projects/sparc64/contrib/openpam/lib/pam_get_authtok.c#8 (text+ko) ==== @@ -31,12 +31,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/sparc64/contrib/openpam/lib/pam_get_authtok.c#7 $ + * $P4: //depot/projects/sparc64/contrib/openpam/lib/pam_get_authtok.c#8 $ */ #include #include +#include #include #include ==== //depot/projects/sparc64/crypto/telnet/telnet/commands.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.25 2001/12/03 17:42:02 jhay Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.26 2002/05/11 03:19:44 alfred Exp $"); #ifndef lint static const char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; @@ -81,7 +81,7 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 -#endif MAXHOSTNAMELEN +#endif typedef int (*intrtn_t)(int, char **); ==== //depot/projects/sparc64/crypto/telnet/telnet/network.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/network.c,v 1.5 2001/11/30 21:06:36 markm Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/network.c,v 1.6 2002/05/11 03:19:44 alfred Exp $"); #ifndef lint static const char sccsid[] = "@(#)network.c 8.2 (Berkeley) 12/15/93"; @@ -44,6 +44,7 @@ #include #include +#include #include #include ==== //depot/projects/sparc64/crypto/telnet/telnet/sys_bsd.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ #include #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/sys_bsd.c,v 1.9 2001/12/09 09:53:27 jkh Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/sys_bsd.c,v 1.10 2002/05/11 03:19:44 alfred Exp $"); #ifndef lint static const char sccsid[] = "@(#)sys_bsd.c 8.4 (Berkeley) 5/30/95"; @@ -654,9 +654,9 @@ (void) signal(SIGTSTP, SIG_DFL); # ifndef SOLARIS (void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1))); -# else SOLARIS +# else /* SOLARIS */ (void) sigrelse(SIGTSTP); -# endif SOLARIS +# endif /* SOLARIS */ #endif /* SIGTSTP */ #ifndef USE_TERMIO ltc = oltc; ==== //depot/projects/sparc64/crypto/telnet/telnet/terminal.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/terminal.c,v 1.5 2001/11/30 21:06:36 markm Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/terminal.c,v 1.6 2002/05/11 03:19:44 alfred Exp $"); #ifndef lint static const char sccsid[] = "@(#)terminal.c 8.2 (Berkeley) 2/16/95"; @@ -42,6 +42,8 @@ #include #include +#include + #include "ring.h" #include "externs.h" ==== //depot/projects/sparc64/crypto/telnet/telnet/utilities.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/crypto/telnet/telnet/utilities.c,v 1.6 2001/11/30 21:06:36 markm Exp $"); +__FBSDID("$FreeBSD: src/crypto/telnet/telnet/utilities.c,v 1.7 2002/05/11 03:19:44 alfred Exp $"); #ifndef lint static const char sccsid[] = "@(#)utilities.c 8.3 (Berkeley) 5/30/95"; @@ -47,6 +47,7 @@ #include #include #include +#include #include #include "general.h" ==== //depot/projects/sparc64/games/robots/flush_in.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)flush_in.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/robots/flush_in.c,v 1.2 1999/11/30 03:49:17 billf Exp $"; + "$FreeBSD: src/games/robots/flush_in.c,v 1.3 2002/05/11 04:40:13 alfred Exp $"; #endif /* not lint */ # include @@ -49,7 +49,7 @@ { # ifdef TIOCFLUSH ioctl(fileno(stdin), TIOCFLUSH, NULL); -# else TIOCFLUSH +# else /* TIOCFLUSH */ crmode(); -# endif TIOCFLUSH +# endif /* TIOCFLUSH */ } ==== //depot/projects/sparc64/games/robots/move_robs.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)move_robs.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/robots/move_robs.c,v 1.4 1999/11/30 03:49:19 billf Exp $"; + "$FreeBSD: src/games/robots/move_robs.c,v 1.5 2002/05/11 04:40:13 alfred Exp $"; #endif /* not lint */ # include "robots.h" @@ -62,7 +62,7 @@ addch(inch()); move(Max.y, Max.x); addch(inch()); -# endif DEBUG +# endif /* DEBUG */ for (rp = Robots; rp < &Robots[MAXROBOTS]; rp++) { if (rp->y < 0) continue; @@ -123,7 +123,7 @@ move(Max.y, Max.x); addch(inch()); standend(); -# endif DEBUG +# endif /* DEBUG */ if (Real_time) alarm(3); } ==== //depot/projects/sparc64/games/robots/play_level.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)play_level.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = - "$FreeBSD: src/games/robots/play_level.c,v 1.4 1999/11/30 03:49:20 billf Exp $"; + "$FreeBSD: src/games/robots/play_level.c,v 1.5 2002/05/11 04:40:13 alfred Exp $"; #endif /* not lint */ # include "robots.h" @@ -67,7 +67,7 @@ move(Max.y, Max.x); addch(inch()); standend(); -# endif DEBUG +# endif /* DEBUG */ setjmp(End_move); flush_in(); while (!Dead && Num_robots > 0) { ==== //depot/projects/sparc64/gnu/usr.bin/Makefile#17 (text+ko) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/gnu/usr.bin/Makefile,v 1.64 2002/05/10 00:50:43 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/Makefile,v 1.65 2002/05/10 17:30:42 obrien Exp $ -SUBDIR= awk bc binutils cpio dc dialog diff diff3 \ +SUBDIR= awk bc binutils cc cpio dc dialog diff diff3 \ grep gzip man patch ptx rcs sdiff send-pr sort tar texinfo .if ${CXX:T} != "c++" @@ -17,10 +17,6 @@ .endif .endif -.if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "sparc64" -SUBDIR+=cc -.endif - .if !defined(NOPERL) && !defined(NO_PERL) && exists(${.CURDIR}/perl) SUBDIR+=perl .endif ==== //depot/projects/sparc64/gnu/usr.bin/awk/Makefile#2 (text+ko) ==== @@ -1,22 +1,15 @@ # Makefile copyright James Raynard (jraynard@freebsd.org) 1997 # -# $FreeBSD: src/gnu/usr.bin/awk/Makefile,v 1.20 2002/03/05 19:40:25 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/awk/Makefile,v 1.21 2002/05/10 20:36:21 obrien Exp $ .include "${.CURDIR}/../Makefile.inc" .PATH: ${.CURDIR}/../../../contrib/awk -.if ${MACHINE_ARCH} == "sparc64" PROG= gawk -.else -PROG= awk -.endif SRCS= array.c awkgram.y builtin.c eval.c field.c gawkmisc.c io.c main.c \ msg.c node.c re.c version.c dfa.c getopt.c getopt1.c ext.c profile.c MAN= doc/gawk.1 -.if ${MACHINE_ARCH} != "sparc64" -MLINKS= gawk.1 awk.1 -.endif YFLAGS= ==== //depot/projects/sparc64/gnu/usr.bin/cc/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/cc/Makefile,v 1.28 2002/05/10 08:54:43 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/cc/Makefile,v 1.29 2002/05/11 04:51:45 obrien Exp $ # The order of some of these are rather important. Some depend on previous # subdirs. @@ -12,7 +12,7 @@ .if !defined(NO_CXX) SUBDIR+= cc1plus c++ c++filt doc .if !defined(NO_COLLECT2) -SUBDIR+= collect2 +#SUBDIR+= collect2 .endif .endif ==== //depot/projects/sparc64/gnu/usr.bin/cc/Makefile.tgt#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/cc/Makefile.tgt,v 1.3 2002/05/10 08:54:43 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/cc/Makefile.tgt,v 1.4 2002/05/10 17:23:04 obrien Exp $ TARGET_ARCH?= ${MACHINE_ARCH} @@ -8,6 +8,8 @@ GCC_CPU= arm .elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "x86-64" GCC_CPU= i386 +.elif ${TARGET_ARCH} == "ia64" +GCC_CPU= ia64 .elif ${TARGET_ARCH} == "powerpc" GCC_CPU= rs6000 .elif ${TARGET_ARCH} == "sparc64" ==== //depot/projects/sparc64/gnu/usr.bin/cc/cc_tools/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.59 2002/05/10 10:21:19 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/cc/cc_tools/Makefile,v 1.60 2002/05/10 17:42:19 obrien Exp $ # # This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk @@ -167,7 +167,9 @@ echo '#ifndef POSIX' >> ${.TARGET} echo '# define POSIX' >> ${.TARGET} echo '#endif' >> ${.TARGET} +.if ${TARGET_ARCH} != "ia64" echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET} +.endif tm_p.h: echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET} ==== //depot/projects/sparc64/gnu/usr.bin/cc/tradcpp0/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/cc/tradcpp0/Makefile,v 1.2 2002/05/10 08:54:50 obrien Exp $ +# $FreeBSD: src/gnu/usr.bin/cc/tradcpp0/Makefile,v 1.4 2002/05/11 00:15:45 obrien Exp $ .include "../Makefile.inc" ==== //depot/projects/sparc64/kerberos5/usr.bin/k5su/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/kerberos5/usr.bin/k5su/Makefile,v 1.4 2002/04/26 17:55:26 ru Exp $ +# $FreeBSD: src/kerberos5/usr.bin/k5su/Makefile,v 1.5 2002/05/11 14:05:07 nectar Exp $ PROG= k5su SRCS= su.c asn1_err.h krb5_err.h heim_err.h k524_err.h @@ -22,7 +22,7 @@ -L${ASN1OBJDIR} -lasn1 -lcrypto -lmd -lcrypt -lcom_err DPADD= ${LIBKRB5} ${LIBKAFS5} ${LIBROKEN} ${_krb4deps} \ ${LIBASN1} ${LIBCRYPTO} ${LIBMD} ${LIBCRYPT} ${LIBCOM_ERR} -BINMODE=4555 +#BINMODE=4555 INSTALLFLAGS=-fschg .include ==== //depot/projects/sparc64/lib/Makefile#4 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.135 2002/04/14 22:27:12 des Exp $ +# $FreeBSD: src/lib/Makefile,v 1.136 2002/05/11 17:51:04 obrien Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -39,7 +39,7 @@ _csu=csu .endif -.if ${MACHINE_ARCH} == "i386" +.if ${OBJFORMAT} == "aout" && ${MACHINE_ARCH} == "i386" _libgnumalloc= libgnumalloc _libresolv= libresolv .endif ==== //depot/projects/sparc64/lib/csu/alpha/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/csu/alpha/Makefile,v 1.17 2002/03/29 22:43:40 markm Exp $ +# $FreeBSD: src/lib/csu/alpha/Makefile,v 1.18 2002/05/11 17:45:02 obrien Exp $ .PATH: ${.CURDIR}/../common @@ -8,10 +8,7 @@ CFLAGS+= -Wall -Wno-unused \ -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include -NOMAN= true -NOPIC= true -NOPROFILE= true -INTERNALLIB= true +NOLIB= true all: ${OBJS} ${SOBJS} ==== //depot/projects/sparc64/lib/csu/i386-elf/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.11 2002/04/29 13:07:20 bde Exp $ +# $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.12 2002/05/11 17:45:02 obrien Exp $ .PATH: ${.CURDIR}/../common @@ -9,10 +9,7 @@ -I${.CURDIR}/../common \ -I${.CURDIR}/../../libc/include LDFLAGS+= -elf -NOMAN= true -NOPIC= true -NOPROFILE= true -INTERNALLIB= true +NOLIB= true all: ${OBJS} ${SOBJS} ==== //depot/projects/sparc64/lib/csu/ia64/Makefile#4 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message