windows: Move getopt.h include file to the bottom 77/238577/1
authorWander Lairson Costa <wander.lairson@gmail.com>
Mon, 13 Jul 2020 18:58:02 +0000 (15:58 -0300)
committerVictor Cebollada <v.cebollada@samsung.com>
Wed, 15 Jul 2020 08:07:47 +0000 (09:07 +0100)
getopt-win32 defines the symbol _END_EXTERN_C and undefines at the end
of the file. It turns out msvc standard library defines this same
symbol.

If getopt.h is included before C++ standard includes, it will undef
_END_EXTERN_C and causes compilation errors under msvc.

We move the getopt.h to the end of the list of include files so it can't
mess up with internal msvcrt symbols.

Change-Id: I404ca48d096703d0be6b5f466402fb2ca0223033

dali/internal/system/common/command-line-options.cpp

index 7270a23..52c9412 100644 (file)
 #include <dali/internal/system/common/command-line-options.h>
 
 // EXTERNAL INCLUDES
 #include <dali/internal/system/common/command-line-options.h>
 
 // EXTERNAL INCLUDES
-#include <getopt.h>
 #include <stdlib.h>
 #include <string.h>
 #include <iostream>
 
 #include <dali/public-api/common/dali-vector.h>
 #include <stdlib.h>
 #include <string.h>
 #include <iostream>
 
 #include <dali/public-api/common/dali-vector.h>
+#include <getopt.h>
 
 namespace Dali
 {
 
 namespace Dali
 {