diff options
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | next-posix.c | 28 | ||||
-rw-r--r-- | next-posix.h | 30 | ||||
-rw-r--r-- | scp.c | 2 |
6 files changed, 47 insertions, 16 deletions
@@ -47,6 +47,7 @@ Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation | |||
47 | Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes | 47 | Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes |
48 | Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes | 48 | Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes |
49 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches | 49 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches |
50 | Mark Miller <markm@swoon.net> - Bugfixes | ||
50 | Matt Richards <v2matt@btv.ibm.com> - AIX patches | 51 | Matt Richards <v2matt@btv.ibm.com> - AIX patches |
51 | Michael Stone <mstone@cs.loyola.edu> - Irix enhancements | 52 | Michael Stone <mstone@cs.loyola.edu> - Irix enhancements |
52 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch | 53 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch |
@@ -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 | ||
11 | 20000829 | 12 | 20000829 |
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 | ||
8 | pid_t | ||
9 | posix_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 | |||
22 | int | ||
23 | posix_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 | |||
7 | int | 35 | int |
8 | waitpid(int pid, int *stat_loc, int options) | 36 | waitpid(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) */ |
14 | struct 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 */ | ||
22 | struct utimbuf { | 17 | struct 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 */ | ||
39 | int posix_utime(char *filename, struct utimbuf *buf); /* new utime() */ | ||
40 | #define utime posix_utime | ||
41 | |||
42 | pid_t posix_wait(int *status); /* new wait() */ | ||
43 | #define wait posix_wait | ||
43 | 44 | ||
45 | /* MISC functions */ | ||
44 | int waitpid(int pid,int *stat_loc,int options); | 46 | int waitpid(int pid,int *stat_loc,int options); |
45 | #define getpgrp() getpgrp(0) | 47 | #define getpgrp() getpgrp(0) |
46 | pid_t setsid(void); | 48 | pid_t setsid(void); |
@@ -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 |