X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Futimecmp.c;h=6a9087398bd09bdb8eb4873027ce9d729761494b;hb=5a21606b0d57082670bd060d169492c2f3a410f2;hp=7308929f43ed70b3567fbbc297a59e1b194acb7f;hpb=222b0486b7db1b09293e05512873d633440efcb3;p=gnulib.git
diff --git a/lib/utimecmp.c b/lib/utimecmp.c
index 7308929f4..6a9087398 100644
--- a/lib/utimecmp.c
+++ b/lib/utimecmp.c
@@ -1,11 +1,11 @@
/* utimecmp.c -- compare file time stamps
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,45 +13,30 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program. If not, see . */
/* Written by Paul Eggert. */
-#ifdef HAVE_CONFIG_H
-# include
-#endif
+#include
#include "utimecmp.h"
-#if HAVE_INTTYPES_H
-# include
-#endif
-#if HAVE_STDINT_H
-# include
-#endif
-
#include
#include
+#include
#include
+#include
#include "hash.h"
#include "intprops.h"
#include "stat-time.h"
-#include "timespec.h"
#include "utimens.h"
+#include "verify.h"
#include "xalloc.h"
-/* Verify a requirement at compile-time (unlike assert, which is runtime). */
-#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
-
#ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
enum { BILLION = 1000 * 1000 * 1000 };
/* Best possible resolution that utimens can set and stat can return,
@@ -139,8 +124,8 @@ utimecmp (char const *dst_name,
time_t might be unsigned. */
- verify (time_t_is_integer, TYPE_IS_INTEGER (time_t));
- verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int));
+ verify (TYPE_IS_INTEGER (time_t));
+ verify (TYPE_TWOS_COMPLEMENT (int));
/* Destination and source time stamps. */
time_t dst_s = dst_stat->st_mtime;