1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-24 22:30:21 +01:00

Update expat sources

This commit is contained in:
Paul Licameli
2017-06-27 05:34:22 -04:00
parent 138c188fb4
commit 941ad55140
43 changed files with 4134 additions and 882 deletions

View File

@@ -8,16 +8,9 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef __WATCOMC__
#ifndef __LINUX__
#include <io.h>
#else
#include <unistd.h>
#endif
#endif
#ifdef __BEOS__
#include <unistd.h>
/* Functions close(2) and read(2) */
#if !defined(_WIN32) && !defined(_WIN64)
# include <unistd.h>
#endif
#ifndef S_ISREG
@@ -66,6 +59,11 @@ filemap(const char *name,
close(fd);
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;
/* malloc will return NULL with nbytes == 0, handle files with size 0 */
if (nbytes == 0) {