From: John Kohl Date: Wed, 5 Sep 1990 11:47:27 +0000 (+0000) Subject: update to use new POSIX feature defs X-Git-Tag: krb5-1.0-alpha2~332 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4129145a9b5b8263a2777fe348d79d6eed72aa77;p=krb5.git update to use new POSIX feature defs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1079 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/lock_file.c b/src/lib/krb5/os/lock_file.c index b5c99f103..b7e3ada0e 100644 --- a/src/lib/krb5/os/lock_file.c +++ b/src/lib/krb5/os/lock_file.c @@ -21,7 +21,10 @@ static char rcsid_lock_file_c [] = #include #include -#ifdef POSIX + +#include + +#ifdef POSIX_FILE_LOCKS #include #include #define SHARED_LOCK F_RDLCK @@ -46,7 +49,7 @@ FILE *filep; char *pathname; int mode; { -#ifdef POSIX +#ifdef POSIX_FILE_LOCKS int lock_cmd = F_SETLKW; struct flock lock_arg; #define lock_flag lock_arg.l_type @@ -71,14 +74,14 @@ int mode; return(KRB5_LIBOS_BADLOCKFLAG); if (mode & KRB5_LOCKMODE_DONTBLOCK) { -#ifdef POSIX +#ifdef POSIX_FILE_LOCKS lock_cmd = F_SETLK; #else lock_flag |= LOCK_NB; #endif } -#ifdef POSIX +#ifdef POSIX_FILE_LOCKS lock_arg.l_whence = 0; lock_arg.l_start = 0; lock_arg.l_len = 0; diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c index 4e7d834f9..15ad1ea74 100644 --- a/src/lib/krb5/os/read_pwd.c +++ b/src/lib/krb5/os/read_pwd.c @@ -25,18 +25,17 @@ static char rcsid_read_pwd_c[] = #include #include +#include -#ifdef POSIX +#ifdef POSIX_TERMIOS #include -#define sigtype void #else #include -#define sigtype int -#endif /* POSIX */ +#endif /* POSIX_TERMIOS */ extern int errno; -#ifdef POSIX +#ifdef POSIX_TERMIOS #define cleanup(errcode) (void) signal(SIGINT, ointrfunc); tcsetattr(0, TCSANOW, &save_control); return errcode; #else #define cleanup(errcode) (void) signal(SIGINT, ointrfunc); ioctl(0, TIOCSETP, (char *)&tty_savestate); return errcode; @@ -45,7 +44,7 @@ extern int errno; static jmp_buf pwd_jump; -static sigtype +static krb5_sigtype intr_routine() { longjmp(pwd_jump, 1); @@ -64,8 +63,8 @@ int *size_return; char *readin_string = 0; register char *ptr; int scratchchar; - sigtype (*ointrfunc)(); -#ifdef POSIX + krb5_sigtype (*ointrfunc)(); +#ifdef POSIX_TERMIOS struct termios echo_control, save_control; if (tcgetattr(0, &echo_control) == -1) @@ -166,7 +165,7 @@ int *size_return; /* reset intrfunc */ (void) signal(SIGINT, ointrfunc); -#ifdef POSIX +#ifdef POSIX_TERMIOS if (tcsetattr(0, TCSANOW, &save_control) == -1) return errno; #else diff --git a/src/lib/krb5/os/timeofday.c b/src/lib/krb5/os/timeofday.c index 45904917f..edf8a92ac 100644 --- a/src/lib/krb5/os/timeofday.c +++ b/src/lib/krb5/os/timeofday.c @@ -24,7 +24,7 @@ static char rcsid_timeofday_c[] = #include #include -#ifdef POSIX +#ifdef POSIX_TYPES #define timetype time_t #else #define timetype long