From patchwork Mon Nov 10 14:17:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123968 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D03F13858C51 for ; Mon, 10 Nov 2025 14:27:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D03F13858C51 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=i+lgRkDu X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by sourceware.org (Postfix) with ESMTPS id 5DF0B3858D1E for ; Mon, 10 Nov 2025 14:17:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5DF0B3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5DF0B3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784256; cv=none; b=TdH7Y6IayVtXsRpZCHaGc+W6l4ywwiaPH2ikd6W2Sthn2kATNaL6FQzp0/MCxNsvOlVy0gt7Sn+AZb/xLV058Ekr4g7KO82nmSf+E2huWr+PTZuX71UhK/71t2sqf2AACXckpC33Ur+KhWruvEF2jrrCKDjUst5ktw8ycGPU+d8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784256; c=relaxed/simple; bh=jYpdpN71wU3RX4C8iXQfm8UoMh+MGdHSHdAE8M1CNMI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=pel/YZhvilkGGtuvdcFEpe6XUFmLaDh+KCdb9Vt28/ejvtKJxLJlGKozZ9760aCxDtSzW2l4VxHPyi6l+t0Z9Yviyg3/2DCX9CJeBvtAx7of4wH/83ETKuMfHSlkuaiIJWEsHlyFQtcGykLc+NRZ4D5LH2XJYIeMwdp23rmqlFE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DF0B3858D1E Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id AF5BC601A5; Mon, 10 Nov 2025 14:17:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5B0BC19424; Mon, 10 Nov 2025 14:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784255; bh=jYpdpN71wU3RX4C8iXQfm8UoMh+MGdHSHdAE8M1CNMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i+lgRkDuqBzQHm8DuWrQiY7avugUA7y4fabJtQeu1qaJUgVZz1Cb6cKJ6we8orqAO VesdRvzB02/2quipjc9xX5N6Q2gL3qmVYpmrN6akjb+8p0wfSgHa83FTrDPIdKnYOR VVeJVrJ32Iknp7XKqAgR+Hk1ailErIU7dXNjx96YPlkhbVwRpi+fZBGUci4PYIwCiN E6md2+R3GU1wgqtunfuLPYg5nikA8rSPFqzq0lMH+v/HQlRphNa6wJ1/Zt74TfIJpz Dcd47G4to1dkfJkrobTTQx4TQxJ/x8k2dPNMEy2lnWl7KZ56Y1aqcULqNbQORu/8W3 Rnvf/yS5J6LsA== Date: Mon, 10 Nov 2025 15:17:32 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 3/7] Assume support for __extension__ ({ }) Message-ID: <808bc3feff6085c4fb06c62a0445feb23e8fd15b.1762784073.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org /* Oh come on. Get a reasonable compiler. */ GCC supports __extension__ since at least GCC 2.8. GCC supports ({ }) since GCC 1.x. Signed-off-by: Alejandro Colomar --- assert/assert.h | 2 +- inet/netinet/in.h | 53 +++--------------- malloc/obstack.h | 140 ++++++---------------------------------------- stdlib/setenv.c | 3 +- time/strptime_l.c | 8 +-- 5 files changed, 27 insertions(+), 179 deletions(-) diff --git a/assert/assert.h b/assert/assert.h index 31892aebcb..273bf7f35c 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -101,7 +101,7 @@ __END_DECLS ? void (0) \ : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \ __ASSERT_FUNCTION)) -# elif !defined __GNUC__ || defined __STRICT_ANSI__ +# elif defined __STRICT_ANSI__ # define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ diff --git a/inet/netinet/in.h b/inet/netinet/in.h index fa796be406..28b93dd941 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -433,8 +433,7 @@ extern uint16_t htons (uint16_t __hostshort) # endif #endif -#ifdef __GNUC__ -# define IN6_IS_ADDR_UNSPECIFIED(a) \ +#define IN6_IS_ADDR_UNSPECIFIED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -442,7 +441,7 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == 0; })) -# define IN6_IS_ADDR_LOOPBACK(a) \ +#define IN6_IS_ADDR_LOOPBACK(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -450,24 +449,24 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == htonl (1); })) -# define IN6_IS_ADDR_LINKLOCAL(a) \ +#define IN6_IS_ADDR_LINKLOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); })) -# define IN6_IS_ADDR_SITELOCAL(a) \ +#define IN6_IS_ADDR_SITELOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); })) -# define IN6_IS_ADDR_V4MAPPED(a) \ +#define IN6_IS_ADDR_V4MAPPED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == htonl (0xffff); })) -# define IN6_IS_ADDR_V4COMPAT(a) \ +#define IN6_IS_ADDR_V4COMPAT(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -475,7 +474,7 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && ntohl (__a->__in6_u.__u6_addr32[3]) > 1; })) -# define IN6_ARE_ADDR_EQUAL(a,b) \ +#define IN6_ARE_ADDR_EQUAL(a,b) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ const struct in6_addr *__b = (const struct in6_addr *) (b); \ @@ -483,44 +482,6 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[1] == __b->__in6_u.__u6_addr32[1] \ && __a->__in6_u.__u6_addr32[2] == __b->__in6_u.__u6_addr32[2] \ && __a->__in6_u.__u6_addr32[3] == __b->__in6_u.__u6_addr32[3]; })) -#else -# define IN6_IS_ADDR_UNSPECIFIED(a) \ - (((const uint32_t *) (a))[0] == 0 \ - && ((const uint32_t *) (a))[1] == 0 \ - && ((const uint32_t *) (a))[2] == 0 \ - && ((const uint32_t *) (a))[3] == 0) - -# define IN6_IS_ADDR_LOOPBACK(a) \ - (((const uint32_t *) (a))[0] == 0 \ - && ((const uint32_t *) (a))[1] == 0 \ - && ((const uint32_t *) (a))[2] == 0 \ - && ((const uint32_t *) (a))[3] == htonl (1)) - -# define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfe800000)) - -# define IN6_IS_ADDR_SITELOCAL(a) \ - ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfec00000)) - -# define IN6_IS_ADDR_V4MAPPED(a) \ - ((((const uint32_t *) (a))[0] == 0) \ - && (((const uint32_t *) (a))[1] == 0) \ - && (((const uint32_t *) (a))[2] == htonl (0xffff))) - -# define IN6_IS_ADDR_V4COMPAT(a) \ - ((((const uint32_t *) (a))[0] == 0) \ - && (((const uint32_t *) (a))[1] == 0) \ - && (((const uint32_t *) (a))[2] == 0) \ - && (ntohl (((const uint32_t *) (a))[3]) > 1)) - -# define IN6_ARE_ADDR_EQUAL(a,b) \ - ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \ - && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \ - && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \ - && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3])) -#endif #define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff) diff --git a/malloc/obstack.h b/malloc/obstack.h index 1c74d85c9b..3e43a9a735 100644 --- a/malloc/obstack.h +++ b/malloc/obstack.h @@ -257,23 +257,17 @@ extern int obstack_exit_failure; #define obstack_memory_used(h) _obstack_memory_used (h) -#if defined __GNUC__ -/* For GNU C, if not -traditional, - we can define these macros to compute all args only once - without using a global variable. - Also, we can avoid using the 'temp' slot, to make faster code. */ - -# define obstack_object_size(OBSTACK) \ +#define obstack_object_size(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->next_free - __o->object_base); }) -# define obstack_room(OBSTACK) \ +#define obstack_room(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->chunk_limit - __o->next_free); }) -# define obstack_make_room(OBSTACK, length) \ +#define obstack_make_room(OBSTACK, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -281,7 +275,7 @@ extern int obstack_exit_failure; _obstack_newchunk (__o, __len); \ (void) 0; }) -# define obstack_empty_p(OBSTACK) \ +#define obstack_empty_p(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (__o->chunk->prev == 0 \ @@ -289,7 +283,7 @@ extern int obstack_exit_failure; __o->chunk->contents, \ __o->alignment_mask)); }) -# define obstack_grow(OBSTACK, where, length) \ +#define obstack_grow(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -299,7 +293,7 @@ extern int obstack_exit_failure; __o->next_free += __len; \ (void) 0; }) -# define obstack_grow0(OBSTACK, where, length) \ +#define obstack_grow0(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -310,7 +304,7 @@ extern int obstack_exit_failure; *(__o->next_free)++ = 0; \ (void) 0; }) -# define obstack_1grow(OBSTACK, datum) \ +#define obstack_1grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + 1 > __o->chunk_limit) \ @@ -322,21 +316,21 @@ extern int obstack_exit_failure; or ints, and that the data added so far to the current object shares that much alignment. */ -# define obstack_ptr_grow(OBSTACK, datum) \ +#define obstack_ptr_grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (void *)); \ obstack_ptr_grow_fast (__o, datum); }) \ -# define obstack_int_grow(OBSTACK, datum) \ +#define obstack_int_grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (int) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (int)); \ obstack_int_grow_fast (__o, datum); }) -# define obstack_ptr_grow_fast(OBSTACK, aptr) \ +#define obstack_ptr_grow_fast(OBSTACK, aptr) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__p1 = __o1->next_free; \ @@ -344,7 +338,7 @@ extern int obstack_exit_failure; __o1->next_free += sizeof (const void *); \ (void) 0; }) -# define obstack_int_grow_fast(OBSTACK, aint) \ +#define obstack_int_grow_fast(OBSTACK, aint) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__p1 = __o1->next_free; \ @@ -352,7 +346,7 @@ extern int obstack_exit_failure; __o1->next_free += sizeof (int); \ (void) 0; }) -# define obstack_blank(OBSTACK, length) \ +#define obstack_blank(OBSTACK, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -361,19 +355,19 @@ extern int obstack_exit_failure; obstack_blank_fast (__o, __len); \ (void) 0; }) -# define obstack_alloc(OBSTACK, length) \ +#define obstack_alloc(OBSTACK, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_blank (__h, (length)); \ obstack_finish (__h); }) -# define obstack_copy(OBSTACK, where, length) \ +#define obstack_copy(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow (__h, (where), (length)); \ obstack_finish (__h); }) -# define obstack_copy0(OBSTACK, where, length) \ +#define obstack_copy0(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow0 (__h, (where), (length)); \ @@ -381,7 +375,7 @@ extern int obstack_exit_failure; /* The local variable is named __o1 to avoid a name conflict when obstack_blank is called. */ -# define obstack_finish(OBSTACK) \ +#define obstack_finish(OBSTACK) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__value = (void *) __o1->object_base; \ @@ -396,7 +390,7 @@ extern int obstack_exit_failure; __o1->object_base = __o1->next_free; \ __value; }) -# define obstack_free(OBSTACK, OBJ) \ +#define obstack_free(OBSTACK, OBJ) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ void *__obj = (OBJ); \ @@ -404,106 +398,6 @@ extern int obstack_exit_failure; __o->next_free = __o->object_base = (char *) __obj; \ else (__obstack_free) (__o, __obj); }) -#else /* not __GNUC__ */ - -# define obstack_object_size(h) \ - (unsigned) ((h)->next_free - (h)->object_base) - -# define obstack_room(h) \ - (unsigned) ((h)->chunk_limit - (h)->next_free) - -# define obstack_empty_p(h) \ - ((h)->chunk->prev == 0 \ - && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \ - (h)->chunk->contents, \ - (h)->alignment_mask)) - -/* Note that the call to _obstack_newchunk is enclosed in (..., 0) - so that we can avoid having void expressions - in the arms of the conditional expression. - Casting the third operand to void was tried before, - but some compilers won't accept it. */ - -# define obstack_make_room(h, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0)) - -# define obstack_grow(h, where, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ - memcpy ((h)->next_free, where, (h)->temp.tempint), \ - (h)->next_free += (h)->temp.tempint) - -# define obstack_grow0(h, where, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \ - memcpy ((h)->next_free, where, (h)->temp.tempint), \ - (h)->next_free += (h)->temp.tempint, \ - *((h)->next_free)++ = 0) - -# define obstack_1grow(h, datum) \ - ((((h)->next_free + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), 1), 0) : 0), \ - obstack_1grow_fast (h, datum)) - -# define obstack_ptr_grow(h, datum) \ - ((((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ - obstack_ptr_grow_fast (h, datum)) - -# define obstack_int_grow(h, datum) \ - ((((h)->next_free + sizeof (int) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ - obstack_int_grow_fast (h, datum)) - -# define obstack_ptr_grow_fast(h, aptr) \ - (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) - -# define obstack_int_grow_fast(h, aint) \ - (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint)) - -# define obstack_blank(h, length) \ - ((h)->temp.tempint = (length), \ - (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ - obstack_blank_fast (h, (h)->temp.tempint)) - -# define obstack_alloc(h, length) \ - (obstack_blank ((h), (length)), obstack_finish ((h))) - -# define obstack_copy(h, where, length) \ - (obstack_grow ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_copy0(h, where, length) \ - (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_finish(h) \ - (((h)->next_free == (h)->object_base \ - ? (((h)->maybe_empty_object = 1), 0) \ - : 0), \ - (h)->temp.tempptr = (h)->object_base, \ - (h)->next_free \ - = __PTR_ALIGN ((h)->object_base, (h)->next_free, \ - (h)->alignment_mask), \ - (((h)->next_free - (char *) (h)->chunk \ - > (h)->chunk_limit - (char *) (h)->chunk) \ - ? ((h)->next_free = (h)->chunk_limit) : 0), \ - (h)->object_base = (h)->next_free, \ - (h)->temp.tempptr) - -# define obstack_free(h, obj) \ - ((h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \ - ((((h)->temp.tempint > 0 \ - && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \ - ? (void) ((h)->next_free = (h)->object_base \ - = (h)->temp.tempint + (char *) (h)->chunk) \ - : (__obstack_free) (h, (h)->temp.tempint + (char *) (h)->chunk))) - -#endif /* not __GNUC__ */ - #ifdef __cplusplus } /* C++ */ #endif diff --git a/stdlib/setenv.c b/stdlib/setenv.c index 2b8b6cafa0..0f325c5a20 100644 --- a/stdlib/setenv.c +++ b/stdlib/setenv.c @@ -70,8 +70,7 @@ __libc_lock_define_initialized (static, envlock) allow arbitrarily many changes of the environment given that the used values are from a small set. Outside glibc this will eat up all memory after a while. */ -#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ - && defined __GNUC__) +#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH) # define USE_TSEARCH 1 # include diff --git a/time/strptime_l.c b/time/strptime_l.c index f5e2f4f5d1..caf4a4c807 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -56,17 +56,11 @@ localtime_r (const time_t *t, struct tm *tp) #define match_char(ch1, ch2) if (ch1 != ch2) return NULL -#if defined __GNUC__ && __GNUC__ >= 2 -# define match_string(cs1, s2) \ +#define match_string(cs1, s2) \ ({ size_t len = strlen (cs1); \ int result = __strncasecmp_l ((cs1), (s2), len, locale) == 0; \ if (result) (s2) += len; \ result; }) -#else -/* Oh come on. Get a reasonable compiler. */ -# define match_string(cs1, s2) \ - (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) -#endif /* We intentionally do not use isdigit() for testing because this will lead to problems with the wide character version. */ #define get_number(from, to, n) \