Mail Archives: djgpp-workers/2005/05/12/20:34:41
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f
|
X-Authenticated: | #27081556
|
From: | Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
|
To: | djgpp-workers AT delorie DOT com
|
Subject: | strtol.c, strtoll.c, strtoul.c and strtoull.c signedess issues
|
Date: | Fri, 13 May 2005 02:16:27 +0200
|
User-Agent: | KMail/1.5.1
|
MIME-Version: | 1.0
|
Message-Id: | <200505130216.27085.juan.guerrero@gmx.de>
|
X-Y-GMX-Trusted: | 0
|
Reply-To: | djgpp-workers AT delorie DOT com
|
I have tried to compile djgpp cvs sources using gcc 4.0.0 and I have found
some signedess issues that break the compilation process.
Regards,
Juan M. Guerrero
diff -aprNU3 djgpp.orig/src/libc/ansi/stdlib/strtol.c djgpp/src/libc/ansi/stdlib/strtol.c
--- djgpp.orig/src/libc/ansi/stdlib/strtol.c 2002-10-18 01:00:24.000000000 +0000
+++ djgpp/src/libc/ansi/stdlib/strtol.c 2005-05-13 01:54:16.000000000 +0000
@@ -88,6 +88,6 @@ strtol(const char *nptr, char **endptr,
else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? unconst(s, char *) - 1 : unconst(nptr, char *);
+ *endptr = any ? (char *)unconst(s, unsigned char *) - 1 : unconst(nptr, char *);
return acc;
}
diff -aprNU3 djgpp.orig/src/libc/ansi/stdlib/strtoll.c djgpp/src/libc/ansi/stdlib/strtoll.c
--- djgpp.orig/src/libc/ansi/stdlib/strtoll.c 2002-11-30 10:46:44.000000000 +0000
+++ djgpp/src/libc/ansi/stdlib/strtoll.c 2005-05-13 01:57:06.000000000 +0000
@@ -77,6 +77,6 @@ strtoll(const char *nptr, char **endptr,
else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? unconst(s, char *) - 1 : unconst(nptr, char *);
+ *endptr = any ? (char *)unconst(s, unsigned char *) - 1 : unconst(nptr, char *);
return acc;
}
diff -aprNU3 djgpp.orig/src/libc/ansi/stdlib/strtoul.c djgpp/src/libc/ansi/stdlib/strtoul.c
--- djgpp.orig/src/libc/ansi/stdlib/strtoul.c 2002-10-18 01:00:24.000000000 +0000
+++ djgpp/src/libc/ansi/stdlib/strtoul.c 2005-05-13 01:58:06.000000000 +0000
@@ -72,6 +72,6 @@ strtoul(const char *nptr, char **endptr,
else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? unconst(s, char *) - 1 : unconst(nptr, char *);
+ *endptr = any ? (char *)unconst(s, unsigned char *) - 1 : unconst(nptr, char *);
return acc;
}
diff -aprNU3 djgpp.orig/src/libc/ansi/stdlib/strtoull.c djgpp/src/libc/ansi/stdlib/strtoull.c
--- djgpp.orig/src/libc/ansi/stdlib/strtoull.c 2002-11-30 10:46:44.000000000 +0000
+++ djgpp/src/libc/ansi/stdlib/strtoull.c 2005-05-13 02:00:20.000000000 +0000
@@ -74,6 +74,6 @@ strtoull(const char *nptr, char **endptr
else if (neg)
acc = -acc;
if (endptr != 0)
- *endptr = any ? unconst(s, char *) - 1 : unconst(nptr, char *);
+ *endptr = any ? (char *)unconst(s, unsigned char *) - 1 : unconst(nptr, char *);
return acc;
}
- Raw text -