efl: remove _MSC_VER (Visual Studio macro) usage in source code

This commit is contained in:
Vincent Torri 2018-01-03 06:23:10 +01:00 committed by Cedric BAIL
parent 6c42801bac
commit 4ae6eeb2cf
20 changed files with 43 additions and 126 deletions

View File

@ -66,7 +66,7 @@
#define sEXPMAX 19 /* maximum name length for file version <= 6 */ #define sEXPMAX 19 /* maximum name length for file version <= 6 */
#define sNAMEMAX 31 /* maximum name length of symbol name */ #define sNAMEMAX 31 /* maximum name length of symbol name */
#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) #if (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack(1) # pragma pack(1)
# define EMBRYO_STRUCT_PACKED # define EMBRYO_STRUCT_PACKED
#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100) #elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
@ -142,7 +142,7 @@
int nametable ; /* name table, file version 7 only */ int nametable ; /* name table, file version 7 only */
} EMBRYO_STRUCT_PACKED AMX_HEADER; } EMBRYO_STRUCT_PACKED AMX_HEADER;
#if defined _MSC_VER || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) #if (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack() # pragma pack()
#endif #endif

View File

@ -35,13 +35,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <setjmp.h> #include <setjmp.h>
#include <stdint.h>
#ifndef _MSC_VER
# include <stdint.h>
#else
# include <stddef.h>
# include <Evil.h>
#endif
#include "embryo_cc_amx.h" #include "embryo_cc_amx.h"

View File

@ -51,17 +51,8 @@
#include "embryo_cc_sc.h" #include "embryo_cc_sc.h"
#if defined _MSC_VER
#pragma warning(push)
#pragma warning(disable:4125) /* decimal digit terminates octal escape sequence */
#endif
#include "embryo_cc_sc7.scp" #include "embryo_cc_sc7.scp"
#if defined _MSC_VER
#pragma warning(pop)
#endif
static void stgstring(char *start, char *end); static void stgstring(char *start, char *end);
static void stgopt(char *start, char *end); static void stgopt(char *start, char *end);

View File

@ -5,10 +5,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#ifdef _MSC_VER
# include <process.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
# include <Evil.h> # include <Evil.h>
#endif #endif

View File

@ -28,26 +28,16 @@
# include <ieeefp.h> // for Solaris # include <ieeefp.h> // for Solaris
#endif #endif
#ifdef _MSC_VER
# include <float.h>
#endif
#ifdef HAVE_ISFINITE #ifdef HAVE_ISFINITE
# define ECORE_FINITE(t) isfinite(t) # define ECORE_FINITE(t) isfinite(t)
#else #else
# ifdef _MSC_VER # define ECORE_FINITE(t) finite(t)
# define ECORE_FINITE(t) _finite(t)
# else
# define ECORE_FINITE(t) finite(t)
# endif
#endif #endif
//#define FIX_HZ 1 //#define FIX_HZ 1
#ifdef FIX_HZ #ifdef FIX_HZ
# ifndef _MSC_VER # include <sys/param.h>
# include <sys/param.h>
# endif
# ifndef HZ # ifndef HZ
# define HZ 100 # define HZ 100
# endif # endif

View File

@ -12,21 +12,15 @@
#endif #endif
#ifdef HAVE_ISFINITE #ifdef HAVE_ISFINITE
# define ECORE_FINITE(t) isfinite(t) # define ECORE_FINITE(t) isfinite(t)
#else #else
# ifdef _MSC_VER # define ECORE_FINITE(t) finite(t)
# define ECORE_FINITE(t) _finite(t)
# else
# define ECORE_FINITE(t) finite(t)
# endif
#endif #endif
#define FIX_HZ 1 #define FIX_HZ 1
#ifdef FIX_HZ #ifdef FIX_HZ
# ifndef _MSC_VER # include <sys/param.h>
# include <sys/param.h>
# endif
# ifndef HZ # ifndef HZ
# define HZ 100 # define HZ 100
# endif # endif

View File

