]> pd.if.org Git - pdclib.old/commitdiff
Move existing errno handling to tss_errno, to allow the POSIX platform to just use...
authorOwen Shepherd <owen.shepherd@e43.eu>
Thu, 27 Dec 2012 00:27:28 +0000 (00:27 +0000)
committerOwen Shepherd <owen.shepherd@e43.eu>
Thu, 27 Dec 2012 00:27:28 +0000 (00:27 +0000)
opt/tss_errno/errno.c [moved from functions/_PDCLIB/errno.c with 84% similarity]
opt/tss_errno/errno.h [moved from includes/errno.h with 98% similarity]
platform/win32/Config.jam

similarity index 84%
rename from functions/_PDCLIB/errno.c
rename to opt/tss_errno/errno.c
index 4facee58ad5ef33f7452fcceeaef956253ace0e7..6a606fc1b40752afabc267ac3610e50a08730713 100644 (file)
@@ -7,11 +7,13 @@
 */
 
 #ifndef REGTEST
-#include <_PDCLIB_int.h>
+#include <threads.h>
 
-int _PDCLIB_errno = 0;
+/* Temporary */
 
-int * _PDCLIB_errno_func()
+static int _PDCLIB_errno = 0;
+
+int * _PDCLIB_errno()
 {
     return &_PDCLIB_errno;
 }
similarity index 98%
rename from includes/errno.h
rename to opt/tss_errno/errno.h
index 34cf843de8e54ee1947f0ec1a642a1db3d624b82..27eacb7048bdefc957fd3cd59d5537fe2c24eb13 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* 7.5 Errors <errno.h>
 
    This file is part of the Public Domain C Library (PDCLib).
@@ -11,7 +9,7 @@
 #include <_PDCLIB_int.h>
 _PDCLIB_BEGIN_EXTERN_C
 
-#define errno (*_PDCLIB_errno_func())
+#define errno (*_PDCLIB_errno())
 
 /* C99 */
 #define ERANGE _PDCLIB_ERANGE
index a078d6f072ffa7812b5b7fb2d526bb2180934eab..018ad6153bb6156c16406cb0bd44ed686e55ffa0 100644 (file)
@@ -23,6 +23,6 @@ if $(PDCLIB_TOOLCHAIN) = "gcc" {
     EXIT ;\r
 }\r
 \r
-PDCLIB_OPTIONS = notime dlmalloc mincoll ;\r
+PDCLIB_OPTIONS = notime dlmalloc mincoll tss_errno ;\r
 \r
 CRT0 = [ FDirName platform win32 crt0$(SUFOBJ) ] ;
\ No newline at end of file