Re: [Opentnl-general] Cygwin & mingw32 fixes
Brought to you by:
mark_frohnmayer,
s_alanet
From: John Q. <jo...@lo...> - 2004-04-25 18:22:02
|
Your tnlTypes.h fixes look good. One question, are the _HEAP defines possibly in some mingw header file? If so, it would be better to include that header file rather then redefine them in TNL. As far as the Makefiles go, the ones in TNL are quick and dirty and need a lot of work. Aside from configuration, they don't properly detect changes in header files or dependent libraries. I'd love to see an automake solution implemented, but I don't have time to work on it myself at the moment. Would you like to? :) Without autoconf, you could use a scheme similar to torque for setting up the flags for different compilers. Basically the main makefile includes a top level "configuration" makefile that defines the CFLAGS and other settings specific to that compiler. So you would configuration files like conf.GCC.MINGW.mk conf.GCC.LINUX.mk And the appropriate one would be included by the top-level makefile. On Apr 21, 2004, at 9:45 PM, Stephane Vaxelaire wrote: > Hi, > >> Strangely GCC doesn't give this error on either linux or OS X. >> Perhaps >> it's a difference in the cdecl syntax? > > You got the point. In fact for both __CYGWIN__ and __MINGW32__ the > FN_CDECL > constant must be defined to nothing like under Linux for instance. > > There are also some missing constants under mingw32 so I added them > directly > in tnlTypes.h in a test to check if __MINGW32__ is defined. > Now I got everything to compile fine with standard gcc cygwin and with > gcc -mno-cygwin. > For pure cygwin, TNL_OS is defined to linux whereas for mingw it is > defined to > win32. > > Of course, for mingw compile, I had to add "-mno-cygwin" to each > Makefile (or > makefile in libtomcrypt) and I had to add -lwsock32 to the Makefiles > in the > master, masterclient and test subdirectories. > No changes to Makefiles where required for cygwin, just the new > tnlTypes.h. > > Here you will find (attached) my tnlType.h file that I modified from > yesterday's > CVS. > > Could any devel commit this patch if it proves itself to be ok ? > I dunno how to integrate the mingw32 required changes to Makefiles > though.. > I should say I haven't thought about it. Is anyone planning to use a > configure > script ? > > Regards, > > Stephane<tnlTypes.h> |