After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 68748 - xmllint doesn't compile in VC++6
xmllint doesn't compile in VC++6
Status: VERIFIED FIXED
Product: libxml
Classification: Deprecated
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-01-15 09:50 UTC by Richard Jinks
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix for time handling with xmllint on VC++6; untested but inferred by previous comments. (306 bytes, patch)
2002-01-15 15:54 UTC, Justin Fletcher
none Details | Review
Patch for win32config.h, adding HAVE_STDARG_H. (271 bytes, patch)
2002-01-15 16:09 UTC, Justin Fletcher
none Details | Review

Description Richard Jinks 2002-01-15 09:50:14 UTC
The new code added to xmllint.c to add timing information fails when 
compiled in MS VC++6 with the following errors:

Compiling...
xmllint.c
C:\libxml\libxml2-2.4.13\xmllint.c(176) : error C2061: syntax error : 
identifier 'begin'
C:\libxml\libxml2-2.4.13\xmllint.c(176) : error C2059: syntax error : ';'
C:\libxml\libxml2-2.4.13\xmllint.c(176) : error C2059: syntax error : ','
C:\libxml\libxml2-2.4.13\xmllint.c(180) : error C2065: 'begin' : 
undeclared identifier
C:\libxml\libxml2-2.4.13\xmllint.c(180) : warning C4013: 'clock' 
undefined; assuming extern returning int
C:\libxml\libxml2-2.4.13\xmllint.c(188) : error C2065: 'end' : undeclared 
identifier
C:\libxml\libxml2-2.4.13\xmllint.c(189) : error C2065: 'CLOCKS_PER_SEC' : 
undeclared identifier
C:\libxml\libxml2-2.4.13\xmllint.c(192) : fatal error C1189: 
#error :  "endTimer required stdarg functions"
Error executing cl.exe.

xmllint.exe - 7 error(s), 1 warning(s)
Comment 1 Justin Fletcher 2002-01-15 15:52:14 UTC
I propose the addition of an include of time.h in the xmllint.c to 
ensure that some form of time handling is included. My understanding 
is that under VC++ the gettimeofday function is not present. 

The above report implies that on the platform in question :

  HAVE_TIME_H is defined
  HAVE_GETTIMEOFDAY is undefined

I infer from the platform description that _WIN32 and _MSC_VER are 
both defined, and that __CYGWIN__ is undefined.

From this, I believe that the header should have an include of 
<time.h>.

I do not have VC++; this is inference by the above examples.
Comment 2 Justin Fletcher 2002-01-15 15:54:00 UTC
Created attachment 6411 [details] [review]
Proposed fix for time handling with xmllint on VC++6; untested but inferred by previous comments.
Comment 3 Justin Fletcher 2002-01-15 16:01:46 UTC
There is a second issue in this report; that of the 'endTimer 
required stdarg functions'. There is, in my local copy of the VC++ 
headers a stdarg.h and therefore I would have assumed that 
HAVE_STDARG_H would be defined for the windows version of the 
compiler (stdarg.h being a standard C header).

There may be linkage issues involved in using stdarg for which I am
unaware. If there are not, HAVE_STDARG_H should be added to 
win32config.h.

Again, this is inferred, rather than tested.
Comment 4 Justin Fletcher 2002-01-15 16:09:33 UTC
Created attachment 6412 [details] [review]
Patch for win32config.h, adding HAVE_STDARG_H.
Comment 5 Daniel Veillard 2002-02-08 13:42:44 UTC
Okay, I have applied both patches, they look harmless anyway,

 thanks

Daniel
Comment 6 Daniel Veillard 2002-02-12 08:31:47 UTC
I hope libxml2-2.4.15 fixes the problem,

  thanks,

Daniel