update to use new POSIX feature defs
authorJohn Kohl <jtkohl@mit.edu>
Wed, 5 Sep 1990 11:47:27 +0000 (11:47 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 5 Sep 1990 11:47:27 +0000 (11:47 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1079 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/lock_file.c
src/lib/krb5/os/read_pwd.c
src/lib/krb5/os/timeofday.c

index b5c99f1032d7e0b47a731b3d55708e851585e91c..b7e3ada0e20031108e454c0fdd0a23f532450cd6 100644 (file)
@@ -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;
index 4e7d834f9a146c85b36430d79f7a8a1552bc8945..15ad1ea747b39ed50fecf22fec9ba55872574d0f 100644 (file)
@@ -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
index 45904917fb7b5c8c55eaebc63ff0293036bd1ba6..edf8a92ac9bf3072f3189be056ac8323543888f3 100644 (file)
@@ -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