lmi
[Top][All Lists]
Advanced

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

[lmi] Placement of HAVE_CONFIG_H in 'config.hpp'


From: Greg Chicares
Subject: [lmi] Placement of HAVE_CONFIG_H in 'config.hpp'
Date: Wed, 02 Nov 2005 15:31:52 +0000
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Vadim--I've moved [1]
  #if defined HAVE_CONFIG_H
  #   include "config.h"
  #endif // Using autoconf.
slightly lower in 'config.hpp': it now follows a C++ namespace thing
(I'm sure autoconf doesn't care about that) and the definitions of
some 'LMI_*' macros (could autoconf possibly care about those?).

I'd prefer to move it lower still, to just before
  #if !defined HAVE_CONFIG_H
because #if...#else...#endif would be clearer; would that cause any
problem? Let me show the whole block I'd like to modify (indented
two spaces) because it's short, with comments and questions
interspersed (in square brackets, not indented):

  #if defined HAVE_CONFIG_H
  #   include "config.h"
  #endif // Using autoconf.

[I think 'config.h' can include standard headers. That seems to
go against the following comment. Is there anything in the
following header that 'config.h' could possibly depend on?]

  // This header #includes standard headers in an unusual way, and must
  // be #included before any standard headers are seen.
  //
  #include "platform_dependent.hpp"

[Can I assume that 'config.h' would never conflict with the following?]

  #if defined __GNUC__ && __GNUC__ < 3
  #   error Obsolete compiler not supported.
  #endif // Ancient gcc compiler.

  #if defined __GNUC__
  #   define LMI_GCC_VERSION \
          (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
  #endif // Compiler is gcc.

[Is there any reason to include 'config.h' before the following header?]

  #define OK_TO_INCLUDE_CONFIG_ALL_HPP
  #include "config_all.hpp"
  #undef OK_TO_INCLUDE_CONFIG_ALL_HPP

[Here's where I'd like to include 'config.h'; is that a problem?]

  #if !defined HAVE_CONFIG_H

---------

[1] Actually, I haven't committed it yet: the savannah server seems
to be down at the moment. So this would be a good time to let me
know whether this change would break anything with autotools....




reply via email to

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