Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/stand/fixcoff Add nb_progname so this will c...



details:   https://anonhg.NetBSD.org/src/rev/4b028ad92dd6
branches:  trunk
changeset: 516282:4b028ad92dd6
user:      jmc <jmc%NetBSD.org@localhost>
date:      Sat Oct 20 06:14:30 2001 +0000

description:
Add nb_progname so this will compile on older NetBSD systems that will be
upgrading to -current via the new toolchain build process eventually.

diffstat:

 sys/arch/macppc/stand/fixcoff/Makefile      |   2 +-
 sys/arch/macppc/stand/fixcoff/nb_progname.c |  58 +++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 1 deletions(-)

diffs (72 lines):

diff -r f6e60cc7047e -r 4b028ad92dd6 sys/arch/macppc/stand/fixcoff/Makefile
--- a/sys/arch/macppc/stand/fixcoff/Makefile    Sat Oct 20 06:13:27 2001 +0000
+++ b/sys/arch/macppc/stand/fixcoff/Makefile    Sat Oct 20 06:14:30 2001 +0000
@@ -1,5 +1,5 @@
 NOMAN=  1
 HOSTPROG=   fixcoff
-SRC=    fixcoff.c
+SRCS=    fixcoff.c nb_progname.c
 
 .include <bsd.hostprog.mk>
diff -r f6e60cc7047e -r 4b028ad92dd6 sys/arch/macppc/stand/fixcoff/nb_progname.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/macppc/stand/fixcoff/nb_progname.c       Sat Oct 20 06:14:30 2001 +0000
@@ -0,0 +1,58 @@
+/*     $NetBSD: nb_progname.c,v 1.1 2001/10/20 06:14:30 jmc Exp $      */
+
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Todd Vierling.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by the NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Stub to emulate [gs]etprogname() where needed. */
+
+#ifdef __NetBSD__
+#include <sys/param.h>
+#if !defined(__NetBSD_Version__) || (__NetBSD_Version__ < 106000000)
+#undef __NetBSD__
+#endif
+#endif
+
+#ifndef __NetBSD__
+const char *ln_progname;
+
+void setprogname(const char *progname) {
+       ln_progname = progname;
+}
+
+const char *getprogname(void) {
+       return ln_progname;
+}
+#endif



Home | Main Index | Thread Index | Old Index