From d989abb2aae425a4388218439f16637722be254a Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 1 Apr 2010 20:13:40 +0000 Subject: [PATCH] * configure.ac: move version management at the beginning * src/bin/evil_suite.c: * src/bin/evil_test_dlfcn.c: * src/bin/evil_test_environment.c: * src/bin/evil_test_gettimeofday.c: * src/bin/evil_test_link.c: * src/bin/evil_test_mkstemp.c: * src/bin/evil_test_pipe.c: * src/bin/evil_test_realpath.c: * src/lib/Evil.h: * src/lib/Makefile.am: * src/lib/evil_errno.c: * src/lib/evil_main.c: * src/lib/evil_main.h: * src/lib/evil_unistd.c: * src/lib/evil_unistd.h: * src/lib/evil_util.c: fix warnings SVN revision: 47669 --- legacy/evil/ChangeLog | 23 +++++++++++++++ legacy/evil/configure.ac | 31 ++++++++++++-------- legacy/evil/src/bin/evil_suite.c | 2 +- legacy/evil/src/bin/evil_test_dlfcn.c | 11 ++++--- legacy/evil/src/bin/evil_test_environment.c | 2 ++ legacy/evil/src/bin/evil_test_gettimeofday.c | 1 + legacy/evil/src/bin/evil_test_link.c | 1 + legacy/evil/src/bin/evil_test_mkstemp.c | 7 ++++- legacy/evil/src/bin/evil_test_pipe.c | 4 ++- legacy/evil/src/bin/evil_test_realpath.c | 2 ++ legacy/evil/src/lib/Evil.h | 14 +++++---- legacy/evil/src/lib/Makefile.am | 3 +- legacy/evil/src/lib/evil_errno.c | 7 ++--- legacy/evil/src/lib/evil_main.c | 4 +-- legacy/evil/src/lib/evil_main.h | 4 +-- legacy/evil/src/lib/evil_unistd.c | 2 +- legacy/evil/src/lib/evil_unistd.h | 2 +- legacy/evil/src/lib/evil_util.c | 3 +- 18 files changed, 85 insertions(+), 38 deletions(-) diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog index 13dcd9f42f..57e4c2fb38 100644 --- a/legacy/evil/ChangeLog +++ b/legacy/evil/ChangeLog @@ -1,3 +1,26 @@ +2010-04-01 Vincent Torri + + * configure.ac: + move version management at the beginning + + * src/bin/evil_suite.c: + * src/bin/evil_test_dlfcn.c: + * src/bin/evil_test_environment.c: + * src/bin/evil_test_gettimeofday.c: + * src/bin/evil_test_link.c: + * src/bin/evil_test_mkstemp.c: + * src/bin/evil_test_pipe.c: + * src/bin/evil_test_realpath.c: + * src/lib/Evil.h: + * src/lib/Makefile.am: + * src/lib/evil_errno.c: + * src/lib/evil_main.c: + * src/lib/evil_main.h: + * src/lib/evil_unistd.c: + * src/lib/evil_unistd.h: + * src/lib/evil_util.c: + fix warnings + 2010-03-26 Vincent Torri * src/lib/evil_string.c: diff --git a/legacy/evil/configure.ac b/legacy/evil/configure.ac index 116db4f5bd..9088a86b02 100644 --- a/legacy/evil/configure.ac +++ b/legacy/evil/configure.ac @@ -1,12 +1,25 @@ -AC_INIT([evil], [0.0.1], [enlightenment-devel@lists.sourceforge.net]) +### Version + +m4_define([evil_version_major], [0]) +m4_define([evil_version_minor], [0]) +m4_define([evil_version_micro], [1]) + +m4_define([evil_version], + [evil_version_major.evil_version_minor.evil_version_micro]) + +m4_define([lt_rev], m4_eval(evil_version_major + evil_version_minor)) +m4_define([lt_cur], evil_version_micro) +m4_define([lt_age], evil_version_minor) + +AC_INIT([evil], [evil_version], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_HOST -dnl If the host is not Windows, or is ceGCC, we exit +### If the host is not Windows, or is ceGCC, we exit case "$host_os" in cegcc*) AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...]) @@ -21,15 +34,9 @@ esac AM_INIT_AUTOMAKE([1.6 dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_LIBTOOL_WIN32_DLL -define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl -AC_PROG_LIBTOOL +LT_INIT([win32-dll]) -VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'` -VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'` -VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'` -SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'` -version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN" +version_info="lt_rev:lt_cur:lt_age" AC_SUBST(version_info) @@ -76,7 +83,7 @@ AC_C_CONST AC_C___ATTRIBUTE__ win32_cppflags="-DEFL_EVIL_BUILD" -win32_cflags="-Wall -W -Wshadow" +win32_cflags="-Wall -Wextra -Wshadow -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -pedantic" win32_cxxflags="" have_wince="no" case "$host_os" in @@ -123,7 +130,7 @@ echo echo echo echo "------------------------------------------------------------------------" -echo "$PACKAGE_NAME $PACKAGE_VERSION $PACKAGE_TARNAME" +echo "$PACKAGE_NAME $PACKAGE_VERSION" echo "------------------------------------------------------------------------" echo echo "Configuration Options Summary:" diff --git a/legacy/evil/src/bin/evil_suite.c b/legacy/evil/src/bin/evil_suite.c index cee01cc95b..1912715dc6 100644 --- a/legacy/evil/src/bin/evil_suite.c +++ b/legacy/evil/src/bin/evil_suite.c @@ -175,7 +175,7 @@ suite_show(suite *s) } int -main() +main(void) { test tests[] = { { "dlfcn ", test_dlfcn }, diff --git a/legacy/evil/src/bin/evil_test_dlfcn.c b/legacy/evil/src/bin/evil_test_dlfcn.c index b0551e1dc4..47d999dc90 100644 --- a/legacy/evil/src/bin/evil_test_dlfcn.c +++ b/legacy/evil/src/bin/evil_test_dlfcn.c @@ -8,12 +8,15 @@ #include #include "evil_suite.h" +#include "evil_test_dlfcn.h" + + +typedef int (*_evil_init)(void); +typedef int (*_evil_shutdwon)(void); -typedef int (*_evil_init)(); -typedef int (*_evil_shutdwon)(); static int -test_dlfcn_test_dlopen() +test_dlfcn_test_dlopen(void) { void *handle; @@ -28,7 +31,7 @@ test_dlfcn_test_dlopen() } static int -test_dlfcn_test_dlsym() +test_dlfcn_test_dlsym(void) { void *handle; _evil_init sym_init; diff --git a/legacy/evil/src/bin/evil_test_environment.c b/legacy/evil/src/bin/evil_test_environment.c index c3538310f4..0d31b7912a 100644 --- a/legacy/evil/src/bin/evil_test_environment.c +++ b/legacy/evil/src/bin/evil_test_environment.c @@ -7,6 +7,8 @@ #include #include "evil_suite.h" +#include "evil_test_environment.h" + static int test_env_test_setenv_NULL(void) diff --git a/legacy/evil/src/bin/evil_test_gettimeofday.c b/legacy/evil/src/bin/evil_test_gettimeofday.c index bc7f01befb..6be9970ad4 100644 --- a/legacy/evil/src/bin/evil_test_gettimeofday.c +++ b/legacy/evil/src/bin/evil_test_gettimeofday.c @@ -8,6 +8,7 @@ #include #include "evil_suite.h" +#include "evil_test_gettimeofday.h" static int test_time_test_gettimeofday(void) diff --git a/legacy/evil/src/bin/evil_test_link.c b/legacy/evil/src/bin/evil_test_link.c index 344c6c1de3..868e9f23d2 100644 --- a/legacy/evil/src/bin/evil_test_link.c +++ b/legacy/evil/src/bin/evil_test_link.c @@ -7,6 +7,7 @@ #include #include "evil_suite.h" +#include "evil_test_link.h" static int test_link_test_file_create(const char *name, const char *data) diff --git a/legacy/evil/src/bin/evil_test_mkstemp.c b/legacy/evil/src/bin/evil_test_mkstemp.c index 9a41c93573..a716b726aa 100644 --- a/legacy/evil/src/bin/evil_test_mkstemp.c +++ b/legacy/evil/src/bin/evil_test_mkstemp.c @@ -7,11 +7,16 @@ #include #include "evil_suite.h" +#include "evil_test_mkstemp.h" -int test_mkstemp_test(void) + +static int +test_mkstemp_test(void) { char _template[PATH_MAX]; +#ifdef _WIN32_WCE char cwd[PATH_MAX]; +#endif int fd; #ifdef _WIN32_WCE diff --git a/legacy/evil/src/bin/evil_test_pipe.c b/legacy/evil/src/bin/evil_test_pipe.c index 575b46ff78..426c27e818 100644 --- a/legacy/evil/src/bin/evil_test_pipe.c +++ b/legacy/evil/src/bin/evil_test_pipe.c @@ -12,6 +12,7 @@ #include #include "evil_suite.h" +#include "evil_test_pipe.h" #define FDREAD 0 @@ -38,7 +39,8 @@ thread (void *param) return 0; } -int test_pipe_test(void) +static int +test_pipe_test(void) { int sockets[2]; struct timeval t; diff --git a/legacy/evil/src/bin/evil_test_realpath.c b/legacy/evil/src/bin/evil_test_realpath.c index 246a155e20..0821b904cb 100644 --- a/legacy/evil/src/bin/evil_test_realpath.c +++ b/legacy/evil/src/bin/evil_test_realpath.c @@ -7,6 +7,8 @@ #include #include "evil_suite.h" +#include "evil_test_realpath.h" + int test_realpath_test(void) { diff --git a/legacy/evil/src/lib/Evil.h b/legacy/evil/src/lib/Evil.h index 8ab90480fe..08770745ca 100644 --- a/legacy/evil/src/lib/Evil.h +++ b/legacy/evil/src/lib/Evil.h @@ -148,13 +148,15 @@ typedef unsigned long gid_t; # define _S_IRUSR _S_IREAD # define open(path, flag, ...) _open((path), _O_BINARY | (flag), ##__VA_ARGS__) -//# define close(fd) _close(fd) -//# define read(fd,buffer,count) _read((fd),(buffer),(count)) -//# define write(fd,buffer,count) _write((fd),(buffer),(count)) -//# define unlink(filename) _unlink((filename)) + /* +# define close(fd) _close(fd) +# define read(fd,buffer,count) _read((fd),(buffer),(count)) +# define write(fd,buffer,count) _write((fd),(buffer),(count)) +# define unlink(filename) _unlink((filename)) # define mkdir(p,m) _mkdir(p) -//# define lstat(f,s) _stat((f),(s)) -//# define hypot(x,y) _hypot((x),(y)) +# define lstat(f,s) _stat((f),(s)) +# define hypot(x,y) _hypot((x),(y)) + */ # endif #endif diff --git a/legacy/evil/src/lib/Makefile.am b/legacy/evil/src/lib/Makefile.am index fc06c265dc..edc0258cb2 100644 --- a/legacy/evil/src/lib/Makefile.am +++ b/legacy/evil/src/lib/Makefile.am @@ -27,7 +27,6 @@ endif libevil_la_SOURCES = \ evil_dirent.c \ -evil_errno.c \ evil_fcntl.c \ evil_fnmatch.c \ evil_fnmatch_list_of_states.c \ @@ -45,7 +44,7 @@ evil_uuid.c if EVIL_HAVE_WINCE -libevil_la_SOURCES += evil_link_ce.c +libevil_la_SOURCES += evil_errno.c evil_link_ce.c else diff --git a/legacy/evil/src/lib/evil_errno.c b/legacy/evil/src/lib/evil_errno.c index 9da0bb0d7c..ed0c5cdebe 100644 --- a/legacy/evil/src/lib/evil_errno.c +++ b/legacy/evil/src/lib/evil_errno.c @@ -1,10 +1,9 @@ -#ifdef __MINGW32CE__ +#ifdef HAVE_CONFIG_H +# include +#endif #include "Evil.h" #include "errno.h" int errno = 0; - - -#endif /* __MINGW32CE__ */ diff --git a/legacy/evil/src/lib/evil_main.c b/legacy/evil/src/lib/evil_main.c index 77fe75e0c1..acefa890e7 100644 --- a/legacy/evil/src/lib/evil_main.c +++ b/legacy/evil/src/lib/evil_main.c @@ -17,7 +17,7 @@ extern LONGLONG _evil_time_count; extern long _evil_time_second; int -evil_init() +evil_init(void) { SYSTEMTIME st; LARGE_INTEGER freq; @@ -61,7 +61,7 @@ evil_init() } int -evil_shutdown() +evil_shutdown(void) { if (--_evil_init_count != 0) return _evil_init_count; diff --git a/legacy/evil/src/lib/evil_main.h b/legacy/evil/src/lib/evil_main.h index 9fb50015a9..157e6028b7 100644 --- a/legacy/evil/src/lib/evil_main.h +++ b/legacy/evil/src/lib/evil_main.h @@ -25,7 +25,7 @@ * When Evil is not used anymore, call evil_shutdown() to shut down * the Evil library. */ -EAPI int evil_init(); +EAPI int evil_init(void); /** * @brief Shut down the Evil library. @@ -41,7 +41,7 @@ EAPI int evil_init(); * documentation anymore . You must call evil_init() again to use these * functions again. */ -EAPI int evil_shutdown(); +EAPI int evil_shutdown(void); /** diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.c index 476e7dc539..177b963578 100644 --- a/legacy/evil/src/lib/evil_unistd.c +++ b/legacy/evil/src/lib/evil_unistd.c @@ -56,7 +56,7 @@ _evil_systemtime_to_time(SYSTEMTIME st) */ double -evil_time_get() +evil_time_get(void) { LARGE_INTEGER count; diff --git a/legacy/evil/src/lib/evil_unistd.h b/legacy/evil/src/lib/evil_unistd.h index ef4ef503dd..f6566d8d42 100644 --- a/legacy/evil/src/lib/evil_unistd.h +++ b/legacy/evil/src/lib/evil_unistd.h @@ -33,7 +33,7 @@ * * Supported OS: Windows XP, Windows CE. */ -EAPI double evil_time_get(); +EAPI double evil_time_get(void); /** * @brief Retrieve the time since the Evil library has been diff --git a/legacy/evil/src/lib/evil_util.c b/legacy/evil/src/lib/evil_util.c index 4baad46ffc..4407c0365f 100644 --- a/legacy/evil/src/lib/evil_util.c +++ b/legacy/evil/src/lib/evil_util.c @@ -4,6 +4,7 @@ #endif /* HAVE_CONFIG_H */ #include "Evil.h" +#include "evil_private.h" #include #include @@ -67,7 +68,7 @@ evil_format_message(long err) if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, - 0, // Default language + 0, /* Default language */ (LPTSTR)&msg, 0, NULL))