diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2006-11-02 00:54:46 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2006-11-02 00:54:46 +0000 |
commit | a45b9181eaab44e22ad501bd733b05e98f040e35 (patch) | |
tree | 3cba319f1c1737e0a76add7b853bd48b3c5f0593 | |
parent | b904c35100d89d7cdac83257ca7a5ca3f708201f (diff) | |
download | cygnal-a45b9181eaab44e22ad501bd733b05e98f040e35.tar.gz cygnal-a45b9181eaab44e22ad501bd733b05e98f040e35.tar.bz2 cygnal-a45b9181eaab44e22ad501bd733b05e98f040e35.zip |
* include/winuser.h (LR_DEFAULTSIZE): Remove duplicate.
C99 'extern inline' patrol.
* include/winnt.h (GetCurrentFiber): Remove extern declaration. Make
inline static.
(GetFiberData): Likewise.
* lib/kernel32.c: Remove.
* lib/Makefile.in: Remove reference to kernel32.[co].
-rw-r--r-- | winsup/w32api/ChangeLog | 10 | ||||
-rw-r--r-- | winsup/w32api/include/winnt.h | 11 | ||||
-rw-r--r-- | winsup/w32api/include/winuser.h | 1 | ||||
-rw-r--r-- | winsup/w32api/lib/Makefile.in | 4 | ||||
-rw-r--r-- | winsup/w32api/lib/kernel32.c | 49 |
5 files changed, 16 insertions, 59 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index f17755ced..060a366f4 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,13 @@ +2006-11-02 Danny Smith <dannysmith@users.sourceforge.net> + + * include/winuser.h (LR_DEFAULTSIZE): Remove duplicate. + + * include/winnt.h (GetCurrentFiber): Remove extern declaration. Make + inline static. + (GetFiberData): Likewise. + * lib/kernel32.c: Remove. + * lib/Makefile.in: Remove reference to kernel32.[co]. + 2006-10-31 Corinna Vinschen <corinna@vinschen.de> * include/winnt.h (SE_RELABEL_NAME): Define. diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h index 502705b67..dcdb90b7a 100644 --- a/winsup/w32api/include/winnt.h +++ b/winsup/w32api/include/winnt.h @@ -3815,14 +3815,11 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE); (TypeBitMask), (ComparisonType))) #endif -PVOID GetCurrentFiber(void); -PVOID GetFiberData(void); - #ifdef _X86_ #if defined(__GNUC__) #if (__GNUC__ >= 3) /* Support -masm=intel. */ -extern __inline__ PVOID GetCurrentFiber(void) +static __inline__ PVOID GetCurrentFiber(void) { void* ret; __asm__ __volatile__ ( @@ -3832,7 +3829,7 @@ extern __inline__ PVOID GetCurrentFiber(void) return ret; } -extern __inline__ PVOID GetFiberData(void) +static __inline__ PVOID GetFiberData(void) { void* ret; __asm__ __volatile__ ( @@ -3857,7 +3854,7 @@ static __inline__ struct _TEB * NtCurrentTeb(void) } #else /* __GNUC__ >= 3 */ -extern __inline__ PVOID GetCurrentFiber(void) +static __inline__ PVOID GetCurrentFiber(void) { void* ret; __asm__ __volatile__ ( @@ -3867,7 +3864,7 @@ extern __inline__ PVOID GetCurrentFiber(void) return ret; } -extern __inline__ PVOID GetFiberData(void) +static __inline__ PVOID GetFiberData(void) { void* ret; __asm__ __volatile__ ( diff --git a/winsup/w32api/include/winuser.h b/winsup/w32api/include/winuser.h index 7d3dd7a30..69232407f 100644 --- a/winsup/w32api/include/winuser.h +++ b/winsup/w32api/include/winuser.h @@ -941,7 +941,6 @@ extern "C" { #define SM_CXMAXIMIZED 61 #define SM_CYMAXIMIZED 62 #define SM_NETWORK 63 -#define LR_DEFAULTSIZE 64 #define SM_CLEANBOOT 67 #define SM_CXDRAG 68 #define SM_CYDRAG 69 diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in index ec991b95c..c1c193cbe 100644 --- a/winsup/w32api/lib/Makefile.in +++ b/winsup/w32api/lib/Makefile.in @@ -128,7 +128,7 @@ UUID_OBJS = mshtml-uuid.o msxml-uuid.o unknwn-uuid.o \ olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \ hlguids-uuid.o extras-uuid.o devguid.o EXTRA_OBJS = shell32.o scrnsave.o scrnsavw.o largeint.o \ - $(UUID_OBJS) kernel32.o ws2_32.o + $(UUID_OBJS) ws2_32.o UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \ servprov-uuid.c oleidl-uuid.c oleacc-uuid.c ocidl-uuid.c \ objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \ @@ -136,7 +136,7 @@ UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \ olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \ hlguids-uuid.c extras-uuid.c devguid.c SOURCES = scrnsave.c shell32.c largeint.c $(UUID_SOURCES)\ -res.rc test.c kernel32.c ws2_32.c +res.rc test.c ws2_32.c DISTFILES = Makefile.in $(DEF_FILES) $(MRI_FILES) $(SOURCES) diff --git a/winsup/w32api/lib/kernel32.c b/winsup/w32api/lib/kernel32.c deleted file mode 100644 index 08ff86c25..000000000 --- a/winsup/w32api/lib/kernel32.c +++ /dev/null @@ -1,49 +0,0 @@ -/* extern (library) versions of inline functions defined in winnt.h */ - -#if defined(__GNUC__) - -void* GetCurrentFiber(void) -{ - void* ret; - __asm__ volatile ( - "movl %%fs:0x10,%0" - : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */ - ); - return ret; -} - -void* GetFiberData(void) -{ - void* ret; - __asm__ volatile ( - "movl %%fs:0x10,%0\n" - "movl (%0),%0" - : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */ - ); - return ret; -} - -#elif !defined (__WATCOMC__) - -void* GetCurrentFiber(void) -{ - void* res; - _asm { - mov eax, dword ptr fs:0x10 - mov res, eax - }; - return res; -} - -void* GetFiberData(void) -{ - void* res; - _asm { - mov eax, dword ptr fs:0x10 - mov eax, [eax] - mov res, eax - }; - return res; -} - -#endif /* __GNUC__ */ |