public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix build with latest GCC 4
@ 2005-03-25 12:27 Jakub Jelinek
  2005-03-25 20:02 ` Greg McGary
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2005-03-25 12:27 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

wordsize-64/wcstoul_l.c includes generic/wcstoul_l.c which
in turn includes wordsize-64/wcstol_l.c.  But the aliases
and libc_hidden_ver for strtol_l.c are not desirable in the ul compilation.

2005-03-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
	* sysdeps/wordsize-64/wcstol_l.c: Likewise.

--- libc/sysdeps/wordsize-64/strtol_l.c.jj	2003-03-03 04:45:12.000000000 -0500
+++ libc/sysdeps/wordsize-64/strtol_l.c	2005-03-24 08:09:38.970943112 -0500
@@ -8,7 +8,9 @@
 #undef ____strtoll_l_internal
 #undef __strtoll_l
 #undef strtoll_l
+#if !UNSIGNED
 strong_alias (____strtol_l_internal, ____strtoll_l_internal)
 libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
 weak_alias (__strtol_l, __strtoll_l)
 weak_alias (__strtol_l, strtoll_l)
+#endif
--- libc/sysdeps/wordsize-64/wcstol_l.c.jj	2002-08-08 07:44:51.000000000 -0400
+++ libc/sysdeps/wordsize-64/wcstol_l.c	2005-03-24 08:09:02.632875928 -0500
@@ -8,6 +8,8 @@
 #undef ____wcstoll_l_internal
 #undef __wcstoll_l
 #undef wcstoll_l
+#if !UNSIGNED
 strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
 weak_alias (__wcstol_l, __wcstoll_l)
 weak_alias (__wcstol_l, wcstoll_l)
+#endif

	Jakub

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix build with latest GCC 4
  2005-03-25 12:27 [PATCH] Fix build with latest GCC 4 Jakub Jelinek
@ 2005-03-25 20:02 ` Greg McGary
  2005-03-25 20:29   ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Greg McGary @ 2005-03-25 20:02 UTC (permalink / raw)
  To: Jakub Jelinek, Ulrich Drepper; +Cc: Glibc hackers, greg

Jakub Jelinek <jakub@redhat.com> writes:

> Hi!
> 
> wordsize-64/wcstoul_l.c includes generic/wcstoul_l.c which
> in turn includes wordsize-64/wcstol_l.c.  But the aliases
> and libc_hidden_ver for strtol_l.c are not desirable in the ul compilation.

This can also be fixed by short-cutting the diversion through
wordsize-64/wcstol_l.c, by including generic/wcstol_l.c directly from
generic/wcstoul_l.c:

Greg

2005-03-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/wcstoul_l.c: Include generic/wcstol_l.c,
        bypassing wordsize-64/wcstol_l.c in the 64-bit case.

Index: wcstoul_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/wcstoul_l.c,v
retrieving revision 1.4
diff -u -p -r1.4 wcstoul_l.c
--- wcstoul_l.c	14 Mar 2004 20:58:49 -0000	1.4
+++ wcstoul_l.c	25 Mar 2005 19:25:30 -0000
@@ -27,4 +27,4 @@
 extern unsigned long int ____wcstoul_l_internal (const wchar_t *, wchar_t **,
 						 int, int, __locale_t);
 
-#include <wcstol_l.c>
+#include <sysdeps/generic/wcstol_l.c>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix build with latest GCC 4
  2005-03-25 20:02 ` Greg McGary
@ 2005-03-25 20:29   ` Jakub Jelinek
  2005-03-25 20:58     ` Greg McGary
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2005-03-25 20:29 UTC (permalink / raw)
  To: Greg McGary; +Cc: Ulrich Drepper, Glibc hackers

On Fri, Mar 25, 2005 at 01:01:38PM -0700, Greg McGary wrote:
> This can also be fixed by short-cutting the diversion through
> wordsize-64/wcstol_l.c, by including generic/wcstol_l.c directly from
> generic/wcstoul_l.c:

Sure, but for both wcstoul_l.c and strtoul_l.c.
Or #include "wcstol_l.c" instead of #include <wcstol_l.c> would work
too.

	Jakub

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix build with latest GCC 4
  2005-03-25 20:29   ` Jakub Jelinek
@ 2005-03-25 20:58     ` Greg McGary
  2005-03-25 21:15       ` [PATCH] Fix build with latest GCC 4 (take 2) Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Greg McGary @ 2005-03-25 20:58 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers

Jakub Jelinek <jakub@redhat.com> writes:

> Sure, but for both wcstoul_l.c and strtoul_l.c.

strtoul_l.c already has #include "strtoul.c".
FYI, I didn't have compile failures for strtoul, only wcstoul_l.

> Or #include "wcstol_l.c" instead of #include <wcstol_l.c> would work
> too.

Yes, it does.  If we're happy with strtoul_l.c, we should follow the
same approach for wcstoul_l.c

Greg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Fix build with latest GCC 4 (take 2)
  2005-03-25 20:58     ` Greg McGary
@ 2005-03-25 21:15       ` Jakub Jelinek
  2005-03-28 19:29         ` Roland McGrath
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2005-03-25 21:15 UTC (permalink / raw)
  To: Ulrich Drepper, Greg McGary; +Cc: Glibc hackers

On Fri, Mar 25, 2005 at 01:57:57PM -0700, Greg McGary wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> 
> > Sure, but for both wcstoul_l.c and strtoul_l.c.
> 
> strtoul_l.c already has #include "strtoul.c".
> FYI, I didn't have compile failures for strtoul, only wcstoul_l.
> 
> > Or #include "wcstol_l.c" instead of #include <wcstol_l.c> would work
> > too.
> 
> Yes, it does.  If we're happy with strtoul_l.c, we should follow the
> same approach for wcstoul_l.c

This worked for me on ppc64.

2005-03-25  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/wcstoul_l.c: Include "wcstol_l.c" rather than
	<wcstol_l.c>.

--- libc/sysdeps/generic/wcstoul_l.c.jj	2004-03-15 09:13:16.000000000 +0100
+++ libc/sysdeps/generic/wcstoul_l.c	2005-03-25 22:00:30.000000000 +0100
@@ -1,5 +1,5 @@
 /* Convert string representing a number to integer value, using given locale.
-   Copyright (C) 1997, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -27,4 +27,4 @@
 extern unsigned long int ____wcstoul_l_internal (const wchar_t *, wchar_t **,
 						 int, int, __locale_t);
 
-#include <wcstol_l.c>
+#include "wcstol_l.c"

	Jakub

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix build with latest GCC 4 (take 2)
  2005-03-25 21:15       ` [PATCH] Fix build with latest GCC 4 (take 2) Jakub Jelinek
@ 2005-03-28 19:29         ` Roland McGrath
  0 siblings, 0 replies; 6+ messages in thread
From: Roland McGrath @ 2005-03-28 19:29 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

> 2005-03-25  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* sysdeps/generic/wcstoul_l.c: Include "wcstol_l.c" rather than
> 	<wcstol_l.c>.

I put this one in.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-28 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25 12:27 [PATCH] Fix build with latest GCC 4 Jakub Jelinek
2005-03-25 20:02 ` Greg McGary
2005-03-25 20:29   ` Jakub Jelinek
2005-03-25 20:58     ` Greg McGary
2005-03-25 21:15       ` [PATCH] Fix build with latest GCC 4 (take 2) Jakub Jelinek
2005-03-28 19:29         ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).