bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenVMS needs __UNIX_PUTC macro defined for configure tests.


From: Bruno Haible
Subject: Re: OpenVMS needs __UNIX_PUTC macro defined for configure tests.
Date: Thu, 06 Jul 2017 16:33:21 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]