bug-autoconf
[Top][All Lists]
Advanced

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

[sr #110382] In autoconf-2.69d AC_LANG_SOURCE implicitly includes '#incl


From: Zack Weinberg
Subject: [sr #110382] In autoconf-2.69d AC_LANG_SOURCE implicitly includes '#include "confdefs.h"'
Date: Fri, 8 Dec 2023 09:25:20 -0500 (EST)

Update of sr#110382 (group autoconf):

                Priority:             1 - Blocked => 3 - Release N+1        

    _______________________________________________________

Follow-up Comment #3:

Thinking about this one some more, I see two ways to make confdefs.h
idempotent:

1. A conventional "multiple inclusion guard", wrapping the body of the file in
#ifndef ... #endif.  This will work on all compilers and regardless of whether
confdefs.h is included or concatenated with the test program, but requires us
to change AC_DEFINE and friends to do something like


#define MACRO 1


The thing I'm worried about with this one is if there's third party macros out
there somewhere that bypass AC_DEFINE.  The sed construct up there should be
portable.

2. Alternatively, use #pragma once and change AC_LANG_CONFTEST(C) to #include
confdefs.h rather than prepending its contents to the test program.  This
would keep macros that bypass AC_DEFINE working, but would break with
compilers that make #pragma once do something wacky (it should be no worse
than the status quo with compilers that merely _ignore_ #pragma once). I also
wonder if there's a concrete reason why AC_LANG_CONFTEST(C) _shouldn't_
#include confdefs.h.

We should be able to get this done for 2.73.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110382>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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