@ -12,23 +12,15 @@
# undef EAPI # undef EAPI
# endif # endif
# ifdef _MSC_VER # ifdef __GNUC__
# ifdef BUILDING_DLL # if __GNUC__ >= 4
# define EAPI __declspec(dllexport) # define EAPI __attribute__ ((visibility("default")))
# else // ifdef BUILDING_DLL # else // if __GNUC__ >= 4
# define EAPI __declspec(dllimport)
# endif // ifdef BUILDING_DLL
# else // ifdef _MSC_VER
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else // if __GNUC__ >= 4
# define EAPI
# endif // if __GNUC__ >= 4
# else // ifdef __GNUC__
# define EAPI # define EAPI
# endif // ifdef __GNUC__ # endif // if __GNUC__ >= 4
# endif // ifdef _MSC_VER # else // ifdef __GNUC__
# define EAPI
# endif // ifdef __GNUC__
# warning The Ecore_Drm library has been deprecated. Please use the Ecore_Drm2 library # warning The Ecore_Drm library has been deprecated. Please use the Ecore_Drm2 library

View File

@ -7,23 +7,15 @@
# undef EAPI # undef EAPI
# endif # endif
# ifdef _MSC_VER # ifdef __GNUC__
# ifdef BUILDING_DLL # if __GNUC__ >= 4
# define EAPI __declspec(dllexport) # define EAPI __attribute__ ((visibility("default")))
# else // ifdef BUILDING_DLL # else // if __GNUC__ >= 4
# define EAPI __declspec(dllimport)
# endif // ifdef BUILDING_DLL
# else // ifdef _MSC_VER
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else // if __GNUC__ >= 4
# define EAPI
# endif // if __GNUC__ >= 4
# else // ifdef __GNUC__
# define EAPI # define EAPI
# endif // ifdef __GNUC__ # endif // if __GNUC__ >= 4
# endif // ifdef _MSC_VER # else // ifdef __GNUC__
# define EAPI
# endif // ifdef __GNUC__
# ifdef EFL_BETA_API_SUPPORT # ifdef EFL_BETA_API_SUPPORT

View File

@ -11,10 +11,7 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#ifndef _MSC_VER
# include <unistd.h>
#endif
#if defined(HAVE_SYS_MMAN_H) || defined(_WIN32) #if defined(HAVE_SYS_MMAN_H) || defined(_WIN32)
# include <sys/mman.h> # include <sys/mman.h>

View File

@ -38,7 +38,7 @@ typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head;
#define ECORE_IPC_TYPE 0x0f #define ECORE_IPC_TYPE 0x0f
#define ECORE_IPC_SSL 0xf0 #define ECORE_IPC_SSL 0xf0
#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) #if (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack(1) # pragma pack(1)
# define ECORE_IPC_STRUCT_PACKED # define ECORE_IPC_STRUCT_PACKED
#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100) #elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)

View File

@ -8,23 +8,15 @@
# undef EAPI # undef EAPI
#endif // ifdef EAPI #endif // ifdef EAPI
#ifdef _MSC_VER #ifdef __GNUC__
# ifdef BUILDING_DLL # if __GNUC__ >= 4
# define EAPI __declspec(dllexport) # define EAPI __attribute__ ((visibility("default")))
# else // ifdef BUILDING_DLL # else // if __GNUC__ >= 4
# define EAPI __declspec(dllimport)
# endif // ifdef BUILDING_DLL
#else // ifdef _MSC_VER
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else // if __GNUC__ >= 4
# define EAPI
# endif // if __GNUC__ >= 4
# else // ifdef __GNUC__
# define EAPI # define EAPI
# endif // ifdef __GNUC__ # endif // if __GNUC__ >= 4
#endif // ifdef _MSC_VER #else // ifdef __GNUC__
# define EAPI
#endif // ifdef __GNUC__
#define ECORE_X_VERSION_MAJOR EFL_VERSION_MAJOR #define ECORE_X_VERSION_MAJOR EFL_VERSION_MAJOR
#define ECORE_X_VERSION_MINOR EFL_VERSION_MINOR #define ECORE_X_VERSION_MINOR EFL_VERSION_MINOR

View File

