summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-05-28 02:47:10 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-05-28 02:47:10 +0000
commita8bc94b415eb6f43a0a501cb9e1a76a7ea323da6 (patch)
tree2a1d6687da59b6d06eeed4a69b8eaa4762760aea
parentdede50976b4df5228cdb789f4a17b96587b377c5 (diff)
downloadlibapr-a8bc94b415eb6f43a0a501cb9e1a76a7ea323da6.tar.gz
PR:
Obtained from: Submitted by: Reviewed by: Fix the last of the tags APR_EXPORT_VAR and APR_IMPORT_VAR to the accepted APR_VAR_EXPORT and APR_VAR_IMPORT. This patch finally includes the apr.h.in file (newly added to my grepper). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60111 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/apr.h.in4
-rw-r--r--include/apr.hw19
-rw-r--r--include/apr_getopt.h4
-rw-r--r--include/apr_time.h4
-rw-r--r--misc/unix/getopt.c4
-rw-r--r--time/unix/timestr.c4
-rw-r--r--time/win32/timestr.c4
7 files changed, 22 insertions, 21 deletions
diff --git a/include/apr.h.in b/include/apr.h.in
index 98a9f6b42..e3c6dde3d 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -96,8 +96,8 @@ typedef @off_t_value@ ap_off_t;
#define APR_THREAD_FUNC
#define APR_EXPORT(type) type
#define APR_EXPORT_NONSTD(type) type
-#define APR_IMPORT_VAR extern
-#define APR_EXPORT_VAR
+#define APR_VAR_IMPORT extern
+#define APR_VAR_EXPORT
/* Define APR_SSIZE_T_FMT.
* If ssize_t is an integer we define it to be "d",
diff --git a/include/apr.hw b/include/apr.hw
index edb853b95..828894cb4 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -165,22 +165,23 @@ typedef int gid_t;
#define APR_SSIZE_T_FMT "d"
#define APR_THREAD_FUNC __stdcall
-#if defined(APR_EXPORT_SYMBOLS)
-#define APR_EXPORT(type) __declspec(dllexport) type
-#define APR_EXPORT_NONSTD(type) __declspec(dllexport) type
-#define APR_VAR_EXPORT __declspec(dllexport)
-#define APR_IMPORT_VAR extern __declspec(dllexport)
-#elif defined(APR_STATIC)
+#if !defined(WIN32) || defined(APR_STATIC)
+/* Default Non-WIN32 behavior removes all MSVCisms */
#define APR_EXPORT(type) type
#define APR_EXPORT_NONSTD(type) type
#define APR_VAR_EXPORT
-#define APR_IMPORT_VAR extern
+#define APR_VAR_IMPORT extern
+#elif defined(APR_EXPORT_SYMBOLS)
+#define APR_EXPORT(type) __declspec(dllexport) type
+#define APR_EXPORT_NONSTD(type) __declspec(dllexport) type
+#define APR_VAR_EXPORT __declspec(dllexport)
+#define APR_VAR_IMPORT extern __declspec(dllexport)
#else
-/* Default behavior is to import the shared .dll */
+/* Default WIN32 behavior is to import the shared .dll */
#define APR_EXPORT(type) __declspec(dllimport) type
#define APR_EXPORT_NONSTD(type) __declspec(dllimport) type
#define APR_VAR_EXPORT __declspec(dllimport)
-#define APR_IMPORT_VAR extern __declspec(dllimport)
+#define APR_VAR_IMPORT extern __declspec(dllimport)
#endif
#define ap_signal(a,b) signal(a,b)
diff --git a/include/apr_getopt.h b/include/apr_getopt.h
index e1ca57288..617f469c5 100644
--- a/include/apr_getopt.h
+++ b/include/apr_getopt.h
@@ -55,12 +55,12 @@
#ifndef APR_GETOPT_H
#define APR_GETOPT_H
-APR_IMPORT_VAR int
+APR_VAR_IMPORT int
ap_opterr, /* if error message should be printed */
ap_optind, /* index into parent argv vector */
ap_optopt, /* character checked for validity */
ap_optreset; /* reset getopt */
-APR_IMPORT_VAR char *
+APR_VAR_IMPORT char *
ap_optarg; /* argument associated with option */
/*
diff --git a/include/apr_time.h b/include/apr_time.h
index c423c068b..02e12e0ce 100644
--- a/include/apr_time.h
+++ b/include/apr_time.h
@@ -62,8 +62,8 @@
extern "C" {
#endif /* __cplusplus */
-APR_IMPORT_VAR const char ap_month_snames[12][4];
-APR_IMPORT_VAR const char ap_day_snames[7][4];
+APR_VAR_IMPORT const char ap_month_snames[12][4];
+APR_VAR_IMPORT const char ap_day_snames[7][4];
/* number of microseconds since 00:00:00 january 1, 1970 UTC */
typedef ap_int64_t ap_time_t;
diff --git a/misc/unix/getopt.c b/misc/unix/getopt.c
index 7b47f4397..3bd36c73f 100644
--- a/misc/unix/getopt.c
+++ b/misc/unix/getopt.c
@@ -33,12 +33,12 @@
#include "misc.h"
-APR_EXPORT_VAR int
+APR_VAR_EXPORT int
ap_opterr = 1, /* if error message should be printed */
ap_optind = 1, /* index into parent argv vector */
ap_optopt, /* character checked for validity */
ap_optreset; /* reset getopt */
-APR_EXPORT_VAR char *ap_optarg = ""; /* argument associated with option */
+APR_VAR_EXPORT char *ap_optarg = ""; /* argument associated with option */
#define EMSG ""
diff --git a/time/unix/timestr.c b/time/unix/timestr.c
index 24f0c7a6b..aa65f534f 100644
--- a/time/unix/timestr.c
+++ b/time/unix/timestr.c
@@ -57,11 +57,11 @@
#include <string.h>
-APR_EXPORT_VAR const char ap_month_snames[12][4] =
+APR_VAR_EXPORT const char ap_month_snames[12][4] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-APR_EXPORT_VAR const char ap_day_snames[7][4] =
+APR_VAR_EXPORT const char ap_day_snames[7][4] =
{
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
diff --git a/time/win32/timestr.c b/time/win32/timestr.c
index 4a4ca5ba9..1c118b07e 100644
--- a/time/win32/timestr.c
+++ b/time/win32/timestr.c
@@ -55,11 +55,11 @@
#include "atime.h"
#include "apr_portable.h"
-APR_EXPORT_VAR const char ap_month_snames[12][4] =
+APR_VAR_EXPORT const char ap_month_snames[12][4] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-APR_EXPORT_VAR const char ap_day_snames[7][4] =
+APR_VAR_EXPORT const char ap_day_snames[7][4] =
{
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};