Re: python cleanup
От | Tom Lane |
---|---|
Тема | Re: python cleanup |
Дата | |
Msg-id | 15870.1311565593@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | python cleanup (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: python cleanup
|
Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> writes: > On my Linux system the attached compiles without warnings. If this seems > like the way to go I'll investigate more on Windows. Hmm ... > +/* > + * Save settings the Python headers might override > + */ > +#ifdef _POSIX_C_SOURCE > +#define _PGSAVE_POSIX_C_SOURCE _POSIX_C_SOURCE > +#undef _POSIX_C_SOURCE > +#endif > ... > +/* > + * Restore settings the Python headers might have overridden. > + */ > +#ifdef _PGSAVE_POSIX_C_SOURCE > +#undef _POSIX_C_SOURCE > +#define _POSIX_C_SOURCE _PGSAVE_POSIX_C_SOURCE > +#undef _PGSAVE_POSIX_C_SOURCE > +#endif I don't believe that this sequence will restore the contents of the _POSIX_C_SOURCE macro to what it was before. For that matter, it's not even quite right about ensuring that the macro's defined-ness status is restored (what if the python headers set _POSIX_C_SOURCE when it wasn't set before?). We might not need more than defined-ness to be right, though. What in the world are the python headers doing fooling with these macros, anyway?? regards, tom lane
В списке pgsql-hackers по дате отправления: