]> granicus.if.org Git - sudo/commitdiff
Merge compat.h and missing.h into missing.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Aug 2010 18:22:14 +0000 (14:22 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Aug 2010 18:22:14 +0000 (14:22 -0400)
--HG--
branch : 1.7

36 files changed:
Makefile.in
aix.c
audit.c
boottime.c
compat.h [deleted file]
error.c
fnmatch.c
getcwd.c
getdate.c
getdate.y
getline.c
getprogname.c
gettime.c
glob.c
isblank.c
linux_audit.c
memrchr.c
missing.h
mksiglist.c
nanosleep.c
sesh.c
setsid.c
sigaction.c
snprintf.c
strcasecmp.c
strerror.c
strlcat.c
strlcpy.c
strsignal.c
sudo.h
sudo_noexec.c
sudoreplay.c
timestr.c
utimes.c
vasgroups.c
zero_bytes.c

index dbfb1b1655e073f9547a4a6d048af3e5c3881068..023906ab1fa8c6e2341a1e8d3d93a1f6a9ceb95d 100644 (file)
@@ -122,7 +122,7 @@ AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
            auth/secureware.c auth/securid.c auth/securid5.c auth/sia.c \
            auth/sudo_auth.c
 
-HDRS = alloc.h bsm_audit.h compat.h def_data.h defaults.h error.h ins_2001.h \
+HDRS = alloc.h bsm_audit.h def_data.h defaults.h error.h ins_2001.h \
        ins_classic.h ins_csops.h ins_goons.h insults.h interfaces.h lbuf.h \
        linux_audit.h list.h logging.h missing.h mksiglist.h nonunix.h \
        redblack.h parse.h sudo.h sudo_exec.h sudo_nss.h gram.h \
@@ -165,10 +165,10 @@ DISTFILES = $(SRCS) $(HDRS) ChangeLog HISTORY INSTALL INSTALL.configure \
            visudo.cat visudo.man.in visudo.pod auth/API sudo.man.pl \
            sudoers.man.pl
 
-SUDODEP = $(srcdir)/sudo.h $(srcdir)/alloc.h $(srcdir)/compat.h \
-         $(srcdir)/defaults.h $(srcdir)/error.h $(srcdir)/list.h \
-         $(srcdir)/logging.h $(srcdir)/missing.h $(srcdir)/sudo_nss.h \
-         $(devdir)/def_data.h pathnames.h config.h
+SUDODEP = $(srcdir)/sudo.h $(srcdir)/alloc.h $(srcdir)/defaults.h \
+         $(srcdir)/error.h $(srcdir)/list.h $(srcdir)/logging.h \
+         $(srcdir)/missing.h $(srcdir)/sudo_nss.h $(devdir)/def_data.h \
+         pathnames.h config.h
 
 AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
 
@@ -237,7 +237,7 @@ $(devdir)/getdate.c: $(srcdir)/getdate.y
 siglist.c: mksiglist
        ./mksiglist > $@
 
-mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(srcdir)/compat.h $(top_builddir)/config.h
+mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(srcdir)/missing.h $(top_builddir)/config.h
        $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@
 
 @DEV@$(srcdir)/mksiglist.h: $(srcdir)/siglist.in
@@ -264,7 +264,7 @@ defaults.o: $(srcdir)/defaults.c $(SUDODEP) $(srcdir)/def_data.c $(authdir)/sudo
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/defaults.c
 env.o: $(srcdir)/env.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/env.c
-error.o: $(srcdir)/error.c $(srcdir)/compat.h $(srcdir)/error.h config.h
+error.o: $(srcdir)/error.c $(srcdir)/missing.h $(srcdir)/error.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/error.c
 exec.o: $(srcdir)/exec.c $(SUDODEP) $(srcdir)/sudo_exec.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/exec.c
@@ -274,13 +274,13 @@ fileops.o: $(srcdir)/fileops.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fileops.c
 find_path.o: $(srcdir)/find_path.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/find_path.c
-fnmatch.o: $(srcdir)/fnmatch.c $(srcdir)/emul/fnmatch.h $(srcdir)/compat.h config.h
+fnmatch.o: $(srcdir)/fnmatch.c $(srcdir)/emul/fnmatch.h $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/fnmatch.c
 get_pty.o: $(srcdir)/get_pty.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/get_pty.c
-getcwd.o: $(srcdir)/getcwd.c $(srcdir)/compat.h config.h
+getcwd.o: $(srcdir)/getcwd.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getcwd.c
-getdate.o: $(srcdir)/getdate.c $(srcdir)/compat.h config.h
+getdate.o: $(srcdir)/getdate.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getdate.c
 getline.o: $(srcdir)/getline.c config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getline.c
@@ -290,7 +290,7 @@ getspwuid.o: $(srcdir)/getspwuid.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/getspwuid.c
 gettime.o: $(srcdir)/gettime.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/gettime.c
-glob.o: $(srcdir)/glob.c $(srcdir)/emul/glob.h $(srcdir)/compat.h config.h
+glob.o: $(srcdir)/glob.c $(srcdir)/emul/glob.h $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/glob.c
 goodpath.o: $(srcdir)/goodpath.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/goodpath.c
@@ -300,7 +300,7 @@ interfaces.o: $(srcdir)/interfaces.c $(SUDODEP) $(srcdir)/interfaces.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/interfaces.c
 iolog.o: $(srcdir)/iolog.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/iolog.c
-isblank.o: $(srcdir)/isblank.c $(srcdir)/compat.h config.h
+isblank.o: $(srcdir)/isblank.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/isblank.c
 lbuf.o: $(srcdir)/lbuf.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/lbuf.c
@@ -318,7 +318,7 @@ memrchr.o: $(srcdir)/memrchr.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/memrchr.c
 mkstemps.o: $(srcdir)/mkstemps.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/mkstemps.c
-nanosleep.o: $(srcdir)/nanosleep.c $(srcdir)/compat.h config.h
+nanosleep.o: $(srcdir)/nanosleep.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/nanosleep.c
 parse.o: $(srcdir)/parse.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/parse.c
@@ -330,33 +330,33 @@ redblack.o: $(srcdir)/redblack.c $(SUDODEP) $(srcdir)/redblack.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/redblack.c
 set_perms.o: $(srcdir)/set_perms.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/set_perms.c
-setsid.o: $(srcdir)/setsid.c $(srcdir)/compat.h config.h
+setsid.o: $(srcdir)/setsid.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/setsid.c
-sigaction.o: $(srcdir)/sigaction.c $(srcdir)/compat.h
+sigaction.o: $(srcdir)/sigaction.c $(srcdir)/missing.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sigaction.c
-siglist.o: siglist.c $(srcdir)/compat.h config.h
+siglist.o: siglist.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/siglist.c
-snprintf.o: $(srcdir)/snprintf.c $(srcdir)/compat.h config.h
+snprintf.o: $(srcdir)/snprintf.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/snprintf.c
-strcasecmp.o: $(srcdir)/strcasecmp.c $(srcdir)/compat.h  config.h
+strcasecmp.o: $(srcdir)/strcasecmp.c $(srcdir)/missing.h  config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strcasecmp.c
-strerror.o: $(srcdir)/strerror.c $(srcdir)/compat.h config.h
+strerror.o: $(srcdir)/strerror.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strerror.c
-strlcat.o: $(srcdir)/strlcat.c $(srcdir)/compat.h config.h
+strlcat.o: $(srcdir)/strlcat.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcat.c
-strlcpy.o: $(srcdir)/strlcpy.c $(srcdir)/compat.h config.h
+strlcpy.o: $(srcdir)/strlcpy.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strlcpy.c
-strsignal.o: $(srcdir)/strsignal.c $(srcdir)/compat.h config.h
+strsignal.o: $(srcdir)/strsignal.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/strsignal.c
 selinux.o: $(srcdir)/selinux.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/selinux.c
 sudo.o: $(srcdir)/sudo.c $(SUDODEP) sudo_usage.h $(srcdir)/interfaces.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo.c
-sudoreplay.o: $(srcdir)/sudoreplay.c $(srcdir)/alloc.h $(srcdir)/compat.h $(srcdir)/error.h $(srcdir)/missing.h config.h
+sudoreplay.o: $(srcdir)/sudoreplay.c $(srcdir)/alloc.h $(srcdir)/missing.h $(srcdir)/error.h $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudoreplay.c
 sudo_edit.o: $(srcdir)/sudo_edit.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_edit.c
-sudo_noexec.o: $(srcdir)/sudo_noexec.c $(srcdir)/compat.h config.h
+sudo_noexec.o: $(srcdir)/sudo_noexec.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
 sudo_nss.o: $(srcdir)/sudo_nss.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_nss.c
@@ -366,19 +366,19 @@ testsudoers.o: $(srcdir)/testsudoers.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/li
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/testsudoers.c
 tgetpass.o: $(srcdir)/tgetpass.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tgetpass.c
-timestr.o: $(srcdir)/timestr.c $(srcdir)/compat.h config.h
+timestr.o: $(srcdir)/timestr.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/timestr.c
 toke.o: $(devdir)/toke.c $(SUDODEP) $(srcdir)/parse.h $(srcdir)/list.h $(devdir)/gram.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(devdir)/toke.c
 tsgetgrpw.o: $(srcdir)/tsgetgrpw.c $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/tsgetgrpw.c
-utimes.o: $(srcdir)/utimes.c $(srcdir)/compat.h $(srcdir)/emul/utime.h config.h
+utimes.o: $(srcdir)/utimes.c $(srcdir)/missing.h $(srcdir)/emul/utime.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/utimes.c
 vasgroups.o: $(srcdir)/vasgroups.c $(srcdir)/nonunix.h $(SUDODEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/vasgroups.c
 visudo.o: $(srcdir)/visudo.c $(SUDODEP) $(devdir)/gram.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/visudo.c
-zero_bytes.o: $(srcdir)/zero_bytes.c $(srcdir)/compat.h config.h
+zero_bytes.o: $(srcdir)/zero_bytes.c $(srcdir)/missing.h config.h
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/zero_bytes.c
 sudo_auth.o: $(authdir)/sudo_auth.c $(AUTHDEP) $(INSDEP)
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(authdir)/sudo_auth.c
diff --git a/aix.c b/aix.c
index 5735ec97a0eb2f35b7b4e9c522b869cd6282d457..ec0b9fb03ba4c1cf833e0a8197149259325465ba 100644 (file)
--- a/aix.c
+++ b/aix.c
@@ -31,7 +31,7 @@
 #include <usersec.h>
 #include <uinfo.h>
 
-#include "compat.h"
+#include "missing.h"
 #include "alloc.h"
 #include "error.h"
 
diff --git a/audit.c b/audit.c
index 9226d301d3d000c360ec5a2b25278450566503b0..15ac8eea7e2b2b8d9159b6e780cc7377744a58e0 100644 (file)
--- a/audit.c
+++ b/audit.c
@@ -32,7 +32,7 @@
 # include <varargs.h>
 #endif
 
-#include "compat.h"
+#include "missing.h"
 #include "logging.h"
 
 #ifdef HAVE_BSM_AUDIT
index 37c83158d0b987015df3f64f3934516b4a50d2fe..7c0410c7094253a36b3586364660e47087ced72a 100644 (file)
@@ -47,7 +47,6 @@
 # include <sys/sysctl.h>
 #endif
 
-#include "compat.h"
 #include "missing.h"
 
 /*
diff --git a/compat.h b/compat.h
deleted file mode 100644 (file)
index c01924d..0000000
--- a/compat.h
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (c) 1996, 1998-2005, 2008-2010
- *     Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- */
-
-#ifndef _SUDO_COMPAT_H
-#define _SUDO_COMPAT_H
-
-/*
- * Macros that may be missing on some Operating Systems
- */
-
-/* Deal with ANSI stuff reasonably.  */
-#ifndef  __P
-# if defined (__cplusplus) || defined (__STDC__)
-#  define __P(args)            args
-# else
-#  define __P(args)            ()
-# endif
-#endif /* __P */
-
-/* Define away __attribute__ for non-gcc or old gcc */
-#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5
-# define __attribute__(x)
-#endif
-
-/* For silencing gcc warnings about rcsids */
-#ifndef __unused
-# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7)
-#  define __unused     __attribute__((__unused__))
-# else
-#  define __unused
-# endif
-#endif
-
-/* For catching format string mismatches */
-#ifndef __printflike
-# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-#  define __printflike(f, v)   __attribute__((__format__ (__printf__, f, v)))
-# else
-#  define __printflike(f, v)
-# endif
-#endif
-
-/*
- * Some systems lack full limit definitions.
- */
-#ifndef OPEN_MAX
-# define OPEN_MAX      256
-#endif
-
-#ifndef INT_MAX
-# define INT_MAX       0x7fffffff
-#endif
-
-#ifndef PATH_MAX
-# ifdef MAXPATHLEN
-#  define PATH_MAX             MAXPATHLEN
-# else
-#  ifdef _POSIX_PATH_MAX
-#   define PATH_MAX            _POSIX_PATH_MAX
-#  else
-#   define PATH_MAX            1024
-#  endif
-# endif
-#endif
-
-#ifndef MAXHOSTNAMELEN
-# define MAXHOSTNAMELEN                64
-#endif
-
-/*
- * Posix versions for those without...
- */
-#ifndef _S_IFMT
-# define _S_IFMT               S_IFMT
-#endif /* _S_IFMT */
-#ifndef _S_IFREG
-# define _S_IFREG              S_IFREG
-#endif /* _S_IFREG */
-#ifndef _S_IFDIR
-# define _S_IFDIR              S_IFDIR
-#endif /* _S_IFDIR */
-#ifndef _S_IFLNK
-# define _S_IFLNK              S_IFLNK
-#endif /* _S_IFLNK */
-#ifndef S_ISREG
-# define S_ISREG(m)            (((m) & _S_IFMT) == _S_IFREG)
-#endif /* S_ISREG */
-#ifndef S_ISDIR
-# 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 */
-
-/*
- * These should be defined in <unistd.h> 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
-
-/*
- * These should be defined in <unistd.h> but not everyone has them.
- */
-#ifndef SEEK_SET
-# define       SEEK_SET        0
-#endif
-#ifndef SEEK_CUR
-# define       SEEK_CUR        1
-#endif
-#ifndef SEEK_END
-# define       SEEK_END        2
-#endif
-
-/*
- * BSD defines these in <sys/param.h> but others may not.
- */
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#ifndef MAX
-# define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/*
- * Simple isblank() macro and function for systems without it.
- */
-#ifndef HAVE_ISBLANK
-int isblank __P((int));
-# define isblank(_x)   ((_x) == ' ' || (_x) == '\t')
-#endif
-
-/*
- * Old BSD systems lack strchr(), strrchr(), memset() and memcpy()
- */
-#if !defined(HAVE_STRCHR) && !defined(strchr)
-# define strchr(_s, _c)        index(_s, _c)
-#endif
-#if !defined(HAVE_STRRCHR) && !defined(strrchr)
-# define strrchr(_s, _c)       rindex(_s, _c)
-#endif
-#if !defined(HAVE_MEMCPY) && !defined(memcpy)
-# define memcpy(_d, _s, _n)    (bcopy(_s, _d, _n))
-#endif
-#if !defined(HAVE_MEMSET) && !defined(memset)
-# define memset(_s, _x, _n)    (bzero(_s, _n))
-#endif
-
-/*
- * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason.
- */
-#ifdef HAVE__INNETGR
-# define innetgr(n, h, u, d)   (_innetgr(n, h, u, d))
-# 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 */
-
-/*
- * Emulate POSIX signals via sigvec(2)
- */
-#ifndef HAVE_SIGACTION
-# define SA_ONSTACK    SV_ONSTACK
-# define SA_RESTART    SV_INTERRUPT            /* opposite effect */
-# define SA_RESETHAND  SV_RESETHAND
-# define sa_handler    sv_handler
-# define sa_mask       sv_mask
-# define sa_flags      sv_flags
-typedef struct sigvec sigaction_t;
-typedef int sigset_t;
-int sigaction __P((int sig, const sigaction_t *act, sigaction_t *oact));
-int sigemptyset __P((sigset_t *));
-int sigfillset __P((sigset_t *));
-int sigaddset __P((sigset_t *, int));
-int sigdelset __P((sigset_t *, int));
-int sigismember __P((sigset_t *, int));
-int sigprocmask __P((int, const sigset_t *, sigset_t *));
-#endif
-
-/*
- * Extra sugar for POSIX signals to deal with the above emulation
- * as well as the fact that SunOS has a SA_INTERRUPT flag.
- */
-#ifdef HAVE_SIGACTION
-# ifndef HAVE_SIGACTION_T
-typedef struct sigaction sigaction_t;
-# endif
-# ifndef SA_INTERRUPT
-#  define SA_INTERRUPT 0
-# endif
-# ifndef SA_RESTART
-#  define SA_RESTART   0
-# endif
-#endif
-
-/*
- * If dirfd() does not exists, hopefully dd_fd does.
- */
-#if !defined(HAVE_DIRFD) && defined(HAVE_DD_FD)
-# define dirfd(_d)     ((_d)->dd_fd)
-# define HAVE_DIRFD
-#endif
-
-/*
- * Define futimes() in terms of futimesat() if needed.
- */
-#if !defined(HAVE_FUTIMES) && defined(HAVE_FUTIMESAT)
-# define futimes(_f, _tv)      futimesat(_f, NULL, _tv)
-# define HAVE_FUTIMES
-#endif
-
-#if !defined(HAVE_KILLPG) && !defined(killpg)
-# define killpg(s)     kill(-(s))
-#endif
-
-/*
- * If we lack getprogname(), emulate with __progname if possible.
- * Otherwise, add a prototype for use with our own getprogname.c.
- */
-#ifndef HAVE_GETPROGNAME
-# ifdef HAVE___PROGNAME
-extern const char *__progname;
-#  define getprogname()          (__progname)
-# else
-const char *getprogname __P((void));
-#endif /* HAVE___PROGNAME */
-#endif /* !HAVE_GETPROGNAME */
-
-#ifndef timevalclear
-# define timevalclear(tv)      ((tv)->tv_sec = (tv)->tv_usec = 0)
-#endif
-#ifndef timevalisset
-# define timevalisset(tv)      ((tv)->tv_sec || (tv)->tv_usec)
-#endif
-#ifndef timevalcmp
-# define timevalcmp(tv1, tv2, op)                                             \
-    (((tv1)->tv_sec == (tv2)->tv_sec) ?                                               \
-       ((tv1)->tv_usec op (tv2)->tv_usec) :                                   \
-       ((tv1)->tv_sec op (tv2)->tv_sec))
-#endif
-#ifndef timevaladd
-# define timevaladd(tv1, tv2)                                                 \
-    do {                                                                      \
-       (tv1)->tv_sec += (tv2)->tv_sec;                                        \
-       (tv1)->tv_usec += (tv2)->tv_usec;                                      \
-       if ((tv1)->tv_usec >= 1000000) {                                       \
-           (tv1)->tv_sec++;                                                   \
-           (tv1)->tv_usec -= 1000000;                                         \
-       }                                                                      \
-    } while (0)
-#endif
-#ifndef timevalsub
-# define timevalsub(tv1, tv2)                                                 \
-    do {                                                                      \
-       (tv1)->tv_sec -= (tv2)->tv_sec;                                        \
-       (tv1)->tv_usec -= (tv2)->tv_usec;                                      \
-       if ((tv1)->tv_usec < 0) {                                              \
-           (tv1)->tv_sec--;                                                   \
-           (tv1)->tv_usec += 1000000;                                         \
-       }                                                                      \
-    } while (0)
-#endif
-
-/* Not all systems define NSIG in signal.h */
-#if !defined(NSIG)
-# if defined(_NSIG)
-#  define NSIG _NSIG
-# elif defined(__NSIG)
-#  define NSIG __NSIG
-# else
-#  define NSIG 64
-# endif
-#endif
-
-#ifndef WCOREDUMP
-# define WCOREDUMP(x)  ((x) & 0x80)
-#endif
-
-#endif /* _SUDO_COMPAT_H */
diff --git a/error.c b/error.c
index 317f10561cbecfba55bfd6c2eee842a3ae688da9..3e81b4fd3e90e2e0f4b0f7a4e7b0cc619518410c 100644 (file)
--- a/error.c
+++ b/error.c
@@ -20,7 +20,7 @@
 #include <string.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 #include "error.h"
 
 static void _warning   __P((int, const char *, va_list));
index 2255e521444a4bddb561bd3e162133296cae5ac0..9b80e4facf82c31695d0a9796d01bf065f367e9c 100644 (file)
--- a/fnmatch.c
+++ b/fnmatch.c
@@ -47,7 +47,7 @@
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 
-#include <compat.h>
+#include <missing.h>
 #include "emul/fnmatch.h"
 #include "emul/charclass.h"
 
index 109794ae8174cba1462435c729a7d1bd2defbc3d..0bbb86fc8f2e8f503d9f56efcd3948403bb82978 100644 (file)
--- a/getcwd.c
+++ b/getcwd.c
@@ -71,7 +71,7 @@
 # endif
 #endif
 
-#include <compat.h>
+#include <missing.h>
 
 #define        ISDOT(dp) \
        (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
index 928246b883fa285770ea18e98ddb8f53032e6ca2..8538fe3672af924f658c1f87e157413827f8751a 100644 (file)
--- a/getdate.c
+++ b/getdate.c
@@ -50,7 +50,7 @@
 #endif
 #include <ctype.h>
 
-#include "compat.h"
+#include "missing.h"
 
 
 #define EPOCH          1970
index 2b2e3c9b365edaff8f2c4cfef44f10a93bcb67dc..709408319f5c32298022e0033b5c47d9c4596ed8 100644 (file)
--- a/getdate.y
+++ b/getdate.y
@@ -39,7 +39,7 @@
 #endif
 #include <ctype.h>
 
-#include "compat.h"
+#include "missing.h"
 
 
 #define EPOCH          1970
index b7db37973d59cb7a18ef9ca4465f519d35574b8a..83a325f39ba9105845294bd34456bd56e19bd9fe 100644 (file)
--- a/getline.c
+++ b/getline.c
@@ -35,7 +35,7 @@
 #endif /* HAVE_STRINGS_H */
 #include <limits.h>
 
-#include "compat.h"
+#include "missing.h"
 #include "alloc.h"
 
 #ifndef LINE_MAX
index f269405d0cdb271031de0e5e4565d29ea39b2e3f..96aa0bd0a605cfeb411cb8bf1118d3bc8157f3c4 100644 (file)
@@ -22,7 +22,7 @@
 #include <string.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 const char *
 getprogname()
index 9a13003c4f9eb85984322ba9c2b8293511438071..656b3ec071e6f5ca99eddba60dcb104c0907aa60 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -24,7 +24,7 @@
 # include <time.h>
 #endif
 
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Get the current time via gettimeofday() for systems with
diff --git a/glob.c b/glob.c
index 9ffce32088749e91b7cc351bc361ad29d4a188f9..876eee6ae54fae219b6bacbae8bc94a5266e27d0 100644 (file)
--- a/glob.c
+++ b/glob.c
@@ -95,7 +95,7 @@
 #include <limits.h>
 #include <pwd.h>
 
-#include <compat.h>
+#include <missing.h>
 #include "emul/glob.h"
 #include "emul/charclass.h"
 
index e6ad58d4951c86fe39ce640e834c706507af7c20..b8732b2bf886b71e549ac738a9f33fa52c0ed1f5 100644 (file)
--- a/isblank.c
+++ b/isblank.c
@@ -15,7 +15,7 @@
  */
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 #undef isblank
 int
index ba87e788517bfa5312907709fe4b9281d56107b3..dabf6b33a0a633840c22a9004e91d64150655971 100644 (file)
 #include <string.h>
 #include <libaudit.h>
 
-#include "compat.h"
+#include "missing.h"
 #include "error.h"
 #include "alloc.h"
-#include "missing.h"
 #include "linux_audit.h"
 
 /*
index 35e07de5f0464ffeefbba7532359067112e5eb40..80a25f64f3ccf97829a861655ce190382f3993d7 100644 (file)
--- a/memrchr.c
+++ b/memrchr.c
@@ -16,7 +16,7 @@
 
 #include <sys/types.h>
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Reverse memchr()
index 749323a94ce725097294e034529b8491219d3b5b..d471603eb469b88682722ab6ec4c2660167f0ad8 100644 (file)
--- a/missing.h
+++ b/missing.h
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2009-2010 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2005, 2008-2010
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
  */
 
 #ifndef _SUDO_MISSING_H
 #define _SUDO_MISSING_H
 
+/*
+ * Macros that may be missing on some Operating Systems
+ */
+
+/* Deal with ANSI stuff reasonably.  */
+#ifndef  __P
+# if defined (__cplusplus) || defined (__STDC__)
+#  define __P(args)            args
+# else
+#  define __P(args)            ()
+# endif
+#endif /* __P */
+
+/* Define away __attribute__ for non-gcc or old gcc */
+#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5
+# define __attribute__(x)
+#endif
+
+/* For silencing gcc warnings about rcsids */
+#ifndef __unused
+# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7)
+#  define __unused     __attribute__((__unused__))
+# else
+#  define __unused
+# endif
+#endif
+
+/* For catching format string mismatches */
+#ifndef __printflike
+# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+#  define __printflike(f, v)   __attribute__((__format__ (__printf__, f, v)))
+# else
+#  define __printflike(f, v)
+# endif
+#endif
+
+/*
+ * Some systems lack full limit definitions.
+ */
+#ifndef OPEN_MAX
+# define OPEN_MAX      256
+#endif
+
+#ifndef INT_MAX
+# define INT_MAX       0x7fffffff
+#endif
+
+#ifndef PATH_MAX
+# ifdef MAXPATHLEN
+#  define PATH_MAX             MAXPATHLEN
+# else
+#  ifdef _POSIX_PATH_MAX
+#   define PATH_MAX            _POSIX_PATH_MAX
+#  else
+#   define PATH_MAX            1024
+#  endif
+# endif
+#endif
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN                64
+#endif
+
+/*
+ * Posix versions for those without...
+ */
+#ifndef _S_IFMT
+# define _S_IFMT               S_IFMT
+#endif /* _S_IFMT */
+#ifndef _S_IFREG
+# define _S_IFREG              S_IFREG
+#endif /* _S_IFREG */
+#ifndef _S_IFDIR
+# define _S_IFDIR              S_IFDIR
+#endif /* _S_IFDIR */
+#ifndef _S_IFLNK
+# define _S_IFLNK              S_IFLNK
+#endif /* _S_IFLNK */
+#ifndef S_ISREG
+# define S_ISREG(m)            (((m) & _S_IFMT) == _S_IFREG)
+#endif /* S_ISREG */
+#ifndef S_ISDIR
+# 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 */
+
+/*
+ * These should be defined in <unistd.h> 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
+
+/*
+ * These should be defined in <unistd.h> but not everyone has them.
+ */
+#ifndef SEEK_SET
+# define       SEEK_SET        0
+#endif
+#ifndef SEEK_CUR
+# define       SEEK_CUR        1
+#endif
+#ifndef SEEK_END
+# define       SEEK_END        2
+#endif
+
+/*
+ * BSD defines these in <sys/param.h> but others may not.
+ */
+#ifndef MIN
+# define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+#ifndef MAX
+# define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+
+/*
+ * Simple isblank() macro and function for systems without it.
+ */
+#ifndef HAVE_ISBLANK
+int isblank __P((int));
+# define isblank(_x)   ((_x) == ' ' || (_x) == '\t')
+#endif
+
+/*
+ * Old BSD systems lack strchr(), strrchr(), memset() and memcpy()
+ */
+#if !defined(HAVE_STRCHR) && !defined(strchr)
+# define strchr(_s, _c)        index(_s, _c)
+#endif
+#if !defined(HAVE_STRRCHR) && !defined(strrchr)
+# define strrchr(_s, _c)       rindex(_s, _c)
+#endif
+#if !defined(HAVE_MEMCPY) && !defined(memcpy)
+# define memcpy(_d, _s, _n)    (bcopy(_s, _d, _n))
+#endif
+#if !defined(HAVE_MEMSET) && !defined(memset)
+# define memset(_s, _x, _n)    (bzero(_s, _n))
+#endif
+
+/*
+ * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason.
+ */
+#ifdef HAVE__INNETGR
+# define innetgr(n, h, u, d)   (_innetgr(n, h, u, d))
+# 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 */
+
+/*
+ * Emulate POSIX signals via sigvec(2)
+ */
+#ifndef HAVE_SIGACTION
+# define SA_ONSTACK    SV_ONSTACK
+# define SA_RESTART    SV_INTERRUPT            /* opposite effect */
+# define SA_RESETHAND  SV_RESETHAND
+# define sa_handler    sv_handler
+# define sa_mask       sv_mask
+# define sa_flags      sv_flags
+typedef struct sigvec sigaction_t;
+typedef int sigset_t;
+int sigaction __P((int sig, const sigaction_t *act, sigaction_t *oact));
+int sigemptyset __P((sigset_t *));
+int sigfillset __P((sigset_t *));
+int sigaddset __P((sigset_t *, int));
+int sigdelset __P((sigset_t *, int));
+int sigismember __P((sigset_t *, int));
+int sigprocmask __P((int, const sigset_t *, sigset_t *));
+#endif
+
+/*
+ * Extra sugar for POSIX signals to deal with the above emulation
+ * as well as the fact that SunOS has a SA_INTERRUPT flag.
+ */
+#ifdef HAVE_SIGACTION
+# ifndef HAVE_SIGACTION_T
+typedef struct sigaction sigaction_t;
+# endif
+# ifndef SA_INTERRUPT
+#  define SA_INTERRUPT 0
+# endif
+# ifndef SA_RESTART
+#  define SA_RESTART   0
+# endif
+#endif
+
+/*
+ * If dirfd() does not exists, hopefully dd_fd does.
+ */
+#if !defined(HAVE_DIRFD) && defined(HAVE_DD_FD)
+# define dirfd(_d)     ((_d)->dd_fd)
+# define HAVE_DIRFD
+#endif
+
+/*
+ * Define futimes() in terms of futimesat() if needed.
+ */
+#if !defined(HAVE_FUTIMES) && defined(HAVE_FUTIMESAT)
+# define futimes(_f, _tv)      futimesat(_f, NULL, _tv)
+# define HAVE_FUTIMES
+#endif
+
+#if !defined(HAVE_KILLPG) && !defined(killpg)
+# define killpg(s)     kill(-(s))
+#endif
+
+/*
+ * If we lack getprogname(), emulate with __progname if possible.
+ * Otherwise, add a prototype for use with our own getprogname.c.
+ */
+#ifndef HAVE_GETPROGNAME
+# ifdef HAVE___PROGNAME
+extern const char *__progname;
+#  define getprogname()          (__progname)
+# else
+const char *getprogname __P((void));
+#endif /* HAVE___PROGNAME */
+#endif /* !HAVE_GETPROGNAME */
+
+#ifndef timevalclear
+# define timevalclear(tv)      ((tv)->tv_sec = (tv)->tv_usec = 0)
+#endif
+#ifndef timevalisset
+# define timevalisset(tv)      ((tv)->tv_sec || (tv)->tv_usec)
+#endif
+#ifndef timevalcmp
+# define timevalcmp(tv1, tv2, op)                                             \
+    (((tv1)->tv_sec == (tv2)->tv_sec) ?                                               \
+       ((tv1)->tv_usec op (tv2)->tv_usec) :                                   \
+       ((tv1)->tv_sec op (tv2)->tv_sec))
+#endif
+#ifndef timevaladd
+# define timevaladd(tv1, tv2)                                                 \
+    do {                                                                      \
+       (tv1)->tv_sec += (tv2)->tv_sec;                                        \
+       (tv1)->tv_usec += (tv2)->tv_usec;                                      \
+       if ((tv1)->tv_usec >= 1000000) {                                       \
+           (tv1)->tv_sec++;                                                   \
+           (tv1)->tv_usec -= 1000000;                                         \
+       }                                                                      \
+    } while (0)
+#endif
+#ifndef timevalsub
+# define timevalsub(tv1, tv2)                                                 \
+    do {                                                                      \
+       (tv1)->tv_sec -= (tv2)->tv_sec;                                        \
+       (tv1)->tv_usec -= (tv2)->tv_usec;                                      \
+       if ((tv1)->tv_usec < 0) {                                              \
+           (tv1)->tv_sec--;                                                   \
+           (tv1)->tv_usec += 1000000;                                         \
+       }                                                                      \
+    } while (0)
+#endif
+
+/* Not all systems define NSIG in signal.h */
+#if !defined(NSIG)
+# if defined(_NSIG)
+#  define NSIG _NSIG
+# elif defined(__NSIG)
+#  define NSIG __NSIG
+# else
+#  define NSIG 64
+# endif
+#endif
+
+#ifndef WCOREDUMP
+# define WCOREDUMP(x)  ((x) & 0x80)
+#endif
+
+#include <stdio.h>
 #ifdef __STDC__
 # include <stdarg.h>
 #else
index 09b141419a8bd2ae0d98d9dbc316565e05cec00a..94ac1abf89cf6ab6026b4c62df2e68dc40b6a4d9 100644 (file)
@@ -28,7 +28,7 @@
 #endif /* STDC_HEADERS */
 #include <signal.h>
 
-#include <compat.h>
+#include <missing.h>
 
 int
 main(argc, argv)
@@ -42,7 +42,7 @@ main(argc, argv)
 
     printf("#include <config.h>\n");
     printf("#include <signal.h>\n");
-    printf("#include <compat.h>\n\n");
+    printf("#include <missing.h>\n\n");
     printf("const char *const my_sys_siglist[NSIG] = {\n");
     for (i = 0; i < NSIG; i++) {
        if (my_sys_siglist[i] != NULL) {
index ae2208b95e39ee0e5c9607a115646f1c8ed9c2d0..b7fb50729123fca589046fbe67dc78a38dec85f1 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 #include <errno.h>
 
-#include "compat.h"
+#include "missing.h"
 
 int
 nanosleep(ts, rts)
diff --git a/sesh.c b/sesh.c
index 3195e25b9e8f429a315e7c203f8057376de7dab7..40016140b845665499a63211d48e60a0ce1adc5c 100644 (file)
--- a/sesh.c
+++ b/sesh.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "compat.h"
+#include "missing.h"
 
 int
 main (int argc, char **argv)
index d8bba8b30e5668daa6af118515eaf2e6180d9874..80c620c9ca8e620f202601d64ccc36d62a76e190 100644 (file)
--- a/setsid.c
+++ b/setsid.c
@@ -26,7 +26,7 @@
 #endif /* HAVE_UNISTD_H */
 
 #include <pathnames.h>
-#include <compat.h>
+#include <missing.h>
 
 pid_t
 setsid()
index e34d471c803e587bae82548466728c010d8f95ea..824917bb4f3e4d94934f588e0dba618e70228b54 100644 (file)
@@ -21,7 +21,7 @@
 #include <signal.h>
 #include <errno.h>
 
-#include <compat.h>
+#include <missing.h>
 
 int
 sigaction(signo, sa, osa)
index 4123a9d77464fcc8ea6c0ff0e94a65372b50816f..2ef67356a3f8c194b1e0c2f05384b4f5ee63bc24 100644 (file)
@@ -76,7 +76,7 @@
 # include <varargs.h>
 #endif
 
-#include <compat.h>
+#include <missing.h>
 
 static int xxxprintf    __P((char **, size_t, int, const char *, va_list));
 
index d14fdfb382661f4231bf4251479f2404b93f43e5..3298b42e99edb20e542f3e80f8f4a3a8509d8698 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <sys/types.h>
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Case insensitive string compare routines, same semantics as str[n]cmp()
index cacd3f634e1d2d48f2b9cc0362937ad6d6854cae..0cd995dafba6c4d76d8296345f9356fec6ac3841 100644 (file)
@@ -22,7 +22,7 @@
 #include <errno.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Map errno -> error string.
index 97a803b20bdb46bd76bb4a2f0b789017120c9f9b..6f94a09844cd296fb898e26dc8eb2d4bb72c2317 100644 (file)
--- a/strlcat.c
+++ b/strlcat.c
@@ -20,8 +20,7 @@
 #include <string.h>
 
 #include <config.h>
-#include <compat.h>
-
+#include <missing.h>
 
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
index 8d301c3a5c2408acbc3e5f75cce6d48227e6690c..175b137b7c3597e3654f5df58c455f66c4bfc191 100644 (file)
--- a/strlcpy.c
+++ b/strlcpy.c
@@ -19,7 +19,7 @@
 #include <sys/types.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
index cead4ada194bad133487a0c64bea5bb4e15f4418..8414f646affd1bdd1efcddc6a7b45168616045ac 100644 (file)
@@ -18,7 +18,7 @@
 #include <signal.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1
 # define my_sys_siglist        sys_siglist
diff --git a/sudo.h b/sudo.h
index 2e734cc1c54a8b7b0fce9130d49258f84e120014..06558898bd92a4f81d80cf54733299d36f4a53ca 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -24,7 +24,7 @@
 
 #include <pathnames.h>
 #include <limits.h>
-#include "compat.h"
+#include "missing.h"
 #include "alloc.h"
 #include "defaults.h"
 #include "error.h"
index eff07b9ee68aedf2a094cc89d3d08bacbebf659f..3632207b8cabc46187204c39c48420f4a6e1b041 100644 (file)
@@ -26,7 +26,7 @@
 # include <varargs.h>
 #endif
 
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Dummy versions of the execve() family of syscalls.  We don't need
index 98cde87aabc45a1e83e660fa22ad62fa29d6a85e..4c4711e911230360ce9164c74d897288b3a45eea 100644 (file)
 
 #include <pathnames.h>
 
-#include "compat.h"
+#include "missing.h"
 #include "alloc.h"
 #include "error.h"
-#include "missing.h"
 
 #ifndef LINE_MAX
 # define LINE_MAX 2048
index 3b2a18dd7f2e43b137b01df92bb73aa45a6f19fd..d2fce9c45163213a18f556867705bc856379aece 100644 (file)
--- a/timestr.c
+++ b/timestr.c
@@ -28,7 +28,7 @@
 #endif /* STDC_HEADERS */
 #include <time.h>
 
-#include "compat.h"
+#include "missing.h"
 
 char *get_timestr      __P((time_t, int));
 
index 84f4c433cb6d8c7c52dd26b818f9a26b814609b0..2f1e0e044f7cc5955fc3316c8a8d81aab91e87ba 100644 (file)
--- a/utimes.c
+++ b/utimes.c
@@ -29,7 +29,7 @@
 # include <emul/utime.h>
 #endif
 
-#include <compat.h>
+#include <missing.h>
 
 #ifndef HAVE_UTIMES
 /*
index a7c6c34fbd181ecd6444f1127b24706f89e18f9c..158c0390977e1ac0ffde55342d18925936f0ae79 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <vas.h>
 
-#include "compat.h"
+#include "missing.h"
 #include "logging.h"
 #include "nonunix.h"
 #include "sudo.h"
index 7391780aa0c9a938a771455f54e89a02a7db968e..efe0f9f6c8be0a97f09bab676b75ce9931952bc7 100644 (file)
@@ -17,7 +17,7 @@
 #include <sys/types.h>
 
 #include <config.h>
-#include <compat.h>
+#include <missing.h>
 
 /*
  * Like bzero(3) but with a volatile pointer.  The hope is that