fix most compilation errors with vc++ (there are still a

problem with eina_log and output of the log messages:
STDERR_FILENO, STDOUT_FILENO and isatty())

fix some warnings and header files inclusion

update vcproj files


SVN revision: 47384
This commit is contained in:
Vincent Torri 2010-03-23 06:41:17 +00:00
parent 8358354e09
commit 8126debb06
10 changed files with 43 additions and 16 deletions

View File

@ -22,7 +22,6 @@
#include <stdarg.h>
#include "eina_types.h"
#include "eina_log.h"
/**
* @addtogroup Eina_Tools_Group Tools

View File

@ -19,6 +19,7 @@
#ifndef EINA_LOG_H_
#define EINA_LOG_H_
#include <stdlib.h>
#include <stdarg.h>
#include "eina_types.h"
@ -222,7 +223,7 @@ struct _Eina_Log_Domain
int level; /**< Max level to log */
const char *domain_str; /**< Formatted string with color to print */
const char *name; /**< Domain name */
unsigned int namelen; /**< strlen(name) */
size_t namelen; /**< strlen(name) */
/* Private */
Eina_Bool deleted:1; /**< Flags deletion of domain, a free slot */

View File

@ -265,9 +265,12 @@
#include <string.h>
#include <stdlib.h>
#include <fnmatch.h>
#include <unistd.h>
#include <assert.h>
#ifndef _MSC_VER
# include <unistd.h>
#endif
#ifdef EFL_HAVE_PTHREAD
# include <pthread.h>
#endif
@ -315,7 +318,7 @@ struct _Eina_Log_Domain_Level_Pending
{
EINA_INLIST;
unsigned int level;
unsigned int namelen;
size_t namelen;
char name[];
};
@ -394,7 +397,7 @@ static pthread_mutex_t _log_mutex = PTHREAD_MUTEX_INITIALIZER;
// List of domains registered
static Eina_Log_Domain *_log_domains = NULL;
static unsigned int _log_domains_count = 0;
static unsigned int _log_domains_allocated = 0;
static size_t _log_domains_allocated = 0;
// Default function for printing on domains
static Eina_Log_Print_Cb _print_cb = eina_log_print_cb_stderr;
@ -839,7 +842,8 @@ static inline int
eina_log_domain_register_unlocked(const char *name, const char *color)
{
Eina_Log_Domain_Level_Pending *pending = NULL;
unsigned int i, namelen;
size_t namelen;
unsigned int i;
for (i = 0; i < _log_domains_count; i++)
{
@ -1567,7 +1571,8 @@ EAPI void
eina_log_domain_level_set(const char *domain_name, int level)
{
Eina_Log_Domain_Level_Pending *pending;
unsigned int i, namelen;
size_t namelen;
unsigned int i;
EINA_SAFETY_ON_NULL_RETURN(domain_name);
@ -1627,7 +1632,8 @@ EAPI int
eina_log_domain_level_get(const char *domain_name)
{
Eina_Log_Domain_Level_Pending *pending;
unsigned int i, namelen;
size_t namelen;
unsigned int i;
EINA_SAFETY_ON_NULL_RETURN_VAL(domain_name, EINA_LOG_LEVEL_UNKNOWN);

View File

@ -45,7 +45,12 @@ void *alloca (size_t);
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <libgen.h>
#ifndef _MSC_VER
# include <libgen.h>
#else
# include <Evil.h>
#endif
#include <dlfcn.h>

View File

@ -20,8 +20,9 @@
# include "config.h"
#endif
#include "eina_error.h"
#include "eina_private.h"
#include "eina_error.h"
#include "eina_log.h"
#include "eina_safety_checks.h"
/*============================================================================*

View File

@ -38,6 +38,10 @@
# include <iconv.h>
#endif
#ifdef HAVE_EVIL
# include <Evil.h>
#endif
#include "eina_private.h"
#include "eina_str.h"

View File

@ -34,7 +34,7 @@ static const char EINA_MAGIC_STRBUF_STR[] = "Eina Strbuf";
EINA_MAGIC_FAIL((d), EINA_MAGIC_STRBUF); \
return __VA_ARGS__; \
} \
} while (0);
} while (0)
#define EINA_STRBUF_INIT_SIZE 32
#define EINA_STRBUF_INIT_STEP 32

View File

@ -83,8 +83,8 @@ _eina_fixed_cmp_key(const Eina_Rbtree *node, const void *key, __UNUSED__ int len
{
const void *a = node;
const void *b = key;
int delta;
int limit;
ssize_t delta;
ssize_t limit;
limit = sizeof (Eina_Fixed_Bitmap_Pool) + mp->item_size * 32;
delta = (char *)a - (char *)b;
@ -150,7 +150,7 @@ eina_fixed_bitmap_free(void *data, void *ptr)
Eina_Fixed_Bitmap_Pool *pool;
void *a;
Eina_Bool push_front = EINA_FALSE;
int delta;
ssize_t delta;
pool = (Eina_Fixed_Bitmap_Pool*) eina_rbtree_inline_lookup(mp->lookup,
ptr, 0,

View File

@ -28,4 +28,7 @@
# define EINA_SAFETY_CHECKS
#endif
#define MODULE_ARCH "win32-msc-x86"
#define SHARED_LIB_SUFFIX ".dll"
#endif /* EINA_CONFIG_H_ */

View File

@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(INCLUDE)"
PreprocessorDefinitions="HAVE_ERRNO_H;_WIN32_WINNT=0x0501;SECURITY_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_EVIL;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline;__UNUSED__=;EFL_EINA_BUILD;PACKAGE_LIB_DIR=;_CRT_SECURE_NO_WARNINGS;EINA_STATIC_BUILD_CHAINED_POOL;EINA_STATIC_BUILD_PASS_THROUGH;EINA_STATIC_BUILD_FIXED_BITMAP;_POSIX_;_CRT_SECURE_NO_DEPRECATE"
PreprocessorDefinitions="HAVE_ERRNO_H;_WIN32_WINNT=0x0501;SECURITY_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_EVIL;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline;__UNUSED__=;EFL_EINA_BUILD;PACKAGE_LIB_DIR=;_CRT_SECURE_NO_WARNINGS;EINA_STATIC_BUILD_BUDDY;EINA_STATIC_BUILD_CHAINED_POOL;EINA_STATIC_BUILD_PASS_THROUGH;EINA_STATIC_BUILD_FIXED_BITMAP;_POSIX_;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -123,7 +123,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(INCLUDE)"
PreprocessorDefinitions="HAVE_ERRNO_H;_WIN32_WINNT=0x0501;SECURITY_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_EVIL;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline;__UNUSED__=;EFL_EINA_BUILD;PACKAGE_LIB_DIR=;_CRT_SECURE_NO_WARNINGS;EINA_STATIC_BUILD_CHAINED_POOL;EINA_STATIC_BUILD_PASS_THROUGH;EINA_STATIC_BUILD_FIXED_BITMAP;_POSIX_;_CRT_SECURE_NO_DEPRECATE"
PreprocessorDefinitions="HAVE_ERRNO_H;_WIN32_WINNT=0x0501;SECURITY_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_EVIL;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline;__UNUSED__=;EFL_EINA_BUILD;PACKAGE_LIB_DIR=;_CRT_SECURE_NO_WARNINGS;EINA_STATIC_BUILD_BUDDY;EINA_STATIC_BUILD_CHAINED_POOL;EINA_STATIC_BUILD_PASS_THROUGH;EINA_STATIC_BUILD_FIXED_BITMAP;_POSIX_;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -303,6 +303,10 @@
RelativePath="..\..\src\lib\eina_value.c"
>
</File>
<File
RelativePath="..\..\src\modules\mp\buddy\eina_buddy.c"
>
</File>
<File
RelativePath="..\..\src\modules\mp\chained_pool\eina_chained_mempool.c"
>
@ -425,6 +429,10 @@
RelativePath="..\..\src\include\eina_safety_checks.h"
>
</File>
<File
RelativePath="..\..\src\include\eina_strbuf.h"
>
</File>
<File
RelativePath="..\..\src\include\eina_str.h"
>