[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake
From: |
Andre Caldas |
Subject: |
Re: automake |
Date: |
Fri, 25 Nov 2005 17:00:12 +0900 |
User-agent: |
Debian Thunderbird 1.0.7 (X11/20051017) |
Hello!
Adnan Shaheen wrote:
Well I am writting some code, you tell me what should the compiler do when I
compile it.
As earlier I told you about I am working on a LINUX machine.
The idea is to check for "features", not OS type.
For example: You should check for the existence of sys/socket.h, and
then use
#ifdef HAVE_SYS_SOCKET_H
CODE:
#ifdef LINUX
#include <sys/socket.h>
#else // !(LINUX)
#include <winsock.h>
#endif // LINUX
END
I think you understand this simple code, I want to open the socket.h header
when I am under LINUX and winsock.h header when I am working on the WINDOWS
machine. So what the compiler did to me, is that, it was trying to open the
winsock.h header instead of socket.h.
Do you do this?...
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Andre Caldas.