Re: [PATCH] Avoid double-including config.h

2025-04-06 Thread Mark Wielaard
Hi Dmitry, On Fri, Apr 04, 2025 at 04:07:26PM +0300, Dmitry V. Levin wrote: > On Fri, Apr 04, 2025 at 01:55:48PM +0200, Mark Wielaard wrote: > > So to be (pedantically) correct should we include the attached? > > Yes, this should be fine, along with > > --- a/lib/crc32.c > +++ b/lib/crc32.c > @@

Re: [PATCH] Avoid double-including config.h

2025-04-04 Thread Dmitry V. Levin
Hi Mark, On Fri, Apr 04, 2025 at 01:55:48PM +0200, Mark Wielaard wrote: > Hi Dmitry, > > On Thu, 2025-04-03 at 19:28 +0300, Dmitry V. Levin wrote: > > I've accidentally noticed that this hunk was not correct back in 2017 > > because "#if HAVE_CONFIG_H" is not the same as "#ifdef HAVE_CONFIG_H". >

Re: [PATCH] Avoid double-including config.h

2025-04-04 Thread Mark Wielaard
Hi Dmitry, On Thu, 2025-04-03 at 19:28 +0300, Dmitry V. Levin wrote: > I've accidentally noticed that this hunk was not correct back in 2017 > because "#if HAVE_CONFIG_H" is not the same as "#ifdef HAVE_CONFIG_H". > This was not problematic for elfutils itself because HAVE_CONFIG_H is > always def

Re: [PATCH] Avoid double-including config.h

2025-04-03 Thread Dmitry V. Levin
On Thu, Apr 20, 2017 at 04:31:02PM +0200, Ulf Hermann wrote: > config.h doesn't have include guards, so including it twice is bad. We > deal with this by checking for PACKAGE_NAME, but only in some places. > Once we start using gnulib, we will need to include config.h before any > gnulib-generated

Re: [PATCH] Avoid double-including config.h

2017-05-04 Thread Ulf Hermann
On 05/02/2017 01:55 PM, Ulf Hermann wrote: >> Maybe we can cleanup that last >> one once we integrate gnulib (which I believe has a good/64-off_t fts.h >> already). > > gnulib is among the bad ones. Or, at least we detect it as bad. Sorry, I meant the msys fts.h. That is also the one which needs

Re: [PATCH] Avoid double-including config.h

2017-05-02 Thread Ulf Hermann
Maybe we can cleanup that last one once we integrate gnulib (which I believe has a good/64-off_t fts.h already). gnulib is among the bad ones. Or, at least we detect it as bad. Ulf

Re: [PATCH] Avoid double-including config.h

2017-05-02 Thread Mark Wielaard
On Thu, 2017-04-20 at 16:31 +0200, Ulf Hermann wrote: > config.h doesn't have include guards, so including it twice is bad. We > deal with this by checking for PACKAGE_NAME, but only in some places. > Once we start using gnulib, we will need to include config.h before any > gnulib-generated headers

[PATCH] Avoid double-including config.h

2017-04-20 Thread Ulf Hermann
config.h doesn't have include guards, so including it twice is bad. We deal with this by checking for PACKAGE_NAME, but only in some places. Once we start using gnulib, we will need to include config.h before any gnulib-generated headers. This is problematic if we include it transitively through ou