Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2006 10:48:14 +0200
From:      Gary Jennejohn <garyj@jennejohn.org>
To:        Serge Gagnon <serge.gagnon@b2b2c.ca>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: locale_t (linux?) question 
Message-ID:  <200605260848.k4Q8mEPI003262@peedub.jennejohn.org>
In-Reply-To: Message from serge.gagnon@b2b2c.ca (Serge Gagnon) of "Fri, 26 May 2006 01:30:33 EDT." <0IZU0066VXYYWDD0@VL-MO-MR003.ip.videotron.ca> 

next in thread | previous in thread | raw e-mail | index | archive | help

Serge Gagnon writes:
> I searche on google about this locale_t to find some information to know 
> how I can fix it but I didn't found anything useful. Just that locale_t can 
> be a structure or a pointer on a structure... Not really helpful.
> 
> Is there someone here who can help me with this ?
> 

In the Linux sources I have locale_t is a typedef for __localte_t and is
set in /usr/include/locale.h. __locale_t is defined in
/usr/include/xlocale.h as a pointer to a struct __locale_struct which
contains a bunch of pointers. This is what it looks like:

/* Structure for reentrant locale using functions.  This is an
   (almost) opaque type for the user level programs.  The file and
   this data structure is not standardized.  Don't rely on it.  It can
   go away without warning.  */
typedef struct __locale_struct
{
  /* Note: LC_ALL is not a valid index into this array.  */
  struct locale_data *__locales[13]; /* 13 = __LC_LAST. */

  /* To increase the speed of this solution we add some special members.  */
  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;

  /* Note: LC_ALL is not a valid index into this array.  */
  const char *__names[13];
} *__locale_t;

Strangely enough I couldn't find a definition of locale_data in any of the
7 trees which I have.

---
Gary Jennejohn / garyjATjennejohnDOTorg gjATfreebsdDOTorg garyjATdenxDOTde




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605260848.k4Q8mEPI003262>