On NetBSD, _S is already defined.
-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 > $@
#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)];
};
char str[0];
} msgstr = { {
};
char str[0];
} msgstr = { {
+#define OSL_ERROR(n, s) s,
} };
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__)),
};
__export const char *osl_strerror(int num)
};
__export const char *osl_strerror(int num)