]> granicus.if.org Git - apache/commitdiff
Parallels the commit to apr.h.in/apr.hw for the apache core library.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Oct 2000 17:08:39 +0000 (17:08 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Oct 2000 17:08:39 +0000 (17:08 +0000)
  Only mod_dav/mod_dav_fs and ap_hooks.h (as best examples) will use these
  symbols until it is acceptable to all or the new symbols are backed out.

  This symbol rename will have the unique quality that
  strlen("API_EXPORT") == strlen("AP_DECLARE"), therefore the mass symbol
  rename will not throw off function continuation lines.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86539 13f79535-47bb-0310-9956-ffa450edef68

include/ap_config.h

index 2176114237e22916cab83855b662d87eed9cee71..c75b6f554e0659cd7fcc53c94fa4c7616d56a7b9 100644 (file)
 #include "ap_mmn.h"            /* MODULE_MAGIC_NUMBER_ */
 #include "apr_lib.h"           /* apr_isfoo() macros */
 
-/* Implemented flags for dynamic library bindings.
- *
- *   API_EXPORT(type)        for functions bound in the apache core, except:
- *   API_EXPORT_NONSTD(type) for functions with var args (only as ...)
- *   API_VAR_EXPORT          for data residing in the core
- *   MODULE_VAR_EXPORT       is a hack that will need to go away
+/* Create a set of AP_DECLARE(type), AP_DECLARE_NONSTD(type) and 
+ * AP_DECLARE_DATA with appropriate export and import tags for the platform
  */
+#if !defined(WIN32)
+#define AP_DECLARE(type)            type
+#define AP_DECLARE_NONSTD(type)     type
+#define AP_DECLARE_DATA
+#elif defined(AP_DECLARE_STATIC)
+#define AP_DECLARE(type)            type __stdcall
+#define AP_DECLARE_NONSTD(type)     type
+#define AP_DECLARE_DATA
+#elif defined(AP_DECLARE_EXPORT)
+#define AP_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define AP_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define AP_DECLARE_DATA             __declspec(dllexport)
+#else
+#define AP_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define AP_DECLARE_NONSTD(type)     __declspec(dllimport) type
+#define AP_DECLARE_DATA             __declspec(dllimport)
+#endif
 
+/* setup compat like aliases for authors
+ */
+#define API_EXPORT(t)        AP_DECLARE(t)
+#define API_EXPORT_NONSTD(t) AP_DECLARE_NONSTD(t)
+#define API_VAR_EXPORT       AP_DECLARE_DATA
+
+/* Play a little game.  Unless MODULE_DECLARE_STATIC 
+ * is defined, MODULE_DECLARE_* macros are always exported
+ */
+/* Create a set of MODULE_DECLARE(type), MODULE_DECLARE_NONSTD(type) and 
+ * MODULE_DECLARE_DATA with appropriate export and import tags for the platform
+ */
 #if !defined(WIN32)
-#define API_EXPORT(type)        type
-#define API_EXPORT_NONSTD(type) type
-#define API_VAR_EXPORT
-#define MODULE_EXPORT(type)     type
-#define MODULE_VAR_EXPORT
-#elif defined(API_STATIC)
-#define API_EXPORT(type)        type __stdcall
-#define API_EXPORT_NONSTD(type) type
-#define API_VAR_EXPORT
-#define MODULE_EXPORT(type)     type __stdcall
-#define MODULE_VAR_EXPORT
-#elif defined(API_EXPORT_SYMBOLS)
-#define API_EXPORT(type)        __declspec(dllexport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllexport) type
-#define API_VAR_EXPORT         __declspec(dllexport)
-#define MODULE_EXPORT(type)     __declspec(dllexport) type __stdcall
-#define MODULE_VAR_EXPORT       __declspec(dllexport)
+#define MODULE_DECLARE(type)            type
+#define MODULE_DECLARE_NONSTD(type)     type
+#define MODULE_DECLARE_DATA
+#elif defined(MODULE_DECLARE_STATIC)
+#define MODULE_DECLARE(type)            type __stdcall
+#define MODULE_DECLARE_NONSTD(type)     type
+#define MODULE_DECLARE_DATA
 #else
-#define API_EXPORT(type)        __declspec(dllimport) type __stdcall
-#define API_EXPORT_NONSTD(type) __declspec(dllimport) type
-#define API_VAR_EXPORT         __declspec(dllimport)
-#define MODULE_EXPORT(type)     __declspec(dllexport) type __stdcall
-#define MODULE_VAR_EXPORT       __declspec(dllexport)
+#define MODULE_DECLARE_EXPORT
+#define MODULE_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define MODULE_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define MODULE_DECLARE_DATA             __declspec(dllexport)
 #endif
 
+#define MODULE_VAR_EXPORT    MODULE_DECLARE_DATA
+
 #ifdef WIN32
 #include "os.h"
 #else