[Date Prev][Date Next]
include/ac/localize.h breaks back-perl (ITS#2513)
Full_Name: Hallvard B. Furuseth
Submission from: (NULL) (220.127.116.11)
include/ac/localize.h breaks back-perl:
- The definition
# define setlocale(c,l) /* empty */
breaks the declaration of setlocale() in <locale.h>.
Fix: To conditionally define setlocale, #define something
like ldap_pvt_setlocale() instead, and call that instead
of setlocale in clients/tools/common.c.
- ac/localize.h #defines the macro `_', which Perl uses for
The simplest fix is to move
out of portable.h and into the files that need it, and if
it is later used in back-perl, to put it after the Perl
#include files with `#undef _' in front of it.
If that's unacceptable, another fix *at the moment* is to put
`#undef _' after `#include "portable.h"' in back-perl/*.c. I
expect that's insufficient in the long run since back-perl
then can't be localized properly.
One fix which apparently would not work is to move
in front of the other #include files, followed by `#undef _'.
The problem with this is that asperl_undefs.h does an #ifdef on
HAVE_WIN32_ASPERL, which it claims is #defined in portable.h.
However, I can't find it in portable.h or any other file. Are
this symbol and asperl_undefs.h obsolete, or has the support
for them been lost and should be reinstated?