* [PATCH] Some _l fixes
@ 2002-08-27 15:28 Jakub Jelinek
2002-08-27 15:48 ` Roland McGrath
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2002-08-27 15:28 UTC (permalink / raw)
To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers
Hi!
This is just the part without *ftime_l changes...
The question which I still have:
a) should isascii_l and toascii_l be exported
b) what about strptime_l
2002-08-28 Jakub Jelinek <jakub@redhat.com>
* ctype/ctype.h (isascii_l, toascii_l): Define to _l counterparts.
* ctype/ctype-extn.c (isblank_l): Add weak alias.
* stdlib/strfmon_l.c (strfmon_l): Likewise.
* sysdeps/generic/strtol_l.c (strtol_l): Likewise.
* sysdeps/generic/strtoll_l.c (strtoll_l): Likewise.
* sysdeps/generic/strtoul_l.c (strtoul_l): Likewise.
* sysdeps/generic/strtoull_l.c (strtoull_l): Likewise.
* wctype/iswctype_l.c (iswctype_l): Likewise.
--- libc/ctype/ctype.h.jj 2002-08-08 10:39:15.000000000 +0200
+++ libc/ctype/ctype.h 2002-08-28 00:03:33.000000000 +0200
@@ -291,8 +291,8 @@ extern int toupper_l (int __c, __locale_
# define isblank_l(c,l) __isblank_l ((c), (l))
# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
-# define isascii_l(c,l) __isascii ((c), (l))
-# define toascii_l(c,l) __toascii ((c), (l))
+# define isascii_l(c,l) __isascii_l ((c), (l))
+# define toascii_l(c,l) __toascii_l ((c), (l))
# endif
# endif /* Not __NO_CTYPE. */
--- libc/ctype/ctype-extn.c.jj 2001-08-23 18:47:05.000000000 +0200
+++ libc/ctype/ctype-extn.c 2002-08-28 00:04:12.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -59,3 +59,4 @@ __isblank_l (int c, __locale_t l)
{
return __isctype_l (c, _ISblank, l);
}
+weak_alias (__isblank_l, isblank_l)
--- libc/stdlib/strfmon_l.c.jj 2001-08-23 18:49:14.000000000 +0200
+++ libc/stdlib/strfmon_l.c 2002-08-28 00:09:23.000000000 +0200
@@ -1,5 +1,5 @@
/* Formatting a monetary value according to the given locale.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -20,3 +20,5 @@
#define USE_IN_EXTENDED_LOCALE_MODEL 1
#include <strfmon.c>
+
+weak_alias (__strfmon_l, strfmon_l)
--- libc/sysdeps/generic/strtol_l.c.jj 2001-08-23 18:49:38.000000000 +0200
+++ libc/sysdeps/generic/strtol_l.c 2002-08-28 00:11:58.000000000 +0200
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,3 +26,5 @@ extern long int ____strtol_l_internal (c
__locale_t);
#include "strtol.c"
+
+weak_alias (__strtol_l, strtol_l)
--- libc/sysdeps/generic/strtoll_l.c.jj 2001-08-23 18:49:41.000000000 +0200
+++ libc/sysdeps/generic/strtoll_l.c 2002-08-28 00:12:23.000000000 +0200
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,3 +26,5 @@ extern long long int ____strtoll_l_inter
__locale_t);
#include <strtoll.c>
+
+weak_alias (__strtoll_l, strtoll_l)
--- libc/sysdeps/generic/strtoul_l.c.jj 2001-08-23 18:49:41.000000000 +0200
+++ libc/sysdeps/generic/strtoul_l.c 2002-08-28 00:12:56.000000000 +0200
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,3 +26,5 @@ extern unsigned long int ____strtoul_l_i
int, __locale_t);
#include "strtoul.c"
+
+weak_alias (__strtoul_l, strtoul_l)
--- libc/sysdeps/generic/strtoull_l.c.jj 2001-08-23 18:49:41.000000000 +0200
+++ libc/sysdeps/generic/strtoull_l.c 2002-08-28 00:13:13.000000000 +0200
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,3 +26,5 @@ extern unsigned long long int ____strtou
int, int, __locale_t);
#include <strtoull.c>
+
+weak_alias (__strtoull_l, strtoull_l)
--- libc/wctype/iswctype_l.c.jj 2001-08-23 18:51:43.000000000 +0200
+++ libc/wctype/iswctype_l.c 2002-08-28 00:05:05.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@@ -34,3 +34,4 @@ __iswctype_l (wint_t wc, wctype_t desc,
return wctype_table_lookup ((const char *) desc, wc);
}
+weak_alias (__iswctype_l, iswctype_l)
Jakub
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Some _l fixes
2002-08-27 15:28 [PATCH] Some _l fixes Jakub Jelinek
@ 2002-08-27 15:48 ` Roland McGrath
2002-08-29 0:17 ` Ulrich Drepper
0 siblings, 1 reply; 4+ messages in thread
From: Roland McGrath @ 2002-08-27 15:48 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers
I put in strftime_l and wcsftime_l. However, I noticed a problem.
They use some underlying locale-sensitive functions that have no *_l
versions. _nl_{get,parse}_* should probably just be replaced with versions
that take the struct locale_data * and have some space in that struct
to cache their state instead of using static variables, which then
needs a local lock. wcsftime uses mbsrtowc, and there is no mbsrtowc_l.
strptime uses some of the same problematical _nl_* functions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Some _l fixes
2002-08-27 15:48 ` Roland McGrath
@ 2002-08-29 0:17 ` Ulrich Drepper
2002-08-29 1:25 ` Roland McGrath
0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Drepper @ 2002-08-29 0:17 UTC (permalink / raw)
To: Roland McGrath; +Cc: Jakub Jelinek, Glibc hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roland McGrath wrote:
> I put in strftime_l and wcsftime_l. However, I noticed a problem.
> They use some underlying locale-sensitive functions that have no *_l
> versions. _nl_{get,parse}_* should probably just be replaced with versions
> that take the struct locale_data * and have some space in that struct
> to cache their state instead of using static variables, which then
> needs a local lock.
Good that you took care of this.
> wcsftime uses mbsrtowc, and there is no mbsrtowc_l.
I've implemented it today. Note that the function is not implemented.
I think that should be all for these functions then.
- --
- ---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE9bcqf2ijCOnn/RHQRAv1oAKC48P/08O10DA8WpP6ujnmokJwe2ACghfBF
Yg/pZJT8Qa5rS0gzzsy0WOI=
=JdQm
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Some _l fixes
2002-08-29 0:17 ` Ulrich Drepper
@ 2002-08-29 1:25 ` Roland McGrath
0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2002-08-29 1:25 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Jakub Jelinek, Glibc hackers
On Thu, Aug 29, 2002 at 12:17:51AM -0700, Ulrich Drepper wrote:
> > wcsftime uses mbsrtowc, and there is no mbsrtowc_l.
>
> I've implemented it today. Note that the function is not implemented.
Eh? Did you mean documented?
> I think that should be all for these functions then.
Yes, I think so. Note that I left the optimized __is*_l macros in ctype.h
alone, though all the other __*_l prototypes are gone. I figure libstdc++
should use these macros to be optimal and it would be ugly to have it replicate them.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-08-29 8:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-27 15:28 [PATCH] Some _l fixes Jakub Jelinek
2002-08-27 15:48 ` Roland McGrath
2002-08-29 0:17 ` Ulrich Drepper
2002-08-29 1:25 ` 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).