summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-08-30 10:11:30 +1100
committerDamien Miller <djm@mindrot.org>2000-08-30 10:11:30 +1100
commit77aba9d02490a7cac75c15d44ef6f9a9a79d3fbf (patch)
tree5069a5e33c4fce6076b5278db4fda464e0690f2a
parent9a94734d25ff8a632fd1dd3114d64e79a99474ba (diff)
- (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
-rw-r--r--CREDITS1
-rw-r--r--ChangeLog1
-rw-r--r--configure.in1
-rw-r--r--next-posix.c28
-rw-r--r--next-posix.h30
-rw-r--r--scp.c2
6 files changed, 47 insertions, 16 deletions
diff --git a/CREDITS b/CREDITS
index 4329838cd..63a5e9409 100644
--- a/CREDITS
+++ b/CREDITS
@@ -47,6 +47,7 @@ Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation
47Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes 47Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
48Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes 48Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
49Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches 49Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
50Mark Miller <markm@swoon.net> - Bugfixes
50Matt Richards <v2matt@btv.ibm.com> - AIX patches 51Matt Richards <v2matt@btv.ibm.com> - AIX patches
51Michael Stone <mstone@cs.loyola.edu> - Irix enhancements 52Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
52Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch 53Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
diff --git a/ChangeLog b/ChangeLog
index d1bfec9bb..fae5c7c48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
7 - (djm) Quieten the pam delete credentials error message 7 - (djm) Quieten the pam delete credentials error message
8 - (djm) Fix printing of $DISPLAY hack if set by system type. Report from 8 - (djm) Fix printing of $DISPLAY hack if set by system type. Report from
9 Kevin Steves <stevesk@sweden.hp.com> 9 Kevin Steves <stevesk@sweden.hp.com>
10 - (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
10 11
1120000829 1220000829
12 - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert 13 - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert
diff --git a/configure.in b/configure.in
index 5321aedc4..d281c7d23 100644
--- a/configure.in
+++ b/configure.in
@@ -126,7 +126,6 @@ case "$host" in
126 MAIL=/usr/spool/mail 126 MAIL=/usr/spool/mail
127 AC_DEFINE(HAVE_NEXT) 127 AC_DEFINE(HAVE_NEXT)
128 CFLAGS="$CFLAGS -I/usr/local/include" 128 CFLAGS="$CFLAGS -I/usr/local/include"
129 AC_MSG_WARN([*** Tested: PA-RISC/m68k Untested: Sparc/Intel])
130 ;; 129 ;;
131*-*-solaris*) 130*-*-solaris*)
132 CFLAGS="$CFLAGS -I/usr/local/include" 131 CFLAGS="$CFLAGS -I/usr/local/include"
diff --git a/next-posix.c b/next-posix.c
index 0f0c0ea49..7bb34ef00 100644
--- a/next-posix.c
+++ b/next-posix.c
@@ -2,8 +2,36 @@
2 2
3#ifdef HAVE_NEXT 3#ifdef HAVE_NEXT
4#include <errno.h> 4#include <errno.h>
5#include <sys/wait.h>
5#include "next-posix.h" 6#include "next-posix.h"
6 7
8pid_t
9posix_wait(int *status)
10{
11 #undef wait /* Use NeXT's wait() function */
12 union wait statusp;
13 pid_t wait_pid;
14
15 wait_pid = wait(&statusp);
16 status = (int *) statusp.w_status;
17
18 return wait_pid;
19}
20
21
22int
23posix_utime(char *filename,struct utimbuf *buf)
24{
25 time_t timep[2];
26
27 timep[0] = buf->actime;
28 timep[1] = buf->modtime;
29
30 #undef utime /* Use NeXT's utime() function */
31 return utime(filename,timep);
32}
33
34
7int 35int
8waitpid(int pid, int *stat_loc, int options) 36waitpid(int pid, int *stat_loc, int options)
9{ 37{
diff --git a/next-posix.h b/next-posix.h
index 86683db59..13aaaa2cb 100644
--- a/next-posix.h
+++ b/next-posix.h
@@ -10,15 +10,10 @@
10#include <libc.h> 10#include <libc.h>
11#include <sys/dir.h> 11#include <sys/dir.h>
12 12
13#define NAME_MAX 255 13/* readdir() returns struct direct (BSD) not struct dirent (POSIX) */
14struct dirent { 14#define dirent direct
15 off_t d_off;
16 unsigned long d_fileno;
17 unsigned short d_reclen;
18 unsigned short d_namlen;
19 char d_name[NAME_MAX + 1];
20};
21 15
16/* POSIX utime() struct */
22struct utimbuf { 17struct utimbuf {
23 time_t actime; 18 time_t actime;
24 time_t modtime; 19 time_t modtime;
@@ -32,15 +27,22 @@ struct utimbuf {
32#undef WIFSTOPPED 27#undef WIFSTOPPED
33#undef WIFSIGNALED 28#undef WIFSIGNALED
34 29
35#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */ 30#define WIFEXITED(w) (!((w) & 0377))
36#define WIFEXITED(w) (!((_W_INT(w)) & 0377)) 31#define WIFSTOPPED(w) ((w) & 0100)
37#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
38#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w)) 32#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
39#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1) 33#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((w >> 8) & 0377) : -1)
40#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1) 34#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (w & 0177) : -1)
41#define WCOREFLAG 0x80 35#define WCOREFLAG 0x80
42#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG) 36#define WCOREDUMP(w) ((w) & WCOREFLAG)
37
38/* POSIX "wrapper" functions to replace to BSD functions */
39int posix_utime(char *filename, struct utimbuf *buf); /* new utime() */
40#define utime posix_utime
41
42pid_t posix_wait(int *status); /* new wait() */
43#define wait posix_wait
43 44
45/* MISC functions */
44int waitpid(int pid,int *stat_loc,int options); 46int waitpid(int pid,int *stat_loc,int options);
45#define getpgrp() getpgrp(0) 47#define getpgrp() getpgrp(0)
46pid_t setsid(void); 48pid_t setsid(void);
diff --git a/scp.c b/scp.c
index 5a5d0f469..3b356a9c0 100644
--- a/scp.c
+++ b/scp.c
@@ -1212,7 +1212,7 @@ progressmeter(int flag)
1212 if (flag == -1) { 1212 if (flag == -1) {
1213 struct sigaction sa; 1213 struct sigaction sa;
1214 sa.sa_handler = updateprogressmeter; 1214 sa.sa_handler = updateprogressmeter;
1215 sigemptyset(&sa.sa_mask); 1215 sigemptyset((sigset_t *)&sa.sa_mask);
1216#ifdef SA_RESTART 1216#ifdef SA_RESTART
1217 sa.sa_flags = SA_RESTART; 1217 sa.sa_flags = SA_RESTART;
1218#endif 1218#endif