From: Todd C. Miller Date: Thu, 2 Jul 2015 15:07:15 +0000 (-0600) Subject: Remove some compatibilty defines that should no longer be needed. X-Git-Tag: SUDO_1_8_14^2~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=540b09b32c3a4f507c7d1f43ebb8ff49f23ff2bb;p=sudo Remove some compatibilty defines that should no longer be needed. --- diff --git a/include/sudo_compat.h b/include/sudo_compat.h index e1d78f274..a808eef66 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -150,7 +150,7 @@ #endif /* - * Posix versions for those without... + * POSIX versions for those without... */ #ifndef _S_IFMT # define _S_IFMT S_IFMT @@ -171,13 +171,6 @@ # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #endif /* S_ISDIR */ -/* - * Some OS's may not have this. - */ -#ifndef S_IRWXU -# define S_IRWXU 0000700 /* rwx for owner */ -#endif /* S_IRWXU */ - /* For futimens() and utimensat() emulation. */ #if !defined(HAVE_FUTIMENS) && !defined(HAVE_UTIMENSAT) # ifndef UTIME_OMIT @@ -191,19 +184,6 @@ # endif #endif -/* - * These should be defined in but not everyone has them. - */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - /* * BSD defines these in but we don't include that anymore. */ @@ -238,13 +218,6 @@ __dso_public int isblank(int); # define HAVE_INNETGR 1 #endif /* HAVE__INNETGR */ -/* - * On POSIX systems, O_NOCTTY is the default so some OS's may lack this define. - */ -#ifndef O_NOCTTY -# define O_NOCTTY 0 -#endif /* O_NOCTTY */ - /* * Add IRIX-like sigaction_t for those without it. * SA_RESTART is not required by POSIX; SunOS has SA_INTERRUPT instead. @@ -294,6 +267,7 @@ extern int errno; # define SIG2STR_MAX 32 #endif +/* WCOREDUMP is not POSIX, this usually works (verified on AIX). */ #ifndef WCOREDUMP # define WCOREDUMP(x) ((x) & 0x80) #endif