zombiecong / sctp-refimpl

Automatically exported from code.google.com/p/sctp-refimpl
0 stars 0 forks source link

Cross compiling with mingw-w64 #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I discovered two issues about sctp when cross compiling mozilla sources with 
mingw.

- Using lower case includes
While this doesn't matter on Windows, where filesystem is case insensitive, for 
cross compiling it's important. mingw always uses lower cased file names.

- Support for NOMINMAX
This is not really related to mingw, but Windows in general. While min/max 
macros are provided by system headers, they may be disabled with NOMINMAX 
macro. It has to be taken into account in sources, where those macros are 
defined. My proposed patch checks for NOMINMAX, but maybe something like 
|#ifndef min| would be prefered.

Please see the attached patch.

Original issue reported on code.google.com by cja...@gmail.com on 8 Jul 2015 at 5:03

Attachments:

GoogleCodeExporter commented 9 years ago
Would something like
#if defined(__MINGW32__) || defined(__MINGW64__) 
#include <mswsock.h>
#include <windows.h>
#else
#include <Mswsock.h>
#include <Windows.h>
#endif
also work for you?

Original comment by t00FC...@googlemail.com on 10 Jul 2015 at 3:39