diff options
author | rpj <rpj> | 2007-01-07 00:10:01 +0000 |
---|---|---|
committer | rpj <rpj> | 2007-01-07 00:10:01 +0000 |
commit | 3d8616082933446b7cc3bb46c0a03157b3ca890a (patch) | |
tree | cc104423d98694f9fbb5cab048290e1f2cd8c60f | |
parent | 35dec51214f692110f441cd68a94cbd264574d18 (diff) |
''
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | need_errno.h | 15 |
2 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-01-07 Sinan Kaya <sinan.kaya at siemens dot com> + + * need_errno.h: Fix declaration of _errno - the local version of + _errno() is used, e.g. by WinCE. + 2007-01-06 Ross Johnson <ross.johnson at homemail dot com dot au> * ptw32_semwait.c: Add check for invalid sem_t after acquiring the diff --git a/need_errno.h b/need_errno.h index 2609f8d..f930d6e 100644 --- a/need_errno.h +++ b/need_errno.h @@ -59,11 +59,22 @@ extern "C" { #endif #endif +/* declare reference to errno */ +#ifndef PTW32_STATIC_LIB +# ifdef PTW32_BUILD +# define PTW32_DLLPORT __declspec (dllexport) +# else +# define PTW32_DLLPORT __declspec (dllimport) +# endif +#else +# define PTW32_DLLPORT +#endif /* declare reference to errno */ -#if (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC) -_CRTIMP extern int * __cdecl _errno(void); +#if (defined(_MT) || defined(_MD) || defined(_DLL)) && +!defined(_MAC) +PTW32_DLLPORT int * __cdecl _errno(void); #define errno (*_errno()) #else /* ndef _MT && ndef _MD && ndef _DLL */ _CRTIMP extern int errno; |