Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make PR/10714: SUNAGAWA Keiki: Add newer hpux suppor...
details: https://anonhg.NetBSD.org/src/rev/2df8198acda8
branches: trunk
changeset: 495725:2df8198acda8
user: christos <christos%NetBSD.org@localhost>
date: Thu Aug 03 15:53:24 2000 +0000
description:
PR/10714: SUNAGAWA Keiki: Add newer hpux support, but without removing the
old hpux support.
diffstat:
usr.bin/make/Makefile.boot | 5 +-
usr.bin/make/util.c | 148 +++++++++++++++++++++-----------------------
2 files changed, 76 insertions(+), 77 deletions(-)
diffs (239 lines):
diff -r 899830a39d15 -r 2df8198acda8 usr.bin/make/Makefile.boot
--- a/usr.bin/make/Makefile.boot Thu Aug 03 15:30:52 2000 +0000
+++ b/usr.bin/make/Makefile.boot Thu Aug 03 15:53:24 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.boot,v 1.11 1999/04/03 04:50:16 gwr Exp $
+# $NetBSD: Makefile.boot,v 1.12 2000/08/03 15:53:24 christos Exp $
#
# a very simple makefile...
#
@@ -13,6 +13,9 @@
MACHINE=sun
MACHINE_ARCH=sparc
+# tested on HP-UX 10.20
+#MACHINE=hp700
+#MACHINE_ARCH=hppa
CFLAGS= -I.\
-DTARGET_MACHINE=\"${MACHINE}\" \
-DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \
diff -r 899830a39d15 -r 2df8198acda8 usr.bin/make/util.c
--- a/usr.bin/make/util.c Thu Aug 03 15:30:52 2000 +0000
+++ b/usr.bin/make/util.c Thu Aug 03 15:53:24 2000 +0000
@@ -1,15 +1,15 @@
-/* $NetBSD: util.c,v 1.25 2000/05/04 18:29:53 drochner Exp $ */
+/* $NetBSD: util.c,v 1.26 2000/08/03 15:53:24 christos Exp $ */
/*
* Missing stuff from OS's
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: util.c,v 1.25 2000/05/04 18:29:53 drochner Exp $";
+static char rcsid[] = "$NetBSD: util.c,v 1.26 2000/08/03 15:53:24 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.25 2000/05/04 18:29:53 drochner Exp $");
+__RCSID("$NetBSD: util.c,v 1.26 2000/08/03 15:53:24 christos Exp $");
#endif
#endif
@@ -26,8 +26,6 @@
#ifdef sun
-
-
extern int errno, sys_nerr;
extern char *sys_errlist[];
@@ -70,7 +68,7 @@
#endif
-#if defined(sun) || defined(__hpux) || defined(__sgi)
+#if defined(sun) || defined(__hpux__) || defined(__sgi) || defined(__hpux)
int
setenv(name, value, dum)
@@ -105,6 +103,61 @@
}
#endif
+#if defined(__hpux__) || defined(__hpux)
+
+/* strrcpy():
+ * Like strcpy, going backwards and returning the new pointer
+ */
+static char *
+strrcpy(ptr, str)
+ register char *ptr, *str;
+{
+ register int len = strlen(str);
+
+ while (len)
+ *--ptr = str[--len];
+
+ return (ptr);
+} /* end strrcpy */
+
+char *sys_siglist[] = {
+ "Signal 0",
+ "Hangup", /* SIGHUP */
+ "Interrupt", /* SIGINT */
+ "Quit", /* SIGQUIT */
+ "Illegal instruction", /* SIGILL */
+ "Trace/BPT trap", /* SIGTRAP */
+ "IOT trap", /* SIGIOT */
+ "EMT trap", /* SIGEMT */
+ "Floating point exception", /* SIGFPE */
+ "Killed", /* SIGKILL */
+ "Bus error", /* SIGBUS */
+ "Segmentation fault", /* SIGSEGV */
+ "Bad system call", /* SIGSYS */
+ "Broken pipe", /* SIGPIPE */
+ "Alarm clock", /* SIGALRM */
+ "Terminated", /* SIGTERM */
+ "User defined signal 1", /* SIGUSR1 */
+ "User defined signal 2", /* SIGUSR2 */
+ "Child exited", /* SIGCLD */
+ "Power-fail restart", /* SIGPWR */
+ "Virtual timer expired", /* SIGVTALRM */
+ "Profiling timer expired", /* SIGPROF */
+ "I/O possible", /* SIGIO */
+ "Window size changes", /* SIGWINDOW */
+ "Stopped (signal)", /* SIGSTOP */
+ "Stopped", /* SIGTSTP */
+ "Continued", /* SIGCONT */
+ "Stopped (tty input)", /* SIGTTIN */
+ "Stopped (tty output)", /* SIGTTOU */
+ "Urgent I/O condition", /* SIGURG */
+ "Remote lock lost (NFS)", /* SIGLOST */
+ "Signal 31", /* reserved */
+ "DIL signal" /* SIGDIL */
+};
+#endif /* __hpux__ || __hpux */
+
+
#ifdef __hpux
#include <sys/types.h>
#include <sys/param.h>
@@ -117,7 +170,6 @@
#include <time.h>
#include <unistd.h>
-
int
killpg(pid, sig)
int pid, sig;
@@ -158,6 +210,18 @@
return (osv.sv_handler);
}
+int
+utimes(file, tvp)
+ char *file;
+ struct timeval tvp[2];
+{
+ struct utimbuf t;
+
+ t.actime = tvp[0].tv_sec;
+ t.modtime = tvp[1].tv_sec;
+ return(utime(file, &t));
+}
+
#if !defined(BSD) && !defined(d_fileno)
# define d_fileno d_ino
#endif
@@ -168,23 +232,6 @@
#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
#define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1])))
-
-/* strrcpy():
- * Like strcpy, going backwards and returning the new pointer
- */
-static char *
-strrcpy(ptr, str)
- register char *ptr, *str;
-{
- register int len = strlen(str);
-
- while (len)
- *--ptr = str[--len];
-
- return (ptr);
-} /* end strrcpy */
-
-
char *
getwd(pathname)
char *pathname;
@@ -283,57 +330,6 @@
*cur_name_add = '\0';
}
} /* end getwd */
-
-
-char *sys_siglist[] = {
- "Signal 0",
- "Hangup", /* SIGHUP */
- "Interrupt", /* SIGINT */
- "Quit", /* SIGQUIT */
- "Illegal instruction", /* SIGILL */
- "Trace/BPT trap", /* SIGTRAP */
- "IOT trap", /* SIGIOT */
- "EMT trap", /* SIGEMT */
- "Floating point exception", /* SIGFPE */
- "Killed", /* SIGKILL */
- "Bus error", /* SIGBUS */
- "Segmentation fault", /* SIGSEGV */
- "Bad system call", /* SIGSYS */
- "Broken pipe", /* SIGPIPE */
- "Alarm clock", /* SIGALRM */
- "Terminated", /* SIGTERM */
- "User defined signal 1", /* SIGUSR1 */
- "User defined signal 2", /* SIGUSR2 */
- "Child exited", /* SIGCLD */
- "Power-fail restart", /* SIGPWR */
- "Virtual timer expired", /* SIGVTALRM */
- "Profiling timer expired", /* SIGPROF */
- "I/O possible", /* SIGIO */
- "Window size changes", /* SIGWINDOW */
- "Stopped (signal)", /* SIGSTOP */
- "Stopped", /* SIGTSTP */
- "Continued", /* SIGCONT */
- "Stopped (tty input)", /* SIGTTIN */
- "Stopped (tty output)", /* SIGTTOU */
- "Urgent I/O condition", /* SIGURG */
- "Remote lock lost (NFS)", /* SIGLOST */
- "Signal 31", /* reserved */
- "DIL signal" /* SIGDIL */
-};
-
-int
-utimes(file, tvp)
- char *file;
- struct timeval tvp[2];
-{
- struct utimbuf t;
-
- t.actime = tvp[0].tv_sec;
- t.modtime = tvp[1].tv_sec;
- return(utime(file, &t));
-}
-
-
#endif /* __hpux */
#if defined(sun) && defined(__svr4__)
@@ -435,7 +431,7 @@
}
#if !defined(__SVR4) && !defined(__linux__) && !defined(ultrix) \
- && !defined(__sgi) && !defined(__osf__)
+ && !defined(__sgi) && !defined(__osf__) && !defined(__hpux__)
int
strftime(buf, len, fmt, tm)
Home |
Main Index |
Thread Index |
Old Index