summaryrefslogtreecommitdiff
path: root/wince/errno.c
diff options
context:
space:
mode:
Diffstat (limited to 'wince/errno.c')
-rw-r--r--wince/errno.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/wince/errno.c b/wince/errno.c
new file mode 100644
index 00000000..28cd0899
--- /dev/null
+++ b/wince/errno.c
@@ -0,0 +1,20 @@
+//
+// "Extension" implementation of errno.h for Windows CE.
+//
+// I (Simon Howard) release this file to the public domain.
+//
+
+#include <windows.h>
+
+#include "errno.h"
+
+// This should really be a thread-local variable. Oh well.
+
+static int my_errno;
+
+int *_GetErrno()
+{
+ my_errno = GetLastError();
+ return &my_errno;
+}
+