forked from enlightenment/efl
* configure.ac:
* src/bin/Makefile.am: * src/bin/test_memcpy.c: compile memcpy_glibc.S only if cegcc or mingw32ce is used * src/bin/test_pipe.c: use evil_sockets_init and evil_sockets_shutdown. * src/lib/evil_unistd.c: formatting SVN revision: 36294
This commit is contained in:
parent
d6ae9053ad
commit
be3df7fcd1
|
@ -1,3 +1,16 @@
|
|||
2008-09-28 Vincent Torri <doursse at users dot sf dot net>
|
||||
|
||||
* configure.ac:
|
||||
* src/bin/Makefile.am:
|
||||
* src/bin/test_memcpy.c:
|
||||
compile memcpy_glibc.S only if cegcc or mingw32ce is used
|
||||
|
||||
* src/bin/test_pipe.c:
|
||||
use evil_sockets_init and evil_sockets_shutdown.
|
||||
|
||||
* src/lib/evil_unistd.c:
|
||||
formatting
|
||||
|
||||
2008-09-15 Vincent Torri <doursse at users dot sf dot net>
|
||||
|
||||
* Makefile.am:
|
||||
|
|
|
@ -8,6 +8,7 @@ AC_CANONICAL_HOST
|
|||
dnl If the host is not windows, we exit,
|
||||
dnl otherwise, we set the correct flags
|
||||
dnl for each platform.
|
||||
have_wince="no"
|
||||
win32_libs=""
|
||||
win32_cflags=""
|
||||
case "$host_os" in
|
||||
|
@ -15,10 +16,12 @@ case "$host_os" in
|
|||
win32_libs="-lole32 -luuid -lws2_32"
|
||||
;;
|
||||
cegcc)
|
||||
have_wince="yes"
|
||||
win32_cflags="-mwin32"
|
||||
win32_libs="-lws2"
|
||||
;;
|
||||
mingw32ce)
|
||||
have_wince="yes"
|
||||
win32_libs="-lws2"
|
||||
;;
|
||||
*)
|
||||
|
@ -28,6 +31,12 @@ esac
|
|||
AC_SUBST(win32_cflags)
|
||||
AC_SUBST(win32_libs)
|
||||
|
||||
if test "x${have_wince}" = "xyes" ; then
|
||||
AC_DEFINE(EVIL_HAVE_WINCE, 1, [Define to mention that Windows CE is the target])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(EVIL_HAVE_WINCE, test "x${have_wince}" = "xyes")
|
||||
|
||||
dnl needed for correct definition of EAPI
|
||||
AC_DEFINE(EFL_EVIL_BUILD, 1, [Define to mention that evil is built])
|
||||
AC_DEFINE(EFL_EVIL_DLFCN_BUILD, 1, [Define to mention that evil dlfcn is built])
|
||||
|
|
|
@ -11,7 +11,14 @@ AM_CFLAGS = @win32_cflags@
|
|||
|
||||
bin_PROGRAMS = suite test_dlfcn test_pipe test_evil
|
||||
|
||||
suite_SOURCES = suite.c test_memcpy.c memcpy_glibc.S
|
||||
suite_SOURCES = suite.c test_memcpy.c
|
||||
|
||||
if EVIL_HAVE_WINCE
|
||||
|
||||
suite_SOURCES += memcpy_glibc.S
|
||||
|
||||
endif
|
||||
|
||||
suite_LDADD = $(top_builddir)/src/lib/libevil.la
|
||||
suite_LDFLAGS = -Wl,--enable-auto-import
|
||||
suite_DEPENDENCIES = $(top_builddir)/src/lib/libevil.la
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "suite.h"
|
||||
#include "test_memcpy.h"
|
||||
|
||||
|
@ -70,7 +74,9 @@ test_memcpy_tests_run(size_t align1, size_t align2, size_t len)
|
|||
printf ("length: %6d, align %2d/%2d:", (int)len, align1, align2);
|
||||
|
||||
test_memcpy_test_run(memcpy, s2, s1, len);
|
||||
#ifdef EVIL_HAVE_WINCE
|
||||
test_memcpy_test_run(memcpy_glibc, s2, s1, len);
|
||||
#endif /* EVIL_HAVE_WINCE */
|
||||
|
||||
printf ("\n");
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <winsock2.h>
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Evil.h"
|
||||
|
||||
#define FDREAD 0
|
||||
|
@ -34,7 +35,6 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
int sockets[2];
|
||||
WSADATA version_data;
|
||||
int ret;
|
||||
fd_set rfds;
|
||||
struct timeval t;
|
||||
|
@ -42,18 +42,21 @@ main (int argc, char *argv[])
|
|||
DWORD thread_id;
|
||||
HANDLE h;
|
||||
|
||||
if (!evil_sockets_init())
|
||||
return EXIT_FAILURE;
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
|
||||
t.tv_sec = 5;
|
||||
t.tv_usec = 0;
|
||||
|
||||
WSAStartup(MAKEWORD(2, 2), &version_data);
|
||||
|
||||
if (pipe(sockets) < 0)
|
||||
{
|
||||
printf ("error\n");
|
||||
return -1;
|
||||
printf ("can not create sockets\n");
|
||||
evil_sockets_shutdown();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
FD_SET(sockets[FDREAD], &rfds);
|
||||
d = (data *)malloc(sizeof (data));
|
||||
d->val = 14;
|
||||
|
@ -91,5 +94,7 @@ main (int argc, char *argv[])
|
|||
|
||||
CloseHandle (h);
|
||||
|
||||
return 0;
|
||||
evil_sockets_shutdown();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue