summaryrefslogtreecommitdiff
path: root/legacy/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-02-18 18:11:10 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-02-18 18:11:10 +0000
commit3ece862b75a70492f7f5210ea36f9910635492b3 (patch)
treea1923a75066412ed057c1401ba50c2ec9cc96898 /legacy/evil
parent62f4f8f2f8289623c3fc41b9f2ea71c430de92e4 (diff)
* src/lib/Evil.h:
* src/lib/Makefile.am: * src/lib/evil_macro.h: * src/lib/evil_print.h: * src/lib/evil_macro_pop.h (added): Undef __cdecl if it has been defined by Evil and move some defined macro to evil_macro_pop.h * src/lib/evil_unistd.c: * src/lib/evil_unistd.h: Define gettimeofday() only for vc++ as MinGW-w64 already defines it. SVN revision: 68117
Diffstat (limited to 'legacy/evil')
-rw-r--r--legacy/evil/ChangeLog15
-rw-r--r--legacy/evil/src/lib/Evil.h20
-rw-r--r--legacy/evil/src/lib/Makefile.am1
-rw-r--r--legacy/evil/src/lib/evil_macro.h1
-rw-r--r--legacy/evil/src/lib/evil_macro_pop.h93
-rw-r--r--legacy/evil/src/lib/evil_print.h66
-rw-r--r--legacy/evil/src/lib/evil_unistd.c2
-rw-r--r--legacy/evil/src/lib/evil_unistd.h4
8 files changed, 114 insertions, 88 deletions
diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog
index 14b9e71f0e..b0aeccdaa0 100644
--- a/legacy/evil/ChangeLog
+++ b/legacy/evil/ChangeLog
@@ -1,3 +1,18 @@
12012-02-18 Vincent Torri <doursse at users dot sf dot net>
2
3 * src/lib/Evil.h:
4 * src/lib/Makefile.am:
5 * src/lib/evil_macro.h:
6 * src/lib/evil_print.h:
7 * src/lib/evil_macro_pop.h (added):
8 Undef __cdecl if it has been defined by Evil and
9 move some defined macro to evil_macro_pop.h
10
11 * src/lib/evil_unistd.c:
12 * src/lib/evil_unistd.h:
13 Define gettimeofday() only for vc++ as MinGW-w64
14 already defines it.
15
12012-02-17 Vincent Torri <doursse at users dot sf dot net> 162012-02-17 Vincent Torri <doursse at users dot sf dot net>
2 17
3 * AUTHORS: 18 * AUTHORS:
diff --git a/legacy/evil/src/lib/Evil.h b/legacy/evil/src/lib/Evil.h
index 6d3ccb779b..b49bd0e2b5 100644
--- a/legacy/evil/src/lib/Evil.h
+++ b/legacy/evil/src/lib/Evil.h
@@ -129,25 +129,7 @@ typedef unsigned long gid_t;
129#include "evil_time.h" 129#include "evil_time.h"
130#include "evil_unistd.h" 130#include "evil_unistd.h"
131#include "evil_util.h" 131#include "evil_util.h"
132 132#include "evil_macro_pop.h"
133#define fprintf _evil_fprintfa
134#define printf _evil_printfa
135#define snprintf _evil_snprintfa
136#define sprintf _evil_sprintfa
137#define vfprintf _evil_vfprintfa
138#define vprintf _evil_vprintfa
139#define vsnprintf _evil_vsnprintfa
140#define vsprintf _evil_vsprintfa
141
142#define fscanf _evil_fscanf
143#define scanf _evil_scanf
144#define sscanf _evil_sscanf
145#define vfscanf _evil_vfscanf
146#define vscanf _evil_vscanf
147#define vsscanf _evil_vsscanf
148
149#define asprintf _evil_asprintf
150#define vasprintf _evil_vasprintf
151 133
152 134
153#if (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) 135#if (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__))
diff --git a/legacy/evil/src/lib/Makefile.am b/legacy/evil/src/lib/Makefile.am
index 54f2beddba..87cbb9f398 100644
--- a/legacy/evil/src/lib/Makefile.am
+++ b/legacy/evil/src/lib/Makefile.am
@@ -13,6 +13,7 @@ evil_inet.h \
13evil_langinfo.h \ 13evil_langinfo.h \
14evil_libgen.h \ 14evil_libgen.h \
15evil_macro.h \ 15evil_macro.h \
16evil_macro_pop.h \
16evil_main.h \ 17evil_main.h \
17evil_print.h \ 18evil_print.h \
18evil_stdlib.h \ 19evil_stdlib.h \
diff --git a/legacy/evil/src/lib/evil_macro.h b/legacy/evil/src/lib/evil_macro.h
index b8d043db01..b2500d33c7 100644
--- a/legacy/evil/src/lib/evil_macro.h
+++ b/legacy/evil/src/lib/evil_macro.h
@@ -3,6 +3,7 @@
3 3
4 4
5#ifndef __cdecl 5#ifndef __cdecl
6# define EVIL_CDECL_IS_DEFINED
6# ifdef __GNUC__ 7# ifdef __GNUC__
7# define __cdecl __attribute__((__cdecl__)) 8# define __cdecl __attribute__((__cdecl__))
8# else 9# else
diff --git a/legacy/evil/src/lib/evil_macro_pop.h b/legacy/evil/src/lib/evil_macro_pop.h
new file mode 100644
index 0000000000..a82818da9b
--- /dev/null
+++ b/legacy/evil/src/lib/evil_macro_pop.h
@@ -0,0 +1,93 @@
1#ifndef __EVIL_MACRO_POP_H__
2#define __EVIL_MACRO_POP_H__
3
4
5#ifdef EVIL_CDECL_IS_DEFINED
6# undef __cdecl
7# undef EVIL_CDECL_IS_DEFINED
8#endif
9
10#define fprintf _evil_fprintfa
11#define printf _evil_printfa
12#define snprintf _evil_snprintfa
13#define sprintf _evil_sprintfa
14#define vfprintf _evil_vfprintfa
15#define vprintf _evil_vprintfa
16#define vsnprintf _evil_vsnprintfa
17#define vsprintf _evil_vsprintfa
18
19#define fscanf _evil_fscanf
20#define scanf _evil_scanf
21#define sscanf _evil_sscanf
22#define vfscanf _evil_vfscanf
23#define vscanf _evil_vscanf
24#define vsscanf _evil_vsscanf
25
26#define asprintf _evil_asprintf
27#define vasprintf _evil_vasprintf
28
29/* Redefine to GNU specific PRI... and SCN... macros. */
30
31#define PRId64 "lld"
32#define PRIdLEAST64 "lld"
33#define PRIdFAST64 "lld"
34#define PRIdMAX "lld"
35#define PRIi64 "lli"
36#define PRIiLEAST64 "lli"
37#define PRIiFAST64 "lli"
38#define PRIiMAX "lli"
39#define PRIo64 "llo"
40#define PRIoLEAST64 "llo"
41#define PRIoFAST64 "llo"
42#define PRIoMAX "llo"
43#define PRIu64 "llu"
44#define PRIuLEAST64 "llu"
45#define PRIuFAST64 "llu"
46#define PRIuMAX "llu"
47#define PRIx64 "llx"
48#define PRIxLEAST64 "llx"
49#define PRIxFAST64 "llx"
50#define PRIxMAX "llx"
51#define PRIX64 "llX"
52#define PRIXLEAST64 "llX"
53#define PRIXFAST64 "llX"
54#define PRIXMAX "llX"
55
56#define SCNd64 "lld"
57#define SCNdLEAST64 "lld"
58#define SCNdFAST64 "lld"
59#define SCNdMAX "lld"
60#define SCNi64 "lli"
61#define SCNiLEAST64 "lli"
62#define SCNiFAST64 "lli"
63#define SCNiMAX "lli"
64#define SCNo64 "llo"
65#define SCNoLEAST64 "llo"
66#define SCNoFAST64 "llo"
67#define SCNoMAX "llo"
68#define SCNx64 "llx"
69#define SCNxLEAST64 "llx"
70#define SCNxFAST64 "llx"
71#define SCNxMAX "llx"
72#define SCNu64 "llu"
73#define SCNuLEAST64 "llu"
74#define SCNuFAST64 "llu"
75#define SCNuMAX "llu"
76
77#ifdef _WIN64
78#define PRIdPTR "lld"
79#define PRIiPTR "lli"
80#define PRIoPTR "llo"
81#define PRIuPTR "llu"
82#define PRIxPTR "llx"
83#define PRIXPTR "llX"
84
85#define SCNdPTR "lld"
86#define SCNiPTR "lli"
87#define SCNoPTR "llo"
88#define SCNxPTR "llx"
89#define SCNuPTR "llu"
90#endif /* _WIN64 */
91
92
93#endif /* __EVIL_MACRO_POP_H__ */
diff --git a/legacy/evil/src/lib/evil_print.h b/legacy/evil/src/lib/evil_print.h
index 1622b03b70..511247bcbd 100644
--- a/legacy/evil/src/lib/evil_print.h
+++ b/legacy/evil/src/lib/evil_print.h
@@ -33,71 +33,5 @@ EAPI int __cdecl _evil_vprintfw(const wchar_t *, va_list) __EVIL_NOTHROW;
33EAPI int __cdecl _evil_vsprintfw(wchar_t *, const wchar_t *, va_list) __EVIL_NOTHROW; 33EAPI int __cdecl _evil_vsprintfw(wchar_t *, const wchar_t *, va_list) __EVIL_NOTHROW;
34EAPI int __cdecl _evil_vsnprintfw(wchar_t *, size_t, const wchar_t *, va_list) __EVIL_NOTHROW; 34EAPI int __cdecl _evil_vsnprintfw(wchar_t *, size_t, const wchar_t *, va_list) __EVIL_NOTHROW;
35 35
36/* Redefine to GNU specific PRI... and SCN... macros. */
37/* #if defined(_INTTYPES_H_) && defined(PRId64) */
38
39#define PRId64 "lld"
40#define PRIdLEAST64 "lld"
41#define PRIdFAST64 "lld"
42#define PRIdMAX "lld"
43#define PRIi64 "lli"
44#define PRIiLEAST64 "lli"
45#define PRIiFAST64 "lli"
46#define PRIiMAX "lli"
47#define PRIo64 "llo"
48#define PRIoLEAST64 "llo"
49#define PRIoFAST64 "llo"
50#define PRIoMAX "llo"
51#define PRIu64 "llu"
52#define PRIuLEAST64 "llu"
53#define PRIuFAST64 "llu"
54#define PRIuMAX "llu"
55#define PRIx64 "llx"
56#define PRIxLEAST64 "llx"
57#define PRIxFAST64 "llx"
58#define PRIxMAX "llx"
59#define PRIX64 "llX"
60#define PRIXLEAST64 "llX"
61#define PRIXFAST64 "llX"
62#define PRIXMAX "llX"
63
64#define SCNd64 "lld"
65#define SCNdLEAST64 "lld"
66#define SCNdFAST64 "lld"
67#define SCNdMAX "lld"
68#define SCNi64 "lli"
69#define SCNiLEAST64 "lli"
70#define SCNiFAST64 "lli"
71#define SCNiMAX "lli"
72#define SCNo64 "llo"
73#define SCNoLEAST64 "llo"
74#define SCNoFAST64 "llo"
75#define SCNoMAX "llo"
76#define SCNx64 "llx"
77#define SCNxLEAST64 "llx"
78#define SCNxFAST64 "llx"
79#define SCNxMAX "llx"
80#define SCNu64 "llu"
81#define SCNuLEAST64 "llu"
82#define SCNuFAST64 "llu"
83#define SCNuMAX "llu"
84
85#ifdef _WIN64
86#define PRIdPTR "lld"
87#define PRIiPTR "lli"
88#define PRIoPTR "llo"
89#define PRIuPTR "llu"
90#define PRIxPTR "llx"
91#define PRIXPTR "llX"
92
93#define SCNdPTR "lld"
94#define SCNiPTR "lli"
95#define SCNoPTR "llo"
96#define SCNxPTR "llx"
97#define SCNuPTR "llu"
98#endif /* _WIN64 */
99
100/* #endif /\* defined(_INTTYPES_H_) && defined(PRId64) *\/ */
101
102 36
103#endif /* __EVIL_PRINT_H__ */ 37#endif /* __EVIL_PRINT_H__ */
diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.c
index ddddae1fb1..e1498509df 100644
--- a/legacy/evil/src/lib/evil_unistd.c
+++ b/legacy/evil/src/lib/evil_unistd.c
@@ -66,6 +66,7 @@ evil_time_get(void)
66 return (double)_evil_time_second + (double)(count.QuadPart - _evil_time_count)/ (double)_evil_time_freq; 66 return (double)_evil_time_second + (double)(count.QuadPart - _evil_time_count)/ (double)_evil_time_freq;
67} 67}
68 68
69#ifdef _MSC_VER
69int 70int
70evil_gettimeofday(struct timeval *tp, void *tzp __UNUSED__) 71evil_gettimeofday(struct timeval *tp, void *tzp __UNUSED__)
71{ 72{
@@ -80,7 +81,6 @@ evil_gettimeofday(struct timeval *tp, void *tzp __UNUSED__)
80 return 1; 81 return 1;
81} 82}
82 83
83#ifdef _MSC_VER
84int 84int
85evil_usleep(unsigned long usec) 85evil_usleep(unsigned long usec)
86{ 86{
diff --git a/legacy/evil/src/lib/evil_unistd.h b/legacy/evil/src/lib/evil_unistd.h
index ae21b4bc6e..db6cd022fc 100644
--- a/legacy/evil/src/lib/evil_unistd.h
+++ b/legacy/evil/src/lib/evil_unistd.h
@@ -35,6 +35,8 @@
35 */ 35 */
36EAPI double evil_time_get(void); 36EAPI double evil_time_get(void);
37 37
38#ifdef _MSC_VER
39
38/** 40/**
39 * @brief Retrieve the time since the Evil library has been 41 * @brief Retrieve the time since the Evil library has been
40 * initialized. 42 * initialized.
@@ -62,8 +64,6 @@ EAPI int evil_gettimeofday(struct timeval * tp, void * tzp);
62 */ 64 */
63#define gettimeofday(tp,tzp) evil_gettimeofday((tp),(tzp)) 65#define gettimeofday(tp,tzp) evil_gettimeofday((tp),(tzp))
64 66
65#ifdef _MSC_VER
66
67/** 67/**
68 * @brief Suspend the execution of the calling process for microsecond 68 * @brief Suspend the execution of the calling process for microsecond
69 * intervals. 69 * intervals.