[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
installing config.h
From: |
Waldemar Rosenbach |
Subject: |
installing config.h |
Date: |
Tue, 03 Sep 2002 10:28:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 |
config.h is platform depend, so it shouldn't be installed by make install.
But what is the best way to deal with the platform depend stuff in the
interface?
For example:
#ifdef HAVE_HASHMAP
# include <hash_map>
typedef std::hash_map<string, int> myTableType;
#else
# include <map>
typedef std::map<string, int> myTableType;
#endif
myTableType container;
another example:
#ifdef _POSIX_C_SOURCE
typedef pthread_t iThreadID;
typedef pthread_t iThreadHandle;
#endif
#ifdef USE_SPROC
typedef pid_t iThreadID;
typedef pid_t iThreadHandle;
#endif
#ifdef WIN32
typedef DWORD iThreadID;
typedef HANDLE iThreadHandle;
#endif
The symbols are defined or not in the config.h, thus I have to include
it in the header and then to install.
The other way is to define a wrapper-class and use pointers to this
class, but this is cumbersomely.
Is there another way to solve this kind of problem?
- installing config.h,
Waldemar Rosenbach <=