forked from enlightenment/efl
* 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
This commit is contained in:
parent
31f73712f3
commit
d989abb2aa
|
@ -1,3 +1,26 @@
|
||||||
|
2010-04-01 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
|
* 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 <doursse at users dot sf dot net>
|
2010-03-26 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* src/lib/evil_string.c:
|
* src/lib/evil_string.c:
|
||||||
|
|
|
@ -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_PREREQ([2.52])
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CANONICAL_HOST
|
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
|
case "$host_os" in
|
||||||
cegcc*)
|
cegcc*)
|
||||||
AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
|
AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
|
||||||
|
@ -21,15 +34,9 @@ esac
|
||||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
AC_LIBTOOL_WIN32_DLL
|
LT_INIT([win32-dll])
|
||||||
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
|
|
||||||
VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
|
version_info="lt_rev:lt_cur:lt_age"
|
||||||
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"
|
|
||||||
AC_SUBST(version_info)
|
AC_SUBST(version_info)
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +83,7 @@ AC_C_CONST
|
||||||
AC_C___ATTRIBUTE__
|
AC_C___ATTRIBUTE__
|
||||||
|
|
||||||
win32_cppflags="-DEFL_EVIL_BUILD"
|
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=""
|
win32_cxxflags=""
|
||||||
have_wince="no"
|
have_wince="no"
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
|
@ -123,7 +130,7 @@ echo
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------"
|
||||||
echo "$PACKAGE_NAME $PACKAGE_VERSION $PACKAGE_TARNAME"
|
echo "$PACKAGE_NAME $PACKAGE_VERSION"
|
||||||
echo "------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------"
|
||||||
echo
|
echo
|
||||||
echo "Configuration Options Summary:"
|
echo "Configuration Options Summary:"
|
||||||
|
|
|
@ -175,7 +175,7 @@ suite_show(suite *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main(void)
|
||||||
{
|
{
|
||||||
test tests[] = {
|
test tests[] = {
|
||||||
{ "dlfcn ", test_dlfcn },
|
{ "dlfcn ", test_dlfcn },
|
||||||
|
|
|
@ -8,12 +8,15 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#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
|
static int
|
||||||
test_dlfcn_test_dlopen()
|
test_dlfcn_test_dlopen(void)
|
||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
|
|
||||||
|
@ -28,7 +31,7 @@ test_dlfcn_test_dlopen()
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
test_dlfcn_test_dlsym()
|
test_dlfcn_test_dlsym(void)
|
||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
_evil_init sym_init;
|
_evil_init sym_init;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_environment.h"
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
test_env_test_setenv_NULL(void)
|
test_env_test_setenv_NULL(void)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_gettimeofday.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
test_time_test_gettimeofday(void)
|
test_time_test_gettimeofday(void)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_link.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
test_link_test_file_create(const char *name, const char *data)
|
test_link_test_file_create(const char *name, const char *data)
|
||||||
|
|
|
@ -7,11 +7,16 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_mkstemp.h"
|
||||||
|
|
||||||
int test_mkstemp_test(void)
|
|
||||||
|
static int
|
||||||
|
test_mkstemp_test(void)
|
||||||
{
|
{
|
||||||
char _template[PATH_MAX];
|
char _template[PATH_MAX];
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
char cwd[PATH_MAX];
|
char cwd[PATH_MAX];
|
||||||
|
#endif
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_pipe.h"
|
||||||
|
|
||||||
|
|
||||||
#define FDREAD 0
|
#define FDREAD 0
|
||||||
|
@ -38,7 +39,8 @@ thread (void *param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_pipe_test(void)
|
static int
|
||||||
|
test_pipe_test(void)
|
||||||
{
|
{
|
||||||
int sockets[2];
|
int sockets[2];
|
||||||
struct timeval t;
|
struct timeval t;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <Evil.h>
|
#include <Evil.h>
|
||||||
|
|
||||||
#include "evil_suite.h"
|
#include "evil_suite.h"
|
||||||
|
#include "evil_test_realpath.h"
|
||||||
|
|
||||||
|
|
||||||
int test_realpath_test(void)
|
int test_realpath_test(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,13 +148,15 @@ typedef unsigned long gid_t;
|
||||||
# define _S_IRUSR _S_IREAD
|
# define _S_IRUSR _S_IREAD
|
||||||
|
|
||||||
# define open(path, flag, ...) _open((path), _O_BINARY | (flag), ##__VA_ARGS__)
|
# 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 close(fd) _close(fd)
|
||||||
//# define write(fd,buffer,count) _write((fd),(buffer),(count))
|
# define read(fd,buffer,count) _read((fd),(buffer),(count))
|
||||||
//# define unlink(filename) _unlink((filename))
|
# define write(fd,buffer,count) _write((fd),(buffer),(count))
|
||||||
|
# define unlink(filename) _unlink((filename))
|
||||||
# define mkdir(p,m) _mkdir(p)
|
# define mkdir(p,m) _mkdir(p)
|
||||||
//# define lstat(f,s) _stat((f),(s))
|
# define lstat(f,s) _stat((f),(s))
|
||||||
//# define hypot(x,y) _hypot((x),(y))
|
# define hypot(x,y) _hypot((x),(y))
|
||||||
|
*/
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,7 +27,6 @@ endif
|
||||||
|
|
||||||
libevil_la_SOURCES = \
|
libevil_la_SOURCES = \
|
||||||
evil_dirent.c \
|
evil_dirent.c \
|
||||||
evil_errno.c \
|
|
||||||
evil_fcntl.c \
|
evil_fcntl.c \
|
||||||
evil_fnmatch.c \
|
evil_fnmatch.c \
|
||||||
evil_fnmatch_list_of_states.c \
|
evil_fnmatch_list_of_states.c \
|
||||||
|
@ -45,7 +44,7 @@ evil_uuid.c
|
||||||
|
|
||||||
if EVIL_HAVE_WINCE
|
if EVIL_HAVE_WINCE
|
||||||
|
|
||||||
libevil_la_SOURCES += evil_link_ce.c
|
libevil_la_SOURCES += evil_errno.c evil_link_ce.c
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#ifdef __MINGW32CE__
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Evil.h"
|
#include "Evil.h"
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
|
|
||||||
|
|
||||||
int errno = 0;
|
int errno = 0;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __MINGW32CE__ */
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern LONGLONG _evil_time_count;
|
||||||
extern long _evil_time_second;
|
extern long _evil_time_second;
|
||||||
|
|
||||||
int
|
int
|
||||||
evil_init()
|
evil_init(void)
|
||||||
{
|
{
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
LARGE_INTEGER freq;
|
LARGE_INTEGER freq;
|
||||||
|
@ -61,7 +61,7 @@ evil_init()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
evil_shutdown()
|
evil_shutdown(void)
|
||||||
{
|
{
|
||||||
if (--_evil_init_count != 0)
|
if (--_evil_init_count != 0)
|
||||||
return _evil_init_count;
|
return _evil_init_count;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* When Evil is not used anymore, call evil_shutdown() to shut down
|
* When Evil is not used anymore, call evil_shutdown() to shut down
|
||||||
* the Evil library.
|
* the Evil library.
|
||||||
*/
|
*/
|
||||||
EAPI int evil_init();
|
EAPI int evil_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Shut down the Evil library.
|
* @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
|
* documentation anymore . You must call evil_init() again to use these
|
||||||
* functions again.
|
* functions again.
|
||||||
*/
|
*/
|
||||||
EAPI int evil_shutdown();
|
EAPI int evil_shutdown(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,7 +56,7 @@ _evil_systemtime_to_time(SYSTEMTIME st)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
double
|
double
|
||||||
evil_time_get()
|
evil_time_get(void)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER count;
|
LARGE_INTEGER count;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* Supported OS: Windows XP, Windows CE.
|
* 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
|
* @brief Retrieve the time since the Evil library has been
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
#include "Evil.h"
|
#include "Evil.h"
|
||||||
|
#include "evil_private.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -67,7 +68,7 @@ evil_format_message(long err)
|
||||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL,
|
NULL,
|
||||||
err,
|
err,
|
||||||
0, // Default language
|
0, /* Default language */
|
||||||
(LPTSTR)&msg,
|
(LPTSTR)&msg,
|
||||||
0,
|
0,
|
||||||
NULL))
|
NULL))
|
||||||
|
|
Loading…
Reference in New Issue