From: Todd C. Miller Date: Tue, 3 Mar 2015 23:57:55 +0000 (-0700) Subject: Remove compat/utime.h, it was only useful for ancient systems that X-Git-Tag: SUDO_1_8_13^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7edf7d984b63d6687ef70c94d6e52c65d9cc97b;p=sudo Remove compat/utime.h, it was only useful for ancient systems that are no longer capable of compiling sudo. --- diff --git a/MANIFEST b/MANIFEST index 69063841e..4a73dfd47 100644 --- a/MANIFEST +++ b/MANIFEST @@ -61,7 +61,6 @@ include/compat/nss_dbdefs.h include/compat/sha2.h include/compat/stdbool.h include/compat/timespec.h -include/compat/utime.h include/sudo_alloc.h include/sudo_compat.h include/sudo_conf.h diff --git a/config.h.in b/config.h.in index f7dcb7844..e66d2b2ba 100644 --- a/config.h.in +++ b/config.h.in @@ -835,9 +835,6 @@ /* Define to 1 if you have the `utimes' function. */ #undef HAVE_UTIMES -/* Define to 1 if you have the header file. */ -#undef HAVE_UTIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_UTMPX_H diff --git a/configure b/configure index 4a261880b..b233bf9b0 100755 --- a/configure +++ b/configure @@ -2641,7 +2641,6 @@ as_fn_append ac_header_list " malloc.h" as_fn_append ac_header_list " netgroup.h" as_fn_append ac_header_list " paths.h" as_fn_append ac_header_list " spawn.h" -as_fn_append ac_header_list " utime.h" as_fn_append ac_header_list " utmpx.h" as_fn_append ac_header_list " sys/sockio.h" as_fn_append ac_header_list " sys/bsdtypes.h" @@ -16830,8 +16829,6 @@ done - - diff --git a/configure.ac b/configure.ac index 29a453a19..fb6a8773e 100644 --- a/configure.ac +++ b/configure.ac @@ -2191,7 +2191,7 @@ AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_STDBOOL AC_HEADER_MAJOR -AC_CHECK_HEADERS_ONCE([malloc.h netgroup.h paths.h spawn.h utime.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h]) +AC_CHECK_HEADERS_ONCE([malloc.h netgroup.h paths.h spawn.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h]) AC_CHECK_HEADERS([endian.h] [sys/endian.h] [machine/endian.h], [break]) AC_CHECK_HEADERS([procfs.h] [sys/procfs.h], [AC_CHECK_MEMBERS(struct psinfo.pr_ttydev, [AC_CHECK_FUNCS([_ttyname_dev])], [], [AC_INCLUDES_DEFAULT #ifdef HAVE_PROCFS_H diff --git a/include/compat/utime.h b/include/compat/utime.h deleted file mode 100644 index 0a1eb86d5..000000000 --- a/include/compat/utime.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 1996, 1998-2005, 2010 - * Todd C. Miller - * - * 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. - */ - -#ifndef _UTIME_H -#define _UTIME_H - -struct utimbuf { - time_t actime; /* access time */ - time_t modtime; /* mod time */ -}; - -int utime(const char *, const struct utimbuf *); - -#endif /* _UTIME_H */ diff --git a/lib/util/Makefile.in b/lib/util/Makefile.in index fc300057e..28cc5daa3 100644 --- a/lib/util/Makefile.in +++ b/lib/util/Makefile.in @@ -535,7 +535,7 @@ ttysize.lo: $(srcdir)/ttysize.c $(incdir)/compat/stdbool.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(top_builddir)/config.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/ttysize.c -utimens.lo: $(srcdir)/utimens.c $(incdir)/compat/timespec.h \ - $(incdir)/compat/utime.h $(incdir)/sudo_compat.h \ - $(top_builddir)/config.h +utimens.lo: $(srcdir)/utimens.c $(incdir)/compat/stdbool.h \ + $(incdir)/compat/timespec.h $(incdir)/sudo_compat.h \ + $(incdir)/sudo_util.h $(top_builddir)/config.h $(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/utimens.c diff --git a/lib/util/utimens.c b/lib/util/utimens.c index 3a62e2900..165c82918 100644 --- a/lib/util/utimens.c +++ b/lib/util/utimens.c @@ -29,10 +29,8 @@ #ifndef HAVE_STRUCT_TIMESPEC # include "compat/timespec.h" #endif -#ifdef HAVE_UTIME_H +#if !defined(HAVE_UTIMES) || defined(HAVE_FUTIME) # include -#else -# include "compat/utime.h" #endif #include "sudo_compat.h"