mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
modified base/applications/screensavers/3dtext/3dtext.rbuild
modified lib/sdk/crt/crt.rbuild Split chkstk away from crt Link 3dtext to chkstk for Visual C++ builds (a gcc-built 3dtext would simply crash, I guess?) modified dll/cpl/access/display.c modified dll/cpl/access/general.c modified dll/cpl/access/keyboard.c modified dll/cpl/access/mouse.c Fixed signedness violations (thank you cl -Wall -W4) modified dll/win32/acledit/acledit.rbuild modified dll/win32/aclui/aclui.rbuild Removed empty stubs (thank you cl -Wall -W4) modified dll/win32/aclui/checklist.c Fixed signedness violations wcsnicmp is not a standard C routine BOOL is not a boolean Thank you cl -Wall -W4 modified dll/win32/aclui/sidcache.c Marked possible overflow (thank you cl -Wall -W4) modified dll/win32/msvcrt/msvcrt.def __iob_func and __p_iob are the same thing Export non-conforming swprintf as _swprintf, too (will fix for real later) Thank you cl -Wall -W4 modified include/ddk/winddk.h Zero-length array field in struct _SCATTER_GATHER_LIST Forward-declare structures out of argument lists Thank you cl -Wall -W4 modified include/reactos/msvctarget.h No need to emulate Visual C++ flags when compiling with Visual C++ modified lib/3rdparty/mingw/cpu_features.c modified lib/3rdparty/mingw/cpu_features.h Useless dependency from stdbool.h removed Now compiles with Visual C++ too modified lib/3rdparty/mingw/getopt.c Silence harmless warning modified lib/3rdparty/mingw/isascii.c modified lib/3rdparty/mingw/iscsym.c modified lib/3rdparty/mingw/iscsymf.c modified lib/3rdparty/mingw/toascii.c Undefine conflicting macro names before declaring the functions modified Makefile Visual C++ support is coming, did you bring your coat? svn path=/trunk/; revision=36954
This commit is contained in:
parent
b8e2e47d4e
commit
168997c0d1
20 changed files with 127 additions and 37 deletions
|
@ -215,6 +215,7 @@ ifeq ($(HALFVERBOSEECHO),yes)
|
|||
ECHO_INVOKE =@echo $(QUOTE)[INVOKE] $<$(QUOTE)
|
||||
ECHO_PCH =@echo $(QUOTE)[PCH] $@$(QUOTE)
|
||||
ECHO_CC =@echo $(QUOTE)[CC] $<$(QUOTE)
|
||||
ECHO_CL =@echo $(QUOTE)[CL] $<$(QUOTE)
|
||||
ECHO_GAS =@echo $(QUOTE)[GAS] $<$(QUOTE)
|
||||
ECHO_NASM =@echo $(QUOTE)[NASM] $<$(QUOTE)
|
||||
ECHO_AR =@echo $(QUOTE)[AR] $@$(QUOTE)
|
||||
|
@ -224,6 +225,7 @@ ifeq ($(HALFVERBOSEECHO),yes)
|
|||
ECHO_BIN2RES =@echo $(QUOTE)[BIN2RES] $<$(QUOTE)
|
||||
ECHO_DLLTOOL =@echo $(QUOTE)[DLLTOOL] $@$(QUOTE)
|
||||
ECHO_LD =@echo $(QUOTE)[LD] $@$(QUOTE)
|
||||
ECHO_LINK =@echo $(QUOTE)[LINK] $@$(QUOTE)
|
||||
ECHO_NM =@echo $(QUOTE)[NM] $@$(QUOTE)
|
||||
ECHO_OBJDUMP =@echo $(QUOTE)[OBJDUMP] $@$(QUOTE)
|
||||
ECHO_RBUILD =@echo $(QUOTE)[RBUILD] $@$(QUOTE)
|
||||
|
@ -309,6 +311,8 @@ objcopy = $(Q)$(PREFIX_)objcopy
|
|||
dlltool = $(Q)$(PREFIX_)dlltool
|
||||
strip = $(Q)$(PREFIX_)strip
|
||||
windres = $(Q)$(PREFIX_)windres
|
||||
cl = $(Q)cl -nologo
|
||||
link = $(Q)link -nologo
|
||||
|
||||
# Set utilities
|
||||
ifeq ($(OSTYPE),msys)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<module name="3dtext" type="win32scr" installbase="system32" installname="3dtext.scr" unicode="yes">
|
||||
<library>scrnsave</library>
|
||||
<library>chkstk</library>
|
||||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
|
|
|
@ -87,7 +87,7 @@ HighContrastDlgProc(HWND hwndDlg,
|
|||
SendDlgItemMessage(hwndDlg,
|
||||
IDC_CONTRAST_COMBO,
|
||||
CB_SELECTSTRING,
|
||||
-1,
|
||||
(WPARAM)-1,
|
||||
(LPARAM)pGlobalData->highContrast.lpszDefaultScheme);
|
||||
break;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
#define BAUDTICKS 6
|
||||
static INT nBaudArray[BAUDTICKS] = {300, 1200, 2400, 4800, 9600, 19200};
|
||||
static UINT nBaudArray[BAUDTICKS] = {300, 1200, 2400, 4800, 9600, 19200};
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
|
|
|
@ -19,16 +19,16 @@
|
|||
|
||||
|
||||
#define BOUNCETICKS 5
|
||||
static INT nBounceArray[BOUNCETICKS] = {500, 700, 1000, 1500, 2000};
|
||||
static UINT nBounceArray[BOUNCETICKS] = {500, 700, 1000, 1500, 2000};
|
||||
|
||||
#define DELAYTICKS 5
|
||||
static INT nDelayArray[DELAYTICKS] = {300, 700, 1000, 1500, 2000};
|
||||
static UINT nDelayArray[DELAYTICKS] = {300, 700, 1000, 1500, 2000};
|
||||
|
||||
#define REPEATTICKS 6
|
||||
static INT nRepeatArray[REPEATTICKS] = {300, 500, 700, 1000, 1500, 2000};
|
||||
static UINT nRepeatArray[REPEATTICKS] = {300, 500, 700, 1000, 1500, 2000};
|
||||
|
||||
#define WAITTICKS 10
|
||||
static INT nWaitArray[WAITTICKS] = {0, 300, 500, 700, 1000, 1500, 2000, 5000, 10000, 20000};
|
||||
static UINT nWaitArray[WAITTICKS] = {0, 300, 500, 700, 1000, 1500, 2000, 5000, 10000, 20000};
|
||||
|
||||
|
||||
static VOID
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define SPEEDTICKS 9
|
||||
#define ACCELTICKS 9
|
||||
|
||||
static INT nSpeedArray[SPEEDTICKS] = {10, 20, 30, 40, 60, 80, 120, 180, 360};
|
||||
static UINT nSpeedArray[SPEEDTICKS] = {10, 20, 30, 40, 60, 80, 120, 180, 360};
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
|
|
|
@ -11,5 +11,4 @@
|
|||
<file>acledit.c</file>
|
||||
<file>stubs.c</file>
|
||||
<file>acledit.rc</file>
|
||||
<file>acledit.spec</file>
|
||||
</module>
|
||||
|
|
|
@ -17,6 +17,5 @@
|
|||
<file>misc.c</file>
|
||||
<file>sidcache.c</file>
|
||||
<file>aclui.rc</file>
|
||||
<file>aclui.spec</file>
|
||||
<pch>precomp.h</pch>
|
||||
</module>
|
||||
|
|
|
@ -153,12 +153,12 @@ FindCheckItemByIndex(IN PCHECKLISTWND infoPtr,
|
|||
return Found;
|
||||
}
|
||||
|
||||
static UINT
|
||||
static INT
|
||||
FindCheckItemIndexByAccessMask(IN PCHECKLISTWND infoPtr,
|
||||
IN ACCESS_MASK AccessMask)
|
||||
{
|
||||
PCHECKITEM Item;
|
||||
UINT Index = 0, Found = -1;
|
||||
INT Index = 0, Found = -1;
|
||||
|
||||
for (Item = infoPtr->CheckItemListHead;
|
||||
Item != NULL;
|
||||
|
@ -208,7 +208,7 @@ FindCheckItem(IN PCHECKLISTWND infoPtr,
|
|||
CurItem = CurItem->Next)
|
||||
{
|
||||
if ((CurItem->State & CIS_DISABLED) != CIS_DISABLED &&
|
||||
!wcsnicmp(CurItem->Name,
|
||||
!_wcsnicmp(CurItem->Name,
|
||||
SearchText, Count))
|
||||
{
|
||||
break;
|
||||
|
@ -1569,7 +1569,7 @@ CheckListWndProc(IN HWND hwnd,
|
|||
{
|
||||
PCHECKITEM PtItem;
|
||||
UINT PtItemBox;
|
||||
BOOL OldPushed;
|
||||
UINT OldPushed;
|
||||
|
||||
PtItem = PtToCheckItemBox(infoPtr,
|
||||
&pt,
|
||||
|
@ -2137,7 +2137,7 @@ CheckListWndProc(IN HWND hwnd,
|
|||
(infoPtr->QuickSearchHitItem == NULL ||
|
||||
infoPtr->QuickSearchHitItem == infoPtr->FocusedCheckItem))
|
||||
{
|
||||
BOOL OldPushed = infoPtr->FocusedPushed;
|
||||
UINT OldPushed = infoPtr->FocusedPushed;
|
||||
infoPtr->FocusedPushed = TRUE;
|
||||
|
||||
if (infoPtr->FocusedPushed != OldPushed)
|
||||
|
|
|
@ -120,7 +120,7 @@ EXPORTS
|
|||
__fpecode @115
|
||||
__getmainargs @116
|
||||
__initenv @117
|
||||
; __iob_func @118
|
||||
__iob_func=__p__iob @118
|
||||
__isascii @119
|
||||
__iscsym @120
|
||||
__iscsymf @121
|
||||
|
@ -846,3 +846,5 @@ EXPORTS
|
|||
wctomb @840
|
||||
wprintf @841
|
||||
wscanf @842
|
||||
|
||||
_swprintf=swprintf
|
||||
|
|
|
@ -749,11 +749,11 @@ typedef struct _KUSER_SHARED_DATA
|
|||
|
||||
typedef enum _IO_PAGING_PRIORITY
|
||||
{
|
||||
IoPagingPriorityInvalid,
|
||||
IoPagingPriorityNormal,
|
||||
IoPagingPriorityHigh,
|
||||
IoPagingPriorityReserved1,
|
||||
IoPagingPriorityReserved2
|
||||
IoPagingPriorityInvalid,
|
||||
IoPagingPriorityNormal,
|
||||
IoPagingPriorityHigh,
|
||||
IoPagingPriorityReserved1,
|
||||
IoPagingPriorityReserved2
|
||||
} IO_PAGING_PRIORITY;
|
||||
|
||||
typedef enum _IO_ALLOCATION_ACTION {
|
||||
|
@ -2362,7 +2362,7 @@ typedef struct _SCATTER_GATHER_ELEMENT {
|
|||
typedef struct _SCATTER_GATHER_LIST {
|
||||
ULONG NumberOfElements;
|
||||
ULONG_PTR Reserved;
|
||||
SCATTER_GATHER_ELEMENT Elements[0];
|
||||
SCATTER_GATHER_ELEMENT Elements[1];
|
||||
} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
|
||||
|
||||
typedef struct _MDL {
|
||||
|
@ -2763,6 +2763,7 @@ typedef enum _KD_OPTION {
|
|||
} KD_OPTION;
|
||||
|
||||
/* Function Type Defintions for Dispatch Functions */
|
||||
struct _DEVICE_CONTROL_CONTEXT;
|
||||
|
||||
typedef VOID
|
||||
(DDKAPI *PDEVICE_CONTROL_COMPLETION)(
|
||||
|
@ -4441,6 +4442,8 @@ typedef struct _RTL_BITMAP_RUN {
|
|||
ULONG NumberOfBits;
|
||||
} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
|
||||
|
||||
struct _RTL_RANGE;
|
||||
|
||||
typedef BOOLEAN
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
PVOID Context,
|
||||
|
@ -4806,6 +4809,8 @@ typedef enum _KBUGCHECK_CALLBACK_REASON {
|
|||
KbCallbackDumpIo,
|
||||
} KBUGCHECK_CALLBACK_REASON;
|
||||
|
||||
struct _KBUGCHECK_REASON_CALLBACK_RECORD;
|
||||
|
||||
typedef VOID
|
||||
(DDKAPI *PKBUGCHECK_REASON_CALLBACK_ROUTINE)(
|
||||
IN KBUGCHECK_CALLBACK_REASON Reason,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#ifndef _MSC_VER
|
||||
#ifndef __GNUC__
|
||||
#error Unsupported compiler
|
||||
#endif
|
||||
|
@ -15,3 +16,4 @@
|
|||
#elif defined(__i386__) && !defined(_M_IX86)
|
||||
#define _M_IX86 300
|
||||
#endif
|
||||
#endif
|
||||
|
|
73
reactos/lib/3rdparty/mingw/cpu_features.c
vendored
73
reactos/lib/3rdparty/mingw/cpu_features.c
vendored
|
@ -1,6 +1,9 @@
|
|||
#include <stdbool.h>
|
||||
#include "cpu_features.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
/* level 1 edx bits */
|
||||
#define EDX_CX8 (1 << 8) /* CMPXCHG8B */
|
||||
#define EDX_CMOV (1 << 15)
|
||||
|
@ -18,28 +21,76 @@
|
|||
#define EDX_3DNOWP (1 << 30)
|
||||
#define EDX_LM (1 << 29) /*LONG MODE */
|
||||
|
||||
#define __cpuid(level,a,b,c,d) \
|
||||
__asm__ __volatile__ ("cpuid;" \
|
||||
: "=a" (a), "=b" (b), "=c" (c), "=d" (d)\
|
||||
: "0" (level))
|
||||
|
||||
/* Combine the different cpuid flags into a single bitmap. */
|
||||
|
||||
unsigned int __cpu_features = 0;
|
||||
|
||||
void __cpu_features_init (void)
|
||||
{
|
||||
#ifdef __i386__
|
||||
unsigned int eax, ebx, ecx, edx;
|
||||
/* Try to change the value of CPUID bit (bit 21) in EFLAGS.
|
||||
#if defined(__GNUC__)
|
||||
#define __cpuid(level,a,b,c,d) \
|
||||
__asm__ __volatile__ ("cpuid;" \
|
||||
: "=a" (a), "=b" (b), "=c" (c), "=d" (d)\
|
||||
: "0" (level))
|
||||
#elif defined(_MSC_VER)
|
||||
void ___cpuid (int level, unsigned int * a, unsigned int * b, unsigned int * c, unsigned int * d)
|
||||
{
|
||||
int info[4];
|
||||
|
||||
__cpuid (info, level);
|
||||
|
||||
*a = info[0];
|
||||
*b = info[1];
|
||||
*c = info[2];
|
||||
*d = info[3];
|
||||
}
|
||||
#define __cpuid(level,a,b,c,d) \
|
||||
___cpuid(level, &(a), &(b), &(c), &(d))
|
||||
#endif
|
||||
|
||||
static
|
||||
unsigned int __detect_cpuid (void)
|
||||
{
|
||||
/* Try to change the value of CPUID bit (bit 21) in EFLAGS.
|
||||
If the bit can be toggled, CPUID is supported. */
|
||||
#if defined(__GNUC__)
|
||||
unsigned int eax, ebx;
|
||||
asm volatile ("pushfl; pushfl; popl %0;"
|
||||
"movl %0,%1; xorl %2,%0;"
|
||||
"pushl %0; popfl; pushfl; popl %0; popfl"
|
||||
: "=&r" (eax), "=&r" (ebx)
|
||||
: "i" (0x00200000));
|
||||
|
||||
if (((eax ^ ebx) & 0x00200000) == 0)
|
||||
return ((eax ^ ebx) & 0x00200000;
|
||||
#elif defined(_MSC_VER)
|
||||
unsigned int retval;
|
||||
|
||||
__asm
|
||||
{
|
||||
pushf
|
||||
pushf
|
||||
pop eax
|
||||
mov ebx, eax
|
||||
xor eax, 00200000h
|
||||
push eax
|
||||
popf
|
||||
pushf
|
||||
pop eax
|
||||
popf
|
||||
xor eax, ebx
|
||||
mov [retval], eax
|
||||
}
|
||||
|
||||
return retval & 0x00200000;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void __cpu_features_init (void)
|
||||
{
|
||||
#ifdef __i386__
|
||||
unsigned int eax, ebx, ecx, edx;
|
||||
|
||||
if (!__detect_cpuid ())
|
||||
return;
|
||||
|
||||
__cpuid (0, eax, ebx, ecx, edx);
|
||||
|
|
2
reactos/lib/3rdparty/mingw/cpu_features.h
vendored
2
reactos/lib/3rdparty/mingw/cpu_features.h
vendored
|
@ -1,8 +1,6 @@
|
|||
#ifndef _CPU_FEATURES_H
|
||||
#define _CPU_FEATURES_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define _CRT_CMPXCHG8B 0x0001
|
||||
#define _CRT_CMOV 0x0002
|
||||
#define _CRT_MMX 0x0004
|
||||
|
|
2
reactos/lib/3rdparty/mingw/getopt.c
vendored
2
reactos/lib/3rdparty/mingw/getopt.c
vendored
|
@ -82,7 +82,7 @@ int _tgetopt(int argc, _TCHAR * const argv[], const _TCHAR * optstring)
|
|||
++ s_nArgChar;
|
||||
|
||||
/* unrecognized option */
|
||||
if((_toptopt == _T(':')) || ((pcOptChar = _tcschr(optstring, _toptopt)) == NULL))
|
||||
if((_toptopt == _T(':')) || ((pcOptChar = _tcschr(optstring, (_TCHAR)_toptopt)) == NULL))
|
||||
{
|
||||
/* print an error message */
|
||||
if(_topterr && optstring[0] != _T(':'))
|
||||
|
|
4
reactos/lib/3rdparty/mingw/isascii.c
vendored
4
reactos/lib/3rdparty/mingw/isascii.c
vendored
|
@ -13,6 +13,10 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef isascii
|
||||
#undef isascii
|
||||
#endif
|
||||
|
||||
int
|
||||
isascii (int c)
|
||||
{
|
||||
|
|
4
reactos/lib/3rdparty/mingw/iscsym.c
vendored
4
reactos/lib/3rdparty/mingw/iscsym.c
vendored
|
@ -13,6 +13,10 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef iscsym
|
||||
#undef iscsym
|
||||
#endif
|
||||
|
||||
int
|
||||
iscsym (int c)
|
||||
{
|
||||
|
|
4
reactos/lib/3rdparty/mingw/iscsymf.c
vendored
4
reactos/lib/3rdparty/mingw/iscsymf.c
vendored
|
@ -13,6 +13,10 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef iscsymf
|
||||
#undef iscsymf
|
||||
#endif
|
||||
|
||||
int
|
||||
iscsymf (int c)
|
||||
{
|
||||
|
|
3
reactos/lib/3rdparty/mingw/toascii.c
vendored
3
reactos/lib/3rdparty/mingw/toascii.c
vendored
|
@ -13,6 +13,9 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef toascii
|
||||
#undef toascii
|
||||
#endif
|
||||
|
||||
int
|
||||
toascii (int c)
|
||||
|
|
|
@ -1,6 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="chkstk" type="staticlibrary">
|
||||
<directory name="except">
|
||||
<if property="ARCH" value="i386">
|
||||
<directory name="i386">
|
||||
<file>chkstk_asm.s</file>
|
||||
</directory>
|
||||
</if>
|
||||
<if property="ARCH" value="powerpc">
|
||||
<directory name="powerpc">
|
||||
<file>chkstk_asm.s</file>
|
||||
</directory>
|
||||
</if>
|
||||
</directory>
|
||||
</module>
|
||||
|
||||
<module name="crt" type="staticlibrary">
|
||||
<library>chkstk</library>
|
||||
<include base="crt">.</include>
|
||||
<include base="crt">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
|
@ -43,7 +59,6 @@
|
|||
<file>matherr.c</file>
|
||||
<if property="ARCH" value="i386">
|
||||
<directory name="i386">
|
||||
<file>chkstk_asm.s</file>
|
||||
<file>prolog.s</file>
|
||||
<file>seh.s</file>
|
||||
<file>unwind.c</file>
|
||||
|
@ -52,7 +67,6 @@
|
|||
<if property="ARCH" value="powerpc">
|
||||
<directory name="powerpc">
|
||||
<file>seh.s</file>
|
||||
<file>chkstk_asm.s</file>
|
||||
</directory>
|
||||
</if>
|
||||
<file>xcptfil.c</file>
|
||||
|
|
Loading…
Reference in a new issue