On Tue, 14 Oct 2003 04:25:23 +0200
Roland Scheidegger <[EMAIL PROTECTED]> wrote:
> cvs trunk will no longer compile for me:
>
> gcc ... xmlconfig.c
> xmlconfig.c:268:29: warning: ISO C does not permit named variadic macros
> xmlconfig.c:280:27: warning: ISO C does not permit named variadic macros
> xmlconfig.c:294:27: warning: ISO C does not permit named variadic macros
> xmlconfig.c: In function `driParseOptionInfo':
> xmlconfig.c:499: warning: ISO C forbids forward references to `enum' types
> xmlconfig.c:499: storage size of `s' isn't known
> xmlconfig.c:531: `XML_STATUS_OK' undeclared (first use in this function)
> xmlconfig.c:531: (Each undeclared identifier is reported only once
> xmlconfig.c:531: for each function it appears in.)
> xmlconfig.c:499: warning: unused variable `s'
> xmlconfig.c: In function `parseOneConfigFile':
> xmlconfig.c:711: warning: ISO C forbids forward references to `enum' types
> xmlconfig.c:711: storage size of `s' isn't known
> xmlconfig.c:734: `XML_STATUS_OK' undeclared (first use in this function)
> xmlconfig.c:711: warning: unused variable `s'
> make: *** [xmlconfig.o] Fehler 1
>
> Some quick googling shows this looks like it's some compatibility
> problem with expat. Currently, I have installed expat 1.95.4 (SuSE 8.1,
> gcc 3.2).
> Am I just supposed to upgrade expat? That's no problem, but aren't all
> those expat 1.95.x releases supposed to be source (and binary) compatible?
Jos� reported a similar problem with building the snapshots but solved
it, probably by upgrading expat. Also Alan upgraded the expat version in
XFree86 CVS, so there wont be a problem when the config stuff goes into
XFree86.
Anyway, does the attached patch work for you. It compiles ok with expat
1.95.6 here.
>
> Roland
>
Regards,
Felix
------------ __\|/__ ___ ___ -------------------------
Felix ___\_e -_/___/ __\___/ __\_____ You can do anything,
K�hling (_____\�/____/ /_____/ /________) just not everything
[EMAIL PROTECTED] \___/ \___/ U at the same time.
Index: xmlconfig.c
===================================================================
RCS file: /cvs/dri/xc/xc/lib/GL/mesa/src/drv/common/xmlconfig.c,v
retrieving revision 1.2
diff -u -r1.2 xmlconfig.c
--- xmlconfig.c 9 Oct 2003 09:55:58 -0000 1.2
+++ xmlconfig.c 14 Oct 2003 13:00:17 -0000
@@ -496,7 +496,7 @@
void driParseOptionInfo (driOptionCache *info) {
XML_Parser p;
- enum XML_Status s;
+ int status;
struct OptInfoData userData;
struct OptInfoData *data = &userData;
GLuint nOptions;
@@ -527,8 +527,8 @@
userData.inEnum = GL_FALSE;
userData.curOption = -1;
- s = XML_Parse (p, __driConfigOptions, strlen (__driConfigOptions), 1);
- if (s != XML_STATUS_OK)
+ status = XML_Parse (p, __driConfigOptions, strlen (__driConfigOptions), 1);
+ if (!status)
XML_FATAL ("%s.", XML_ErrorString(XML_GetErrorCode(p)));
XML_ParserFree (p);
@@ -708,7 +708,7 @@
static void parseOneConfigFile (XML_Parser p) {
#define BUF_SIZE 0x1000
struct OptConfData *data = (struct OptConfData *)XML_GetUserData (p);
- enum XML_Status s;
+ int status;
int fd;
if ((fd = open (data->name, O_RDONLY)) == -1) {
@@ -730,8 +730,8 @@
data->name, strerror (errno));
break;
}
- s = XML_ParseBuffer (p, bytesRead, bytesRead == 0);
- if (s != XML_STATUS_OK) {
+ status = XML_ParseBuffer (p, bytesRead, bytesRead == 0);
+ if (!status) {
XML_ERROR ("%s.", XML_ErrorString(XML_GetErrorCode(p)));
break;
}