[Freeciv-Dev] Use of config.h .
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
In my host lookup patch, I've added a function
int look_up_host(const char *, struct sockaddr_in *);
The problem with this prototype is that struct sockaddr_in is defined
in header file with an associated HAVE_FOO_H define to protect it from
inclusion on systems that don't have it.
Since many Freeciv source files don't include config.h, that define is
never set, which leads to the header not being included, which means
that struct sockaddr_in in not defined, which causes a warning from
GCC. Whew.
I think that the easiest way to avoid this kind of trouble is to
include config.h in _all_ source files. However, there are certainly
other ways to get around this, so I'd like to bring the issue up for
discussion.
--
Big Gaute (not to be confused with LG)
I'm losing my hair..did it go to ATLANTIC CITY??
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Use of config.h .,
Gaute B Strokkenes <=
|
|