summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2008-09-25 09:55:51 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2008-09-25 09:55:51 +0700
commitba851162cd997481a46ffc736ff54a0b898c2959 (patch)
tree2af7fe146b711f982c0cf60a67c0669ae54fec7b
parent38b914d68e911cd10004bf7fc690e82f9e8f3f96 (diff)
downloadlibsha1-ba851162cd997481a46ffc736ff54a0b898c2959.tar.gz
Simplified {VOID,INT}_RETURN macro definitions0.1
-rw-r--r--brg_types.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/brg_types.h b/brg_types.h
index 1f64ed1..99b4874 100644
--- a/brg_types.h
+++ b/brg_types.h
@@ -45,9 +45,8 @@ extern "C" {
#if defined(HAVE_STDINT_H)
# include <stdint.h>
#endif
-
-#ifndef RETURN_VALUES
-# define RETURN_VALUES
+
+#if defined(_WIN32)
# if defined( DLL_EXPORT )
# if defined( _MSC_VER ) || defined ( __INTEL_COMPILER )
# define VOID_RETURN __declspec( dllexport ) void __stdcall
@@ -68,14 +67,16 @@ extern "C" {
# else
# error Use of the DLL is only available on the Microsoft, Intel and GCC compilers
# endif
-# elif defined( __WATCOMC__ )
-# define VOID_RETURN void __cdecl
-# define INT_RETURN int __cdecl
-# else
-# define VOID_RETURN void
-# define INT_RETURN int
# endif
#endif
+#if defined( __WATCOMC__ )
+# define VOID_RETURN void __cdecl
+# define INT_RETURN int __cdecl
+#endif
+#if !defined(VOID_RETURN)
+# define VOID_RETURN void
+# define INT_RETURN int
+#endif
/* These defines are used to declare buffers in a way that allows
faster operations on longer variables to be used. In all these