projects
/
libusual.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b45a4a
)
base: add few macros
author
Marko Kreen
<markokr@gmail.com>
Wed, 9 Sep 2009 19:08:10 +0000
(22:08 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 9 Sep 2009 19:08:10 +0000
(22:08 +0300)
STR - usual CPP stringifing
DLLEXPORT,DLLIMPORT for dlls on win32
usual/base.h
patch
|
blob
|
blame
|
history
diff --git
a/usual/base.h
b/usual/base.h
index 96d21f89d6e3af22dfcac957c55069506b3459fd..0c35df39a4cab33be81aeea180afdf72877cc9ec 100644
(file)
--- a/
usual/base.h
+++ b/
usual/base.h
@@
-31,6
+31,11
@@
#ifdef WIN32
#include <usual/base_win32.h>
+#define DLLEXPORT __declspec(dllexport)
+#define DLLIMPORT __declspec(dllimport)
+#else
+#define DLLEXPORT
+#define DLLIMPORT
#endif
/* give offset of a field inside struct */
@@
-119,5
+124,9
@@
static inline void *zmalloc(size_t len)
return calloc(1, len);
}
+/* cpp expr -> string */
+#define _STR_(identifier) #identifier
+#define STR(x) _STR_(x)
+
#endif