- (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
This commit is contained in:
parent
9a94734d25
commit
77aba9d024
1
CREDITS
1
CREDITS
|
@ -47,6 +47,7 @@ Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation
|
||||||
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
|
Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
|
||||||
Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
|
Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> - Bugfixes
|
||||||
Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
|
Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches
|
||||||
|
Mark Miller <markm@swoon.net> - Bugfixes
|
||||||
Matt Richards <v2matt@btv.ibm.com> - AIX patches
|
Matt Richards <v2matt@btv.ibm.com> - AIX patches
|
||||||
Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
|
Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
|
||||||
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
|
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
- (djm) Quieten the pam delete credentials error message
|
- (djm) Quieten the pam delete credentials error message
|
||||||
- (djm) Fix printing of $DISPLAY hack if set by system type. Report from
|
- (djm) Fix printing of $DISPLAY hack if set by system type. Report from
|
||||||
Kevin Steves <stevesk@sweden.hp.com>
|
Kevin Steves <stevesk@sweden.hp.com>
|
||||||
|
- (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
|
||||||
|
|
||||||
20000829
|
20000829
|
||||||
- (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert
|
- (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert
|
||||||
|
|
|
@ -126,7 +126,6 @@ case "$host" in
|
||||||
MAIL=/usr/spool/mail
|
MAIL=/usr/spool/mail
|
||||||
AC_DEFINE(HAVE_NEXT)
|
AC_DEFINE(HAVE_NEXT)
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
AC_MSG_WARN([*** Tested: PA-RISC/m68k Untested: Sparc/Intel])
|
|
||||||
;;
|
;;
|
||||||
*-*-solaris*)
|
*-*-solaris*)
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
|
|
28
next-posix.c
28
next-posix.c
|
@ -2,8 +2,36 @@
|
||||||
|
|
||||||
#ifdef HAVE_NEXT
|
#ifdef HAVE_NEXT
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include "next-posix.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
|
int
|
||||||
waitpid(int pid, int *stat_loc, int options)
|
waitpid(int pid, int *stat_loc, int options)
|
||||||
{
|
{
|
||||||
|
|
30
next-posix.h
30
next-posix.h
|
@ -10,15 +10,10 @@
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include <sys/dir.h>
|
#include <sys/dir.h>
|
||||||
|
|
||||||
#define NAME_MAX 255
|
/* readdir() returns struct direct (BSD) not struct dirent (POSIX) */
|
||||||
struct dirent {
|
#define dirent direct
|
||||||
off_t d_off;
|
|
||||||
unsigned long d_fileno;
|
|
||||||
unsigned short d_reclen;
|
|
||||||
unsigned short d_namlen;
|
|
||||||
char d_name[NAME_MAX + 1];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
/* POSIX utime() struct */
|
||||||
struct utimbuf {
|
struct utimbuf {
|
||||||
time_t actime;
|
time_t actime;
|
||||||
time_t modtime;
|
time_t modtime;
|
||||||
|
@ -32,15 +27,22 @@ struct utimbuf {
|
||||||
#undef WIFSTOPPED
|
#undef WIFSTOPPED
|
||||||
#undef WIFSIGNALED
|
#undef WIFSIGNALED
|
||||||
|
|
||||||
#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
|
#define WIFEXITED(w) (!((w) & 0377))
|
||||||
#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
|
#define WIFSTOPPED(w) ((w) & 0100)
|
||||||
#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
|
|
||||||
#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
|
#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
|
||||||
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
|
#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((w >> 8) & 0377) : -1)
|
||||||
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
|
#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (w & 0177) : -1)
|
||||||
#define WCOREFLAG 0x80
|
#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);
|
int waitpid(int pid,int *stat_loc,int options);
|
||||||
#define getpgrp() getpgrp(0)
|
#define getpgrp() getpgrp(0)
|
||||||
pid_t setsid(void);
|
pid_t setsid(void);
|
||||||
|
|
2
scp.c
2
scp.c
|
@ -1212,7 +1212,7 @@ progressmeter(int flag)
|
||||||
if (flag == -1) {
|
if (flag == -1) {
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
sa.sa_handler = updateprogressmeter;
|
sa.sa_handler = updateprogressmeter;
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset((sigset_t *)&sa.sa_mask);
|
||||||
#ifdef SA_RESTART
|
#ifdef SA_RESTART
|
||||||
sa.sa_flags = SA_RESTART;
|
sa.sa_flags = SA_RESTART;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue