Testing a mod_perl & libapreq build on Windows I have come across a
problem introduced into the current SVN trunk of libapreq by revision
1124400.

The attached patch fixes the problem for me on Windows, and hopefully
for any NeXT and NetWare users out there too, but it seems I don't
have commit access to apreq. Please could somebody apply this (and
even test the non-Windows cases first if possible too)?
Index: library/t/at.h
===================================================================
--- library/t/at.h	(revision 1580044)
+++ library/t/at.h	(working copy)
@@ -77,8 +77,17 @@
 };
 
 
+#if !defined(__GNUC__) || __GNUC__ < 2 || \
+    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
+    defined(NEXT) || defined(NETWARE)
+#define AT_INLINE
+#elif defined(WIN32)
+#define AT_INLINE __inline
+#else
+#define AT_INLINE __inline__
+#endif
 
-static inline
+static AT_INLINE
 int at_report(at_t *t, const char *msg) {
     at_report_t *r = t->report;
     return r->func(r, msg);
@@ -129,7 +138,7 @@
 
 int at_comment(at_t *t, const char *fmt, va_list vp);
 
-static inline
+static AT_INLINE
 void at_debug(at_t *t, const char *fmt, ...) {
     va_list vp;
     va_start(vp, fmt);
@@ -138,7 +147,7 @@
     va_end(vp);
 }
 
-static inline
+static AT_INLINE
 void at_trace(at_t *t, const char *fmt, ...) {
     va_list vp;
     va_start(vp, fmt);
@@ -150,7 +159,7 @@
 
 /* These are "checks". */
 
-static inline
+static AT_INLINE
 void at_check(at_t *t, int is_ok, const char *label, const char *file,
            int line, const char *fmt, ...)
 {
@@ -268,7 +277,7 @@
                                   __FILE__, __LINE__, fmt, a, b)
 
 
-static inline
+static AT_INLINE
 void at_skip(at_t *t, int n, const char *reason, const char *file, int line) {
     char buf[256];
     while (n-- > 0) {
@@ -285,7 +294,7 @@
 /* Report utilities. */
 
 at_report_t *at_report_file_make(FILE *f);
-inline
+AT_INLINE
 static at_report_t *at_report_stdout_make(void)
 {
     return at_report_file_make(stdout);

Reply via email to