Add new comment

0.19.0-Beta1: change to generate less warnings with mingw build

If I compile under mingw with the supplied configure, I get warnings from the mingw C++ compiler stating that winsock2.h should be included before windows.h. The following patch moves up the definition of winsock2.h in libraw_datastream.h, and then the warnings go away.

--- libraw/libraw_datastream.h.dist	2018-02-27 22:35:04.000000000 -0800
+++ libraw/libraw_datastream.h	2018-03-19 20:26:41.000000000 -0700
@@ -28,11 +28,6 @@
 
 #else /* __cplusplus */
 
-#include "libraw_const.h"
-#include "libraw_types.h"
-#include <fstream>
-#include <memory>
-
 #if defined WIN32 || defined(__MINGW32__)
 #include <winsock2.h>
 
@@ -42,6 +37,11 @@
 #endif
 #endif
 
+#include "libraw_const.h"
+#include "libraw_types.h"
+#include <fstream>
+#include <memory>
+
 #ifdef USE_DNGSDK
 
 #if defined WIN32 || defined(__MINGW32__)

Forums: