John E. Malmberg wrote:
>  >> * Config.h
>  >>     OpenVMS needs __UNIX_PUTC macro defined for putc_unlocked
>  >>     and friends to be visible.
>  >
>  > The right place to do this (for a macro that affects multiple
>  > gnulib modules) is the 'extensions' module.
> 
> This makes it visible to the modules being built, but not to the tests 
> in the configure script.

No, m4/extensions.m4 is written in such a way that all definitions
inside AC_USE_SYSTEM_EXTENSIONS become active before the first test
in the configure script gets run.

> Also on OpenVMS __UNIX_PUTC macro can not be used currently with the C++ 
> compiler

Then how about
#ifndef __cplusplus
# define __UNIX_PUTC 1
#endif
?

> So would the fix be to just put all the logic in unlocked-io.h for it to 
> make visible the OpenVMS unlocked IO routines for C only?

I guess that this would not work:
  #include <stdio.h>
  #include "unlocked-io.h"
would not make the unlocked IO routines visible, because <stdio.h> gets skipped
when it gets included a second time. Right?

Bruno


Reply via email to