[PATCH v1] stdio-common/vfscanf-internal.c: Assume support for 'long long'

Alejandro Colomar alx@kernel.org
Tue Nov 11 13:29:28 GMT 2025


GCC supports 'long long' since essentially forever.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---

Hi!

This is even an internal file, so the requirement of GCC 12 makes this
code very obsolete, isn't it?


Have a lovely day!
Alex

 stdio-common/vfscanf-internal.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c
index c6361f74e0..8720cc300a 100644
--- a/stdio-common/vfscanf-internal.c
+++ b/stdio-common/vfscanf-internal.c
@@ -33,13 +33,6 @@
 #include <locale/localeinfo.h>
 #include <scratch_buffer.h>
 
-#ifdef	__GNUC__
-# define HAVE_LONGLONG
-# define LONGLONG	long long
-#else
-# define LONGLONG	long
-#endif
-
 /* Determine whether we have to handle `long long' at all.  */
 #if LONG_MAX == LONG_LONG_MAX
 # define need_longlong	0
@@ -1976,7 +1969,7 @@ digits_extended_fail:
 	      if (flags & NUMBER_SIGNED)
 		{
 		  if (need_longlong && (flags & LONGDBL))
-		    *ARG (LONGLONG int *) = num.q;
+		    *ARG (long long int *) = num.q;
 		  else if (need_long && (flags & LONG))
 		    *ARG (long int *) = num.l;
 		  else if (flags & SHORT)
@@ -1989,7 +1982,7 @@ digits_extended_fail:
 	      else
 		{
 		  if (need_longlong && (flags & LONGDBL))
-		    *ARG (unsigned LONGLONG int *) = num.uq;
+		    *ARG (unsigned long long int *) = num.uq;
 		  else if (need_long && (flags & LONG))
 		    *ARG (unsigned long int *) = num.ul;
 		  else if (flags & SHORT)

base-commit: 6dbaed693a2497e06292ad12b0c7dfea10e087b3
-- 
2.51.0



More information about the Libc-alpha mailing list