[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: include/ac/localize.h breaks back-perl (ITS#2513)

Howard Chu writes:
>>   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.