Re: [xml] Don't read XML from directories.

Date view Thread view Subject view Author view

From: Alejandro Forero Cuervo (bachue@bachue.com)
Date: Tue Jan 23 2001 - 10:18:58 EST


    
    I have no problem adding this check (patch welcome !), my only
    concern is about portability of the check (on Windows for
    example). Is S_ISDIR() part of the Posix definition (I think so)
    and does it work on Windows ?

Well, I noticed that the code in those sections always goes like:

#ifdef WIN3
  _open
#else
  open
#endif

I was initially considering adding the stat checks in the Unix portion
(I don't know anything about Windows).

However, I think the correct approach would be to have the configure
script look for stat and S_ISDIR and only use them if they are found.

    IMHO the IS_DIR macro is not posix, but the constant IF_DIR is.
    So, if undefined, S_IFDIR can be defined.

Well, according to the manuals distributed with Debian, S_ISDIR is a
POSIX macro.

The suggestion for S_IFDIR is good, though. I'll make the configure
script check for them and use whatever is available (or nothing) and
send two patches (one for libxml and another for libxml2) whenever I
get time (probably tomorrow).

By the way, the configure scripts gets to run on Windows systems,
right? Or what do you use there?

Thanks.

Alejo.
http://bachue.com/alejo

--
The mere formulation of a problem is far more essential than its solution.
      -- Albert Einstein.

$0='!/sfldbi!yjoV0msfQ!sfiupob!utvK'x44;print map{("\e[7m \e[0m",chr ord (chop$0)-1)[$_].("\n")[++$i%77]}split//,unpack'B*',pack'H*',($F='F'x19). "F0F3E0607879CC1E0F0F339F3FF399C666733333CCF87F99E6133999999E67CFFCCF3". "219CC1CCC033E7E660198CCE4E66798303873CCE60F3387$F"#Don't you love Perl? ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 10:44:07 EST