[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] [PATCH 19/19] maint: remove hard-coded macro definitions
From: |
Jim Meyering |
Subject: |
[bug-diffutils] [PATCH 19/19] maint: remove hard-coded macro definitions provided by intprops.h |
Date: |
Fri, 20 Nov 2009 10:12:28 +0100 |
From: Jim Meyering <address@hidden>
* lib/cmpbuf.c: Include "intprops.h" rather than open-coding macros
like TYPE_SIGNED and TYPE_MINIMUM.
---
lib/cmpbuf.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/lib/cmpbuf.c b/lib/cmpbuf.c
index 63a5175..2de579f 100644
--- a/lib/cmpbuf.c
+++ b/lib/cmpbuf.c
@@ -40,23 +40,7 @@
#include <sys/types.h>
#include "cmpbuf.h"
-
-/* Determine whether an integer type is signed, and its bounds.
- This code assumes two's (or one's!) complement with no holes. */
-
-/* The extra casts work around common compiler bugs,
- e.g. Cray C 5.0.3.0 when t == time_t. */
-#ifndef TYPE_SIGNED
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-#endif
-#ifndef TYPE_MINIMUM
-# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
- ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
- : (t) 0))
-#endif
-#ifndef TYPE_MAXIMUM
-# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
-#endif
+#include "intprops.h"
#ifndef PTRDIFF_MAX
# define PTRDIFF_MAX TYPE_MAXIMUM (ptrdiff_t)
--
1.6.5.3.433.g11067
- [bug-diffutils] [PATCH 01/19] tests: add the first script; hook up gnulib-tests, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 06/19] build: avoid link failure when libsigsegv is used, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 05/19] maint: define/use PROGRAM_NAME and AUTHORS; use propername module, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 14/19] build: enable many warnings, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 02/19] sdiff, diff3: exec diff, not $(bindir)/diff, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 19/19] maint: remove hard-coded macro definitions provided by intprops.h,
Jim Meyering <=
- [bug-diffutils] [PATCH 04/19] maint: no longer define *_FILENO constants, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 12/19] build: update gnulib submodule to latest, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 17/19] build: suppress warnings about bindtextdomain and textdomain, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 15/19] use xfreopen rather than freopen, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 10/19] build: let automake generate better man-installation rules, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 11/19] maint: hide build commands behind $(AM_V_GEN), Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 18/19] maint: add gnulib's announce-gen module, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 16/19] build: use more gnulib modules, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 13/19] build: "make stable" emitted an invalid gnupload command, Jim Meyering, 2009/11/20
- [bug-diffutils] [PATCH 07/19] admin: ignore all of gnulib-tests, Jim Meyering, 2009/11/20