[BACK]Return to readfilemap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mit / expat / dist / xmlwf

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/external/mit/expat/dist/xmlwf/readfilemap.c between version 1.1.1.1.2.1.2.1 and 1.1.1.1.2.1.2.2

version 1.1.1.1.2.1.2.1, 2017/02/19 07:26:20 version 1.1.1.1.2.1.2.2, 2017/06/21 16:46:23
Line 9 
Line 9 
 #include <stdio.h>  #include <stdio.h>
   
 /* Functions close(2) and read(2) */  /* Functions close(2) and read(2) */
 #ifdef __WATCOMC__  #if !defined(_WIN32) && !defined(_WIN64)
 #ifndef __LINUX__  # include <unistd.h>
 #include <io.h>  
 #else  
 #include <unistd.h>  
 #endif  
 #else  
 # if !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64)  
 #  include <unistd.h>  
 # endif  
 #endif  #endif
   
 #ifndef S_ISREG  #ifndef S_ISREG
Line 67  filemap(const char *name,
Line 59  filemap(const char *name,
     close(fd);      close(fd);
     return 0;      return 0;
   }    }
     if (sb.st_size > XML_MAX_CHUNK_LEN) {
       close(fd);
       return 2;  /* Cannot be passed to XML_Parse in one go */
     }
   
   nbytes = sb.st_size;    nbytes = sb.st_size;
   /* malloc will return NULL with nbytes == 0, handle files with size 0 */    /* malloc will return NULL with nbytes == 0, handle files with size 0 */
   if (nbytes == 0) {    if (nbytes == 0) {

Legend:
Removed from v.1.1.1.1.2.1.2.1  
changed lines
  Added in v.1.1.1.1.2.1.2.2

CVSweb <webmaster@jp.NetBSD.org>