Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: third_party/libxml/src/win32/wince/wincecompat.c

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no iconv Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/src/win32/wince/wincecompat.h ('k') | third_party/libxml/src/xinclude.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/win32/wince/wincecompat.c
diff --git a/third_party/libxml/src/win32/wince/wincecompat.c b/third_party/libxml/src/win32/wince/wincecompat.c
new file mode 100644
index 0000000000000000000000000000000000000000..bd49c575408b88230692f1774e6447c05ac99881
--- /dev/null
+++ b/third_party/libxml/src/win32/wince/wincecompat.c
@@ -0,0 +1,68 @@
+/*
+ * wincecompat.c : wince compatiblity module
+ *
+ * See Copyright for the status of this software.
+ *
+ * javier@tiresiassoft.com
+ *
+ * 17 Sep 2002 created
+ */
+
+#include "wincecompat.h"
+
+char *strError[]= {"Error 0","","No such file or directory","","","","","Arg list too long",
+ "Exec format error","Bad file number","","","Not enough core","Permission denied","","",
+ "","File exists","Cross-device link","","","","Invalid argument","","Too many open files",
+ "","","","No space left on device","","","","","Math argument","Result too large","",
+ "Resource deadlock would occur", "Unknown error under wince"};
+
+
+int errno=0;
+
+int read(int handle, char *buffer, unsigned int len)
+{
+ return(fread(&buffer[0], len, 1, (FILE *) handle));
+}
+
+int write(int handle, const char *buffer, unsigned int len)
+{
+ return(fwrite(&buffer[0], len,1,(FILE *) handle));
+}
+
+int open(const char *filename,int oflag, ...)
+{
+ char mode[3]; /* mode[0] ="w/r/a" mode[1]="+" */
+ mode[2]=0;
+ if ( oflag==(O_WRONLY|O_CREAT) )
+ mode[0]='w';
+ else if (oflag==O_RDONLY)
+ mode[0]='r';
+ return (int) fopen(filename, mode);
+}
+
+int close(int handle)
+{
+ return ( fclose((FILE *) handle) );
+}
+
+
+char *getcwd( char *buffer, unsigned int size)
+{
+ /* Windows CE don't have the concept of a current directory
+ * so we just return NULL to indicate an error
+ */
+ return NULL;
+}
+
+char *getenv( const char *varname )
+{
+ return NULL;
+}
+
+char *strerror(int errnum)
+{
+ if (errnum>MAX_STRERROR)
+ return strError[MAX_STRERROR];
+ else
+ return strError[errnum];
+}
« no previous file with comments | « third_party/libxml/src/win32/wince/wincecompat.h ('k') | third_party/libxml/src/xinclude.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698