]> andersk Git - openssh.git/commitdiff
- (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
authordjm <djm>
Tue, 29 Aug 2000 23:11:30 +0000 (23:11 +0000)
committerdjm <djm>
Tue, 29 Aug 2000 23:11:30 +0000 (23:11 +0000)
CREDITS
ChangeLog
configure.in
next-posix.c
next-posix.h
scp.c

diff --git a/CREDITS b/CREDITS
index 4329838cd53dff762eb63d597b048d22f623fd1f..63a5e94099aefa27cfda390e7abcf032eb2645ab 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -47,6 +47,7 @@ Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation
 Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
 Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
 Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
+Mark Miller <markm@swoon.net> - Bugfixes
 Matt Richards <v2matt@btv.ibm.com> - AIX patches
 Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
 Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
index d1bfec9bba4fcd8b809e581aa4892357876906a2..fae5c7c48d75c81ac94247b70c99827e2d4674e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
  - (djm) Quieten the pam delete credentials error message
  - (djm) Fix printing of $DISPLAY hack if set by system type. Report from
    Kevin Steves <stevesk@sweden.hp.com>
+ - (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
 
 20000829
  - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert 
index 5321aedc4a0e77dfed7e74b089e8ea18d6640fc1..d281c7d233dd34064f719c75e1d0a7c788f75102 100644 (file)
@@ -126,7 +126,6 @@ case "$host" in
        MAIL=/usr/spool/mail
        AC_DEFINE(HAVE_NEXT)
        CFLAGS="$CFLAGS -I/usr/local/include"
-       AC_MSG_WARN([*** Tested: PA-RISC/m68k  Untested: Sparc/Intel])
        ;;
 *-*-solaris*)
        CFLAGS="$CFLAGS -I/usr/local/include"
index 0f0c0ea497ca10198a2aa27ded2e05806d01e8ab..7bb34ef0090d48ca3c6b6a99adce39061d54a3dc 100644 (file)
@@ -2,8 +2,36 @@
 
 #ifdef HAVE_NEXT
 #include <errno.h>
+#include <sys/wait.h>
 #include "next-posix.h"
 
+pid_t 
+posix_wait(int *status)
+{
+       #undef wait                     /* Use NeXT's wait() function */
+       union wait statusp;
+       pid_t wait_pid;
+
+       wait_pid = wait(&statusp);
+       status = (int *) statusp.w_status;
+
+       return wait_pid;
+}
+
+
+int                                          
+posix_utime(char *filename,struct utimbuf *buf)
+{                                            
+        time_t timep[2];                     
+                                             
+        timep[0] = buf->actime;              
+        timep[1] = buf->modtime;             
+
+        #undef utime                   /* Use NeXT's utime() function */ 
+        return utime(filename,timep);        
+}                                            
+
+
 int
 waitpid(int    pid, int        *stat_loc, int  options)
 {
index 86683db59b2f83bb8b07a0c37d5dcb612a45b04d..13aaaa2cb15808a64f373473b3073e84c01ef504 100644 (file)
 #include <libc.h>
 #include <sys/dir.h>
 
-#define NAME_MAX 255
-struct dirent {
-       off_t   d_off;
-       unsigned long   d_fileno;
-       unsigned short  d_reclen;
-       unsigned short  d_namlen;
-       char    d_name[NAME_MAX + 1];
-};
+/* readdir() returns struct direct (BSD) not struct dirent (POSIX) */
+#define dirent direct                                                
 
+/* POSIX utime() struct */
 struct utimbuf {
        time_t  actime;
        time_t  modtime;
@@ -32,15 +27,22 @@ struct utimbuf {
 #undef WIFSTOPPED
 #undef WIFSIGNALED
 
-#define _W_INT(w)      (*(int*)&(w))   /* convert union wait to int */
-#define WIFEXITED(w)   (!((_W_INT(w)) & 0377))
-#define WIFSTOPPED(w)  ((_W_INT(w)) & 0100)
+#define WIFEXITED(w)   (!((w) & 0377))
+#define WIFSTOPPED(w)  ((w) & 0100)
 #define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
-#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
-#define WTERMSIG(w)    (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
+#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((w >> 8) & 0377) : -1)
+#define WTERMSIG(w)    (int)(WIFSIGNALED(w) ? (w & 0177) : -1)
 #define WCOREFLAG      0x80
-#define WCOREDUMP(w)   ((_W_INT(w)) & WCOREFLAG)
+#define WCOREDUMP(w)   ((w) & WCOREFLAG)
+
+/* POSIX "wrapper" functions to replace to BSD functions */
+int posix_utime(char *filename, struct utimbuf *buf);  /* new utime() */
+#define utime posix_utime
+
+pid_t posix_wait(int *status);                         /* new wait() */
+#define wait posix_wait        
 
+/* MISC functions */
 int waitpid(int pid,int *stat_loc,int options);
 #define getpgrp()      getpgrp(0)
 pid_t setsid(void);
diff --git a/scp.c b/scp.c
index 5a5d0f4693a7e021afb72869c48678a8a8710cc8..3b356a9c0a0da8ffbfccefd5da668300cd1c6cf3 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -1212,7 +1212,7 @@ progressmeter(int flag)
        if (flag == -1) {
                struct sigaction sa;
                sa.sa_handler = updateprogressmeter;
-               sigemptyset(&sa.sa_mask);
+               sigemptyset((sigset_t *)&sa.sa_mask);
 #ifdef SA_RESTART
                sa.sa_flags = SA_RESTART;
 #endif
This page took 4.640839 seconds and 5 git commands to generate.