@ -106,9 +106,7 @@ _edje_module_init(void)
/* 1. libedje.so/../edje/modules/ */ /* 1. libedje.so/../edje/modules/ */
paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules"); paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules");
/* 2. PREFIX/edje/modules/ */ /* 2. PREFIX/edje/modules/ */
#ifndef _MSC_VER
paths[1] = strdup(PACKAGE_LIB_DIR "/edje/modules"); paths[1] = strdup(PACKAGE_LIB_DIR "/edje/modules");
#endif
for (j = 0; j < ((sizeof (paths) / sizeof (char *)) - 1); ++j) for (j = 0; j < ((sizeof (paths) / sizeof (char *)) - 1); ++j)
for (i = j + 1; i < sizeof (paths) / sizeof (char *); ++i) for (i = j + 1; i < sizeof (paths) / sizeof (char *); ++i)

View File

@ -26,10 +26,6 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#ifdef _MSC_VER
# include <Evil.h>
#endif
#include "eina_config.h" #include "eina_config.h"
#include "eina_private.h" #include "eina_private.h"
#include "eina_rbtree.h" #include "eina_rbtree.h"
@ -143,7 +139,7 @@ struct _Eina_Hash_Each
#undef get16bits #undef get16bits
#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
|| defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) || defined (__BORLANDC__) || defined (__TURBOC__)
# define get16bits(d) (*((const uint16_t *)(d))) # define get16bits(d) (*((const uint16_t *)(d)))
#endif #endif

View File

@ -270,7 +270,7 @@ struct _Embryo_Program
void *data; void *data;
}; };
#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) #if (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack(1) # pragma pack(1)
# define EMBRYO_STRUCT_PACKED # define EMBRYO_STRUCT_PACKED
#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100) #elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
@ -306,7 +306,7 @@ struct _Embryo_Header
int nametable; /* name table, file version 7 only */ int nametable; /* name table, file version 7 only */
} EMBRYO_STRUCT_PACKED; } EMBRYO_STRUCT_PACKED;
#if defined _MSC_VER || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100) #if (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack() # pragma pack()
#endif #endif

View File

@ -5,10 +5,6 @@
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#ifdef _MSC_VER
# include <winsock2.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
# include <Evil.h> # include <Evil.h>
#endif #endif

View File

@ -2,9 +2,7 @@
# include <config.h> # include <config.h>
#endif #endif
#ifndef _MSC_VER #include <unistd.h>
# include <unistd.h>
#endif
#include <errno.h> #include <errno.h>
#ifdef _WIN32 #ifdef _WIN32

View File

@ -66,10 +66,8 @@ static FcConfig *fc_config = NULL;
/* FIXME move these helper function to eina_file or eina_path */ /* FIXME move these helper function to eina_file or eina_path */
/* get the casefold feature! */ /* get the casefold feature! */
#include <fnmatch.h> #include <fnmatch.h>
#ifndef _MSC_VER #include <unistd.h>
# include <unistd.h> #include <sys/param.h>
# include <sys/param.h>
#endif
int int
_file_path_is_full_path(const char *path) _file_path_is_full_path(const char *path)
{ {

View File

@ -147,7 +147,6 @@ evas_module_paths_init(void)
evas_module_paths = _evas_module_append(evas_module_paths, path); evas_module_paths = _evas_module_append(evas_module_paths, path);
/* 2. PREFIX/lib/evas/modules/ */ /* 2. PREFIX/lib/evas/modules/ */
#ifndef _MSC_VER
path = PACKAGE_LIB_DIR "/evas/modules"; path = PACKAGE_LIB_DIR "/evas/modules";
if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
{ {
@ -155,7 +154,6 @@ evas_module_paths_init(void)
if (path) if (path)
evas_module_paths = _evas_module_append(evas_module_paths, path); evas_module_paths = _evas_module_append(evas_module_paths, path);
} }
#endif
} }
#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \ #define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \

View File

@ -13,10 +13,8 @@
#include <sys/stat.h> #include <sys/stat.h>
/* get the casefold feature! */ /* get the casefold feature! */
#include <fnmatch.h> #include <fnmatch.h>
#ifndef _MSC_VER #include <unistd.h>
# include <unistd.h> #include <sys/param.h>
# include <sys/param.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
# include <Evil.h> # include <Evil.h>

View File

@ -21,11 +21,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #include <time.h>
#include <ctype.h> #include <ctype.h>
#include <stdint.h>
#ifndef _MSC_VER
# include <stdint.h>
#include <unistd.h> #include <unistd.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
# include <Evil.h> # include <Evil.h>