diff options
| author | John Kohl <jtkohl@mit.edu> | 1990-09-05 11:47:27 +0000 |
|---|---|---|
| committer | John Kohl <jtkohl@mit.edu> | 1990-09-05 11:47:27 +0000 |
| commit | 4129145a9b5b8263a2777fe348d79d6eed72aa77 (patch) | |
| tree | 52f62c5fe57162c7c47213dd9fd39fd4460acf98 /src/lib | |
| parent | faf2d923caa54861c32c9aff7966c5134fc79442 (diff) | |
| download | krb5-4129145a9b5b8263a2777fe348d79d6eed72aa77.tar.gz krb5-4129145a9b5b8263a2777fe348d79d6eed72aa77.tar.xz krb5-4129145a9b5b8263a2777fe348d79d6eed72aa77.zip | |
update to use new POSIX feature defs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1079 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/lock_file.c | 11 | ||||
| -rw-r--r-- | src/lib/krb5/os/read_pwd.c | 17 | ||||
| -rw-r--r-- | src/lib/krb5/os/timeofday.c | 2 |
3 files changed, 16 insertions, 14 deletions
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 <krb5/libos.h> #include <stdio.h> -#ifdef POSIX + +#include <krb5/posix-conf.h> + +#ifdef POSIX_FILE_LOCKS #include <errno.h> #include <fcntl.h> #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 <setjmp.h> #include <krb5/ext-proto.h> +#include <krb5/posix-conf.h> -#ifdef POSIX +#ifdef POSIX_TERMIOS #include <termios.h> -#define sigtype void #else #include <sys/ioctl.h> -#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 <krb5/krb5.h> #include <krb5/libos-proto.h> -#ifdef POSIX +#ifdef POSIX_TYPES #define timetype time_t #else #define timetype long |
