Full_Name: Hallvard B. Furuseth Version: HEAD OS: Solaris URL: Submission from: (NULL) (129.240.186.42) 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 prototypes. The simplest fix is to move #include <ac/localize.h> 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 #include "asperl_undefs.h" #include <EXTERN.h> #include <perl.h> 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?
> -----Original Message----- > From: owner-openldap-bugs@OpenLDAP.org > [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of h.b.furuseth@usit.uio.no > One fix which apparently would not work is to move > #include "asperl_undefs.h" > #include <EXTERN.h> > #include <perl.h> > 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? The HAVE_WIN32_ASPERL macro is obsolete. I suppose that means the asperl_undefs.h file is also obsolete, but I haven't built perl on Windows in a long time. -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support
moved from Incoming to Development
Howard Chu writes: >h.b.furuseth@usit.uio.no >> >> One fix which apparently would not work is to move >> #include "asperl_undefs.h" >> #include <EXTERN.h> >> #include <perl.h> >> 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? > > The HAVE_WIN32_ASPERL macro is obsolete. I suppose that means the > asperl_undefs.h file is also obsolete, but I haven't built perl on > Windows in a long time. I'll rename setlocale, textdomain, and bindtextdomain in include/ac/localize.h to ldap_pvt_<function name> so the definitions cannot break headers in /usr/include/, and move #include <EXTERN.h> #include <perl.h> #undef _ /* #defined used by both Perl and ac/localize.h */ #include "asperl_undefs.h" to the top of the back-perl files. Someone who can test OpenLDAP on Windows can remove asperl_undefs.h later if that file turns out to be obsolete. If not, the fix may have to be bigger, since asperl_undefs.h may depend on a new macro from portable.h which will now be included _after_ asperl_undefs.h. -- Hallvard
changed notes
changed notes changed state Open to Test
changed notes changed state Test to Closed
moved from Development to Archive.Development
Fixed in HEAD, except back-perl on Windows needs testing. assumed okay