From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Access to localized_str_tolower() |
Date: | 2008-07-01 17:38:19 |
Message-ID: | 200807011738.m61HcJv29938@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David E. Wheeler wrote:
> Howdy,
>
> In my original implementation of citext, which I'm going to start
> using for an app I'm developing, I pull in the wstring_lower function
> from oracle_compat.c by simply declaring it at the top of citext.c,
> just as if it were in an include file:
>
> extern char * wstring_lower (char *str);
>
> After I ported it to CVS HEAD, however, and discovered the
> str_tolower() function in formatting.c, I wanted to try to make use of
> it in 8.3, as well. But when I tried to include it in citext.c, it
> simply didn't work. I put this at the top of citext.c:
>
> extern char * localized_str_tolower(char *buff);
>
> But when I try to use it, like so:
>
> lcstr = localized_str_tolower(VARDATA_ANY(left));
> rcstr = localized_str_tolower(VARDATA_ANY(right));
>
> I get a compile-time error:
>
> Undefined symbols:
> "_localized_str_tolower", referenced from:
> _citextcmp in citext.o
> _citextcmp in citext.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [citext.so] Error 1
>
> So, stupid C question, I'm sure: How can I use this function from my
> module?
>
> Oh, and on a side note, should I localized_str_tolower() or just
> str_tolower()?
I am not sure what localized_str_tolower() is but I think you should
call str_tolower directly if you want to pass char*, and lower() if you
want to pass 'text'.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2008-07-01 17:45:30 | Re: Access to localized_str_tolower() |
Previous Message | David E. Wheeler | 2008-07-01 17:33:03 | Access to localized_str_tolower() |