#include_next "winbase.h" #ifdef EXPCGF #define DECLARE_TLS_STORAGE char **tls[4096] __attribute__ ((unused)) #else #define DECLARE_TLS_STORAGE do {} while (0) #define _WINBASE2_H #endif #if defined(__INSIDE_CYGWIN__) && !defined (__NO_INTERLOCKED__) #ifndef __INTERLOCKED_DEFINED__ #define __INTERLOCKED_DEFINED__ #ifdef __cplusplus extern "C" { #endif long ilockincr (long *m); long ilockdecr (long *m); long ilockexch (long *t, long v); long ilockcmpexch (long *t, long v, long c); #ifdef __cplusplus } #endif #undef InterlockedIncrement #define InterlockedIncrement ilockincr #undef InterlockedDecrement #define InterlockedDecrement ilockdecr #undef InterlockedExchange #define InterlockedExchange ilockexch #undef InterlockedCompareExchange #define InterlockedCompareExchange ilockcmpexch #endif /*__INTERLOCKED_DEFINED__*/ #endif /*defined(__INSIDE_CYGWIN__) && !defined (__NO_INTERLOCKED__)*/ #ifndef _WINBASE2_H #define _WINBASE2_H extern long tls_ix; extern char * volatile *__stackbase __asm__ ("%fs:4"); extern __inline__ DWORD my_tlsalloc () { DWORD n = ilockdecr (&tls_ix); __stackbase[tls_ix] = NULL; return n; } extern __inline__ BOOL my_tlssetvalue (DWORD ix, void *val) { __stackbase[ix] = (char *) val; return 1; } extern __inline__ void * my_tlsgetvalue (DWORD ix) { return __stackbase[ix]; } extern __inline__ BOOL my_tlsfree (DWORD ix) { /* nothing for now */ return 1; } #undef TlsAlloc #define TlsAlloc my_tlsalloc #undef TlsGetValue #define TlsGetValue my_tlsgetvalue #undef TlsSetValue #define TlsSetValue my_tlssetvalue #undef TlsFree #define TlsFree my_tlsfree #endif /*_WINBASE2_H*/