From: Andre Noll <maan@systemlinux.org>
Date: Fri, 6 Jun 2008 15:24:57 +0000 (+0200)
Subject: Rename the _S macro to OSL_ERROR.
X-Git-Tag: v0.1.0~46
X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=53c4162f4a1fd70343332b9596e89d73c8547e51;p=osl.git

Rename the _S macro to OSL_ERROR.

On NetBSD, _S is already defined.
---

diff --git a/Makefile b/Makefile
index 9c34d74..d329fd1 100644
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ osl_errors.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 > $@
diff --git a/osl.c b/osl.c
index 31b40c2..974ad0c 100644
--- a/osl.c
+++ b/osl.c
@@ -20,20 +20,20 @@
 #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"
-#undef _S
+#undef OSL_ERROR
 	};
 	char str[0];
 } msgstr = { {
-#define _S(n, s) s,
+#define OSL_ERROR(n, s) s,
 #include "errtab.h"
-#undef _S
+#undef OSL_ERROR
 } };
 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"
-#undef _S
+#undef OSL_ERROR
 };
 
 __export const char *osl_strerror(int num)