|
From: Maya <Esc...@ne...> - 2003-12-28 19:54:53
|
I am developing a program that gets compiled under two platformes, Linux
and Windows. In MSW I use Dev-Cpp, which in turn uses MingWin, a minimal
GCC, but in Linux I use GCC; which is the complete version of GCC. Now
my problems is that there are certain C functions that are incompatible
with the two versions of the GCC package, one of them is 'mkdir'. In
MingWin the declaration is ' int mkdir(const char*)' but in UNIX it is
'int mkdir(const char* , int). What can I do to let know the compiler
that if it is MingWin it should use one incarnation of the function and
visa versa?
Example:
#ifdef MINGWIN
... use mkdir("file.dat")
#endif
#ifdef CYWIN
... use mkdir("file.data", 0);
#endif
#ifdef __GCC__
...etc., etc.
#endif
--
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|