]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Rename the _S macro to OSL_ERROR.
authorAndre Noll <maan@systemlinux.org>
Fri, 6 Jun 2008 15:24:57 +0000 (17:24 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 6 Jun 2008 15:24:57 +0000 (17:24 +0200)
On NetBSD, _S is already defined.

Makefile
osl.c

index 9c34d749eb4071ed43c5a0dd650adcf4c7ef3411..d329fd13387f8b22b8f74560ff39c47d14b9e8be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ osl_errors.h: errlist
                -e '$$s/$$/};/1' $< > $@
 
 errtab.h: errlist
                -e '$$s/$$/};/1' $< > $@
 
 errtab.h: errlist
-       sed -e 's/^\([A-Z_]*\)\s*\(.*\)/_S(E_OSL_\1, \2)/g' $< > $@
+       sed -e 's/^\([A-Z_]*\)\s*\(.*\)/OSL_ERROR(E_OSL_\1, \2)/g' $< > $@
 
 osl.h: osl.h.in osl_errors.h Makefile
        cat osl.h.in osl_errors.h > $@
 
 osl.h: osl.h.in osl_errors.h Makefile
        cat osl.h.in osl_errors.h > $@
diff --git a/osl.c b/osl.c
index 31b40c2c8d84c58cdfe5537faf7124f254196e15..974ad0c0a66c67a332fbf00a0a9115a6a858de8e 100644 (file)
--- a/osl.c
+++ b/osl.c
 #define MSGSTRFIELD1(line) str##line
 static const union msgstr_t {
        struct {
 #define MSGSTRFIELD1(line) str##line
 static const union msgstr_t {
        struct {
-#define _S(n, s) char MSGSTRFIELD(__LINE__)[sizeof(s)];
+#define OSL_ERROR(n, s) char MSGSTRFIELD(__LINE__)[sizeof(s)];
 #include "errtab.h"
 #include "errtab.h"
-#undef _S
+#undef OSL_ERROR
        };
        char str[0];
 } msgstr = { {
        };
        char str[0];
 } msgstr = { {
-#define _S(n, s) s,
+#define OSL_ERROR(n, s) s,
 #include "errtab.h"
 #include "errtab.h"
-#undef _S
+#undef OSL_ERROR
 } };
 static const unsigned int errmsgidx[] = {
 } };
 static const unsigned int errmsgidx[] = {
-#define _S(n, s) [n] = offsetof(union msgstr_t, MSGSTRFIELD(__LINE__)),
+#define OSL_ERROR(n, s) [n] = offsetof(union msgstr_t, MSGSTRFIELD(__LINE__)),
 #include "errtab.h"
 #include "errtab.h"
-#undef _S
+#undef OSL_ERROR
 };
 
 __export const char *osl_strerror(int num)
 };
 
 __export const char *osl_strerror(int num)