]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
build: remove MIN(...) macro in favor of Gnulib's minmax module 2107/head
authorDaiki Ueno <ueno@gnu.org>
Thu, 7 May 2026 04:10:13 +0000 (13:10 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 7 May 2026 06:58:24 +0000 (15:58 +0900)
Signed-off-by: Daiki Ueno <ueno@gnu.org>
lib/gnutls_int.h
src/common.c

index 3e5a8f36149357ca232d1ff7143690bbf3fa910d..7595c3f5568ef05f89e0be7e99ce709812f14840 100644 (file)
@@ -54,6 +54,7 @@ typedef int ssize_t;
 #include <time.h>
 
 #include "attribute.h"
+#include "minmax.h"
 
 #define ENABLE_ALIGN16
 
@@ -150,8 +151,6 @@ typedef int ssize_t;
  * supported groups/curves is not present */
 #define DEFAULT_EC_GROUP GNUTLS_GROUP_SECP256R1
 
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-
 typedef enum transport_t {
        GNUTLS_STREAM,
        GNUTLS_DGRAM
index 5441e345e7fa85c96ea5c1ea057c94358143b435..9921e99fe87bb4937af06ade914432c1ffaacc54 100644 (file)
@@ -37,6 +37,7 @@
 #include <time.h>
 #include "common.h"
 #include <unistd.h>
+#include "minmax.h"
 
 #ifndef _WIN32
 #include <signal.h>
@@ -1169,7 +1170,6 @@ void getenv_copy(char *str, size_t max_str_size, const char *envvar)
        return;
 }
 
-#define MIN(x, y) ((x) < (y)) ? (x) : (y)
 #define MAX_CACHE_TRIES 5
 int pin_callback(void *user, int attempt, const char *token_url,
                 const char *token_label, unsigned int flags, char *pin,