mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: use minmax.h instead of rolling our own
* gl/lib/mbsalign.c, gl/lib/randread.c, src/system.h (MAX, MIN): Remove; include minmax.h instead. * gl/modules/mbsalign, gl/modules/randread (Depends-on): Add minmax. * src/factor.c (MIN): Remove.
This commit is contained in:
1 parent
9f8a38414b
commit
ea02406748
6 files changed
+6
-17
No files matched your search
+2
-4
@@ -19,6 +19,8 @@
|
||||
#include <config.h>
|
||||
#include "mbsalign.h"
|
||||
|
||||
#include "minmax.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -28,10 +30,6 @@
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/* Replace non printable chars.
|
||||
Note \t and \n etc. are non printable.
|
||||
Return 1 if replacement made, 0 otherwise. */
|
||||
|
||||
+1
-4
@@ -40,15 +40,12 @@
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
|
||||
#include "minmax.h"
|
||||
#include "rand-isaac.h"
|
||||
#include "stdio-safer.h"
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#if _STRING_ARCH_unaligned || _STRING_INLINE_unaligned
|
||||
# define ALIGNED_POINTER(ptr, type) true
|
||||
#else
|
||||
|
||||
@@ -6,6 +6,7 @@ lib/mbsalign.c
|
||||
lib/mbsalign.h
|
||||
|
||||
Depends-on:
|
||||
minmax
|
||||
wchar
|
||||
wctype
|
||||
wcwidth
|
||||
|
||||
@@ -14,6 +14,7 @@ inline
|
||||
fopen-safer
|
||||
getrandom
|
||||
quote
|
||||
minmax
|
||||
stdalign
|
||||
stdbool
|
||||
stdint
|
||||
|
||||
@@ -1950,7 +1950,6 @@ static const unsigned short invtab[0x81] =
|
||||
# define Q_FREQ_SIZE 50
|
||||
/* Element 0 keeps the total */
|
||||
static unsigned int q_freq[Q_FREQ_SIZE + 1];
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#if USE_SQUFOF
|
||||
|
||||
+1
-8
@@ -380,14 +380,7 @@ enum
|
||||
exit (EXIT_SUCCESS); \
|
||||
break;
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#include "minmax.h"
|
||||
#include "intprops.h"
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
|
||||
Reference in new issue
Block a user