|
List Info
Thread: libxml2.xmlIO.awn.1.patch
|
|
| libxml2.xmlIO.awn.1.patch |

|
2006-09-09 14:20:08 |
> 2006-09-06 Andrew W. Nosenko
<andrew.w.nosenko gmail.com
<mailto:andrew.w.nosenko gmail.com>>
>
> * xmlIO.c [HAVE_STAT && HAVE__STAT]:
> Fix the compilation breakage: macro that redefines of
the 'stat'
> as '_stat' is removed (was introduced in the
r1.172).
>
Removing this macro results in occurrence of warnings about
types incompatibility in _wstat() call on Windows.
Changes in this patch (for xmlIO.c rev. 1.172):
1. Replacement of 'stat' on '_stat' only on Windows
2. C style comments are used
I hope, patch must solve compilation problem.
I have no FreeBSD, but library was also compiled with glibc
2.0, both
HAVE_STAT and HAVE__STAT was defined.
--- xmlIO.orig.c Fri Sep 1 12:27:58 2006
+++ xmlIO.c Sat Sep 9 13:38:20 2006
 -52,7
+52,9 
# endif
#else
# ifdef HAVE__STAT
+# if defined(_WIN32) || defined (__DJGPP__) &&
!defined (__CYGWIN__)
# define stat _stat
+# endif
# endif
#endif
#ifdef HAVE_STAT
 -598,7
+600,7 
fd = _wfopen(wPath, mode ? L"wb" :
L"rb");
xmlFree(wPath);
}
- // maybe path in native encoding
+ /* maybe path in native encoding */
if(fd == NULL)
fd = fopen(path, mode ? "wb" :
"rb");
 -626,7
+628,7 
retval = _wstat(wPath,info);
xmlFree(wPath);
}
- // maybe path in native encoding
+ /* maybe path in native encoding */
if(retval < 0)
retval = stat(path,info);
return retval;
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| libxml2.xmlIO.awn.1.patch |

|
2006-09-10 00:15:56 |
Emelyanov Alexey wrote:
>> 2006-09-06 Andrew W. Nosenko
<andrew.w.nosenko gmail.com
> <mailto:andrew.w.nosenko gmail.com>>
>>
>> * xmlIO.c [HAVE_STAT && HAVE__STAT]:
>> Fix the compilation breakage: macro that redefines
of the 'stat'
>> as '_stat' is removed (was introduced in the
r1.172).
>>
> Removing this macro results in occurrence of warnings
about
> types incompatibility in _wstat() call on Windows.
>
> Changes in this patch (for xmlIO.c rev. 1.172):
> 1. Replacement of 'stat' on '_stat' only on Windows
> 2. C style comments are used
>
> I hope, patch must solve compilation problem.
> I have no FreeBSD, but library was also compiled with
glibc 2.0, both
> HAVE_STAT and HAVE__STAT was defined.
>
>
>
>
------------------------------------------------------------
------------
>
> --- xmlIO.orig.c Fri Sep 1 12:27:58 2006
> +++ xmlIO.c Sat Sep 9 13:38:20 2006
>  -52,7 +52,9 
> # endif
> #else
> # ifdef HAVE__STAT
> +# if defined(_WIN32) || defined (__DJGPP__)
&& !defined (__CYGWIN__)
> # define stat _stat
> +# endif
> # endif
> #endif
I'm pretty sure DJGPP has stat under its normal name.
Also, the test
you write tests for "DJGPP unless it's cygwin",
but DJGPP is DOS-based
and has nothing to do with Cygwin, so that makes no sense.
So
#if defined(_WIN32) && !defined(__CYGWIN__)
# define stat _stat
#endif
makes more sense. In fact, if this is an issue only for
Visual C++, and
not for Borland or the other Windows C compilers it may make
even more
sense to test for that instead (MSC_VER is the preprocessor
macro I
think, or possibly _MSC_VER - something like that anyway).
In fact if stat is being remapped to _wstat, resulting in
compiler
warnings, wouldn't the code above result in "macro
redefined" warnings?
Maybe throw in an "#undef stat" too just in
case.
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| libxml2.xmlIO.awn.1.patch |

|
2006-09-13 10:07:08 |
On 9/9/06, Emelyanov Alexey <emal lim.ru> wrote:
> Changes in this patch (for xmlIO.c rev. 1.172):
> 1. Replacement of 'stat' on '_stat' only on Windows
> 2. C style comments are used
>
> I hope, patch must solve compilation problem.
> I have no FreeBSD, but library was also compiled with
glibc 2.0, both
> HAVE_STAT and HAVE__STAT was defined.
Works for me (FreeBSD-5.4).
Thanks.
--
Andrew W. Nosenko <andrew.w.nosenko gmail.com>
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| libxml2.xmlIO.awn.1.patch |

|
2006-10-10 09:05:21 |
On Sat, Sep 09, 2006 at 06:20:08PM +0400, Emelyanov Alexey
wrote:
> > 2006-09-06 Andrew W. Nosenko
<andrew.w.nosenko gmail.com
> <mailto:andrew.w.nosenko gmail.com>>
> >
> > * xmlIO.c [HAVE_STAT && HAVE__STAT]:
> > Fix the compilation breakage: macro that redefines
of the 'stat'
> > as '_stat' is removed (was introduced in the
r1.172).
> >
> Removing this macro results in occurrence of warnings
about
> types incompatibility in _wstat() call on Windows.
>
> Changes in this patch (for xmlIO.c rev. 1.172):
> 1. Replacement of 'stat' on '_stat' only on Windows
> 2. C style comments are used
>
> I hope, patch must solve compilation problem.
> I have no FreeBSD, but library was also compiled with
glibc 2.0, both
> HAVE_STAT and HAVE__STAT was defined.
Okay, I hadn't forgotten about the patch but was on the
road and busy, plus
I wanted to make sure no further input would be made to
this. So I applied
this xmlIO.c.patch to the current CVS head, restricting the
#define to _stat
to the strict environment where it is needed makes sense,
plus it removes
the C++ like comments which is also a good thing.
So applied and commited to CVS,
thanks a lot everybody for your input on this !
Daniel
--
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|