- Force using the import libraries built by ReactOS only, don't use the ones that come with the mingw compiler (doesn't work for CPP!)

- Import the mingw startup library and customized it a little. _tmain() is now supported, compiling an application as unicode is now just a matter of setting the module attribute unicode="true"
- Fixed .rbuild files to import all libraries neccessary
- Various GUID header changes and hacks to get everything to build/link properly
- Fixed the IShellView2 interface

svn path=/trunk/; revision=23933
This commit is contained in:
Thomas Bluemel 2006-09-06 20:00:41 +00:00
parent 292bb9268e
commit 02a7a31265
185 changed files with 9591 additions and 235 deletions

View file

@ -507,18 +507,8 @@ PrintSpecialAccess:
}
#ifdef _UNICODE
int __cdecl main(void)
#else
int __cdecl _main (int argc, char *argv[])
#endif
int __cdecl _tmain(int argc, const TCHAR *argv[])
{
#ifdef _UNICODE
PWCHAR *argv;
int argc = 0;
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
#endif
if (argc < 2)
{
PrintHelp();

View file

@ -1,14 +1,14 @@
<module name="cacls" type="win32cui" installbase="system32" installname="cacls.exe">
<module name="cacls" type="win32cui" installbase="system32" installname="cacls.exe" unicode="true">
<include base="cacls">.</include>
<define name="__USE_W32API" />
<define name="UNICODE" />
<define name="_UNICODE" />
<define name="_WIN32_IE">0x0500</define>
<define name="_WIN32_WINNT">0x0600</define>
<define name="WINVER">0x0600</define>
<library>kernel32</library>
<library>advapi32</library>
<library>ntdll</library>
<library>user32</library>
<library>shell32</library>
<file>cacls.c</file>
<file>lang/cacls.rc</file>
<pch>precomp.h</pch>

View file

@ -9,6 +9,7 @@
<library>kernel32</library>
<library>user32</library>
<library>comctl32</library>
<library>advapi32</library>
<file>devmgr.c</file>
<efile>devmgr.rc</efile>
</module>

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="sol" type="win32gui" installbase="system32" installname="solitaire.exe" allowwarnings="true">
<module name="sol" type="win32gui" installbase="system32" installname="solitaire.exe" allowwarnings="true" stdlib="host">
<include base="sol">.</include>
<include base="sol">cardlib</include>
<linkerflag>-lstdc++</linkerflag>

View file

@ -6,7 +6,9 @@
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<library>gdi32</library>
<library>gdi32</library>
<library>user32</library>
<library>advapi32</library>
<file>main.c</file>
<file>dialog.c</file>
<file>winemine.rc</file>

View file

@ -1,19 +1,21 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="getfirefox" type="win32gui" installbase="system32" installname="getfirefox.exe">
<include base="getfirefox">.</include>
<define name="UNICODE" />
<define name="_UNICODE" />
<define name="__USE_W32API" />
<define name="WINVER">0x0501</define>
<define name="_WIN32_IE>0x0600</define>
<library>comctl32</library>
<library>ntdll</library>
<library>shell32</library>
<library>shlwapi</library>
<library>urlmon</library>
<library>uuid</library>
<pch>precomp.h</pch>
<file>getfirefox.c</file>
<file>getfirefox.rc</file>
<include base="getfirefox">.</include>
<define name="UNICODE" />
<define name="_UNICODE" />
<define name="__USE_W32API" />
<define name="WINVER">0x0501</define>
<define name="_WIN32_IE>0x0600</define>
<library>comctl32</library>
<library>ntdll</library>
<library>shell32</library>
<library>shlwapi</library>
<library>urlmon</library>
<library>user32</library>
<library>kernel32</library>
<library>uuid</library>
<pch>precomp.h</pch>
<file>getfirefox.c</file>
<file>getfirefox.rc</file>
</module>

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
<module name="ibrowser" type="win32gui" installbase="system32" installname="ibrowser.exe" allowwarnings="true">
<module name="ibrowser" type="win32gui" installbase="system32" installname="ibrowser.exe" allowwarnings="true" stdlib="host">
<linkerflag>-fexceptions</linkerflag>
<include base="ibrowser">.</include>
<define name="__USE_W32API" />

View file

@ -35,9 +35,8 @@ IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp"
IDA_IBROWSER ACCELERATORS DISCARDABLE
BEGIN
"X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
"S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL,
NOINVERT
120, ID_FILE_EXIT, ASCII, ALT // "X"
115, ID_VIEW_FULLSCREEN, ASCII, SHIFT, CONTROL // "S"
END

View file

@ -33,17 +33,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/types.h>
#include <winsock2.h>
#include <winsock2.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "various.h"
int close(int);
void
netfinger(char *name)
{
@ -90,7 +87,7 @@ netfinger(char *name)
(void)printf("[%s]\n", hp->h_name);
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
fprintf(stderr, "finger: connect rc = %d", WSAGetLastError());
(void)close(s);
(void)closesocket(s);
return;
}

View file

@ -1,11 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="ftp" type="win32cui" installbase="system32" installname="ftp.exe" allowwarnings="true">
<module name="ftp" type="win32cui" installbase="system32" installname="ftp.exe" allowwarnings="true" oldcrt="true">
<include base="ftp">.</include>
<define name="__USE_W32API" />
<define name="lint" />
<library>kernel32</library>
<library>ws2_32</library>
<library>crtdll</library>
<library>iphlpapi</library>
<file>cmds.c</file>
<file>cmdtab.c</file>

View file

@ -542,7 +542,7 @@ VOID Release(LPTSTR Index)
/* Call IpReleaseAddress to release the IP address on the specified adapter. */
if (ret = IpReleaseAddress(&AdapterInfo) != NO_ERROR)
if ((ret = IpReleaseAddress(&AdapterInfo)) != NO_ERROR)
{
_tprintf(_T("\nAn error occured while releasing interface %S : \n"), AdapterInfo.Name);
DoFormatMessage(ret);

View file

@ -1,11 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="ipconfig" type="win32cui" installbase="system32" installname="ipconfig.exe" allowwarnings="true">
<include base="ipconfig">.</include>
<define name="__USE_W32API" />
<library>kernel32</library>
<library>user32</library>
<library>iphlpapi</library>
<file>ipconfig.c</file>
<file>ipconfig.rc</file>
<include base="ipconfig">.</include>
<define name="__USE_W32API" />
<library>kernel32</library>
<library>user32</library>
<library>iphlpapi</library>
<library>advapi32</library>
<file>ipconfig.c</file>
<file>ipconfig.rc</file>
</module>

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" allowwarnings ="true">
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" allowwarnings ="true" stdlib="host">
<include base="telnet">.</include>
<define name="__USE_W32API" />
<define name="__REACTOS__" />

View file

@ -16,6 +16,7 @@
<library>comctl32</library>
<library>comdlg32</library>
<library>shlwapi</library>
<library>uuid</library>
<file>about.c</file>
<file>childwnd.c</file>
<file>edit.c</file>

View file

@ -2,8 +2,7 @@
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="matrix" type="win32scr" installbase="system32" installname="matrix2.scr" allowwarnings="true">
<include base="matrix">.</include>
<linkerflag>-lstdc++</linkerflag>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>

View file

@ -1,8 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
<module name="shutdown" type="win32cui" installbase="system32" installname="shutdown.exe">
<include base="shutdown">.</include>
<define name="__USE_W32API" />
<define name="WINVER">0x0501</define>
<file>shutdown.c</file>
<include base="shutdown">.</include>
<define name="__USE_W32API" />
<define name="WINVER">0x0501</define>
<library>advapi32</library>
<library>user32</library>
<library>kernel32</library>
<file>shutdown.c</file>
</module>

View file

@ -6,6 +6,7 @@
<library>smdll</library>
<library>ntdll</library>
<library>kernel32</library>
<library>user32</library>
<file>sm.c</file>
<file>win32err.c</file>
<file>sm.rc</file>

View file

@ -9,6 +9,7 @@
<define name="WINVER">0x0600</define>
<library>ntdll</library>
<library>user32</library>
<library>advapi32</library>
<library>gdi32</library>
<library>kernel32</library>
<library>comctl32</library>

View file

@ -7,8 +7,10 @@
<define name="_UNICODE" />
<library>ntdll</library>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>gdi32</library>
<library>shell32</library>
<library>comctl32</library>
<pch>precomp.h</pch>
<compilationunit name="unit.c">

View file

@ -5,6 +5,7 @@
<define name="_WIN32_WINNT">0x0600</define>
<define name="WINVER">0x0600</define>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<file>movefile.cpp</file>
<file>movefile.rc</file>

View file

@ -6,6 +6,8 @@
<library>version</library>
<library>msimg32</library>
<library>gdi32</library>
<library>shell32</library>
<library>advapi32</library>
<library>user32</library>
<library>kernel32</library>
<library>ntdll</library>

View file

@ -11,6 +11,7 @@
<library>gdi32</library>
<library>user32</library>
<library>comctl32</library>
<library>advapi32</library>
<library>comdlg32</library>
<library>shell32</library>
<library>ole32</library>

View file

@ -6,5 +6,6 @@
<define name="_WIN32_IE">0x501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>shell32</library>
<library>kernel32</library>
<file>winver.c</file>
</module>

View file

@ -8,7 +8,8 @@
<library>kernel32</library>
<library>ws2_32</library>
<library>iphlpapi</library>
<pch>include/rosdhcp.h</pch>
<library>advapi32</library>
<pch>include/rosdhcp.h</pch>
<file>adapter.c</file>
<file>alloc.c</file>
<file>api.c</file>

View file

@ -7,6 +7,8 @@
<library>iphlpapi</library>
<library>ws2_32</library>
<library>shlwapi</library>
<library>advapi32</library>
<library>user32</library>
<file>tcpsvcs.c</file>
<file>skelserver.c</file>
<file>echo.c</file>

View file

@ -8,6 +8,7 @@
<library>advapi32</library>
<library>comctl32</library>
<library>comdlg32</library>
<library>user32</library>
<library>setupapi</library>
<library>shell32</library>
<file>vmwinst.c</file>

View file

@ -67,8 +67,10 @@
<define name="__USE_W32API" />
<define name="ANONYMOUSUNIONS" />
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<library>cmd_base</library>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<file>main.c</file>
<file>cmd.rc</file>
</module>

View file

@ -8,6 +8,9 @@
<library>rtshared</library>
<library>regtests</library>
<library>cmd_base</library>
<library>kernel32</library>
<library>advapi32</library>
<library>cmd_base</library>
<library>pseh</library>
<library>ntdll</library>
<file>setup.c</file>

View file

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
<module name="explorer" type="win32gui" installname="explorer.exe" allowwarnings="true">
<linkerflag>-luuid</linkerflag>
<linkerflag>-lstdc++</linkerflag>
<module name="explorer" type="win32gui" installname="explorer.exe" allowwarnings="true" stdlib="host">
<linkerflag>-fexceptions</linkerflag>
<include base="explorer">.</include>
<define name="__USE_W32API" />
@ -22,6 +20,7 @@
<library>ole32</library>
<library>oleaut32</library>
<library>shell32</library>
<library>uuid</library>
<library>notifyhook</library>
<pch>precomp.h</pch>
<directory name="desktop">

View file

@ -8,6 +8,7 @@
<define name="_WIN32_WINNT">0x0501</define>
<library>lz32</library>
<library>user32</library>
<file>expand.c</file>
<file>expand.rc</file>
<library>kernel32</library>
<file>expand.c</file>
<file>expand.rc</file>
</module>

View file

@ -5,6 +5,7 @@
<define name="__USE_W32API" />
<library>ntdll</library>
<library>kernel32</library>
<library>user32</library>
<library>fmifs</library>
<file>format.rc</file>
<file>format.c</file>

View file

@ -7,6 +7,7 @@
<define name="_UNICODE" />
<define name="__USE_W32API" />
<library>ntdll</library>
<library>kernel32</library>
<library>lsasrv</library>
<file>lsass.c</file>
<file>lsass.rc</file>

View file

@ -10,6 +10,7 @@
<library>user32</library>
<library>gdi32</library>
<library>advapi32</library>
<library>shell32</library>
<file>userinit.c</file>
<file>userinit.rc</file>
</module>

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -49,8 +49,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -40,8 +40,8 @@ END
IDC_FDEBUG ACCELERATORS MOVEABLE PURE
BEGIN
"?", IDM_ABOUT, ASCII, ALT
"/", IDM_ABOUT, ASCII, ALT
63, IDM_ABOUT, ASCII, ALT // "?"
47, IDM_ABOUT, ASCII, ALT // "/"
END

View file

@ -4,6 +4,8 @@
<linkerflag>-Wl,--enable-stdcall-fixup</linkerflag>
<library>ntdll</library>
<library>kernel32</library>
<library>msvcrt</library>
<library>user32</library>
<define name="__USE_W32API" />
<define name="USE_EXTERNAL_DXTN_LIB" />
<!-- The following is autogenrated by Makefile.ReactOS -->

View file

@ -8,6 +8,7 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<library>setupapi</library>
<library>kernel32</library>
<file>hdwwiz.c</file>
<file>hdwwiz.rc</file>
</module>

View file

@ -8,6 +8,7 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>comctl32</library>
<library>devmgr</library>

View file

@ -8,6 +8,7 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>comctl32</library>
<library>iphlpapi</library>

View file

@ -8,6 +8,7 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>comctl32</library>
<library>netapi32</library>

View file

@ -8,6 +8,7 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>gdi32</library>
<library>comctl32</library>

View file

@ -12,7 +12,8 @@
<library>d3d8thk</library>
<library>dxguid</library>
<library>ole32</library>
<library>user32</library>
<library>user32</library>
<library>advapi32</library>
<file>ddraw.rc</file>
<file>main.c</file>
@ -20,7 +21,7 @@
<file>startup.c</file>
<file>cleanup.c</file>
<file>clipper.c</file>
<file>clipper.c</file>
<file>color.c</file>
<file>gamma.c</file>
<file>palette.c</file>

View file

@ -14,12 +14,14 @@
<library>uuid</library>
<library>ntdll</library>
<library>kernel32</library>
<library>advapi32</library>
<library>ole32</library>
<library>oleaut32</library>
<library>winmm</library>
<library>dxguid</library>
<library>strmiids</library>
<file>devenum.rc</file>
<library>user32</library>
<file>devenum.rc</file>
<file>createdevenum.c</file>
<file>devenum_main.c</file>
<file>factory.c</file>

View file

@ -19,7 +19,7 @@
<library>ole32</library>
<library>winmm</library>
<library>dxguid</library>
<file>version.rc</file>
<file>version.rc</file>
<file>data_formats.c</file>
<file>device.c</file>
<file>dinput_main.c</file>

View file

@ -16,6 +16,7 @@
<library>ole32</library>
<library>oleaut32</library>
<library>uxtheme</library>
<library>advapi32</library>
<file>aclui.c</file>
<file>checklist.c</file>
<file>guid.c</file>

View file

@ -10,9 +10,9 @@
<library>scm_client</library>
<library>lsa_client</library>
<library>ntdll</library>
<library>kernel32</library>
<library>rpcrt4</library>
<library>wine</library>
<library>kernel32</library>
<pch>advapi32.h</pch>
<directory name="crypt">
<compilationunit name="crypt_unit.c">

View file

@ -5,6 +5,7 @@
<include base="ReactOS">include/reactos/wine</include>
<define name="__USE_W32API" />
<define name="_WIN32_WINNT">0x501</define>
<library>wine</library>
<library>uuid</library>
<library>ntdll</library>
<library>winmm</library>
@ -12,7 +13,8 @@
<library>msvfw32</library>
<library>msacm32</library>
<library>kernel32</library>
<library>wine</library>
<library>advapi32</library>
<library>user32</library>
<file>acmstream.c</file>
<file>api.c</file>
<file>avifile.c</file>

View file

@ -8,10 +8,10 @@
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<library>wine</library>
<library>pseh</library>
<library>ntdll</library>
<library>kernel32</library>
<library>psapi</library>
<library>pseh</library>
<file>coff.c</file>
<file>dbghelp.c</file>
<file>elf_module.c</file>

View file

@ -12,6 +12,7 @@
<library>kernel32</library>
<library>ntdll</library>
<library>setupapi</library>
<library>advapi32</library>
<library>user32</library>
<file>devmgr.rc</file>
<file>advprop.c</file>

View file

@ -1,4 +1,4 @@
<module name="glu32" type="win32dll" baseaddress="${BASEADDRESS_GLU32}" installbase="system32" installname="glu32.dll" allowwarnings="true">
<module name="glu32" type="win32dll" baseaddress="${BASEADDRESS_GLU32}" installbase="system32" installname="glu32.dll" allowwarnings="true" stdlib="host">
<importlibrary definition="glu32.def" />
<include base="glu32">include</include>
<include base="glu32">libnurbs/internals</include>
@ -10,12 +10,11 @@
<define name="RESOLVE_3D_TEXTURE_SUPPORT" />
<define name="BUILD_GL32" />
<define name="LIBRARYBUILD" />
<linkerflag>-lopengl32</linkerflag>
<library>ntdll</library>
<library>opengl32</library>
<library>kernel32</library>
<library>gdi32</library>
<library>msvcrt</library>
<library>opengl32</library>
<directory name="libnurbs">
<directory name="interface">
<file>bezierEval.cc</file>

View file

@ -382,8 +382,8 @@ GetDllDirectoryA@8
GetDllDirectoryW@8
GetDriveTypeA@4
GetDriveTypeW@4
GetEnvironmentStrings=GetEnvironmentStringsA@0
GetEnvironmentStringsA@0
GetEnvironmentStrings@0
GetEnvironmentStringsA=GetEnvironmentStrings@0
GetEnvironmentStringsW@0
GetEnvironmentVariableA@12
GetEnvironmentVariableW@12

View file

@ -6,6 +6,7 @@
<define name="_UNICODE" />
<library>ntdll</library>
<library>kernel32</library>
<library>user32</library>
<library>winmm</library>
<file>auxil.c</file>
<file>entry.c</file>

View file

@ -6,12 +6,14 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<library>wine</library>
<library>winmm</library>
<library>gdi32</library>
<library>comctl32</library>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>ntdll</library>
<library>wine</library>
<file>drawdib.c</file>
<file>mciwnd.c</file>
<file>msvfw32.rc</file>

View file

@ -5,4 +5,6 @@
<library>ntdll</library>
<library>rpcrt4</library>
<library>setupapi</library>
<library>kernel32</library>
<library>advapi32</library>
</module>

View file

@ -13,4 +13,8 @@
<library>comctl32</library>
<library>ntdll</library>
<library>setupapi</library>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<library>shell32</library>
</module>

View file

@ -1025,9 +1025,12 @@ AccFreeIndexArray(PINHERITED_FROMW pInheritArray,
USHORT AceCnt,
PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL)
{
PINHERITED_FROMW pLast;
UNREFERENCED_PARAMETER(pfnArray);
while (AceCnt != 0)
pLast = pInheritArray + AceCnt;
while (pInheritArray != pLast)
{
if (pInheritArray->AncestorName != NULL)
{
@ -1036,7 +1039,6 @@ AccFreeIndexArray(PINHERITED_FROMW pInheritArray,
}
pInheritArray++;
AceCnt--;
}
return ERROR_SUCCESS;

View file

@ -10,6 +10,7 @@
<library>ntdll</library>
<library>kernel32</library>
<library>advapi32</library>
<library>user32</library>
<file>ntmarta.c</file>
<file>ntmarta.rc</file>
<pch>ntmarta.h</pch>

View file

@ -7,6 +7,8 @@
<library>ntdll</library>
<library>kernel32</library>
<library>gdi32</library>
<library>user32</library>
<library>advapi32</library>
<file>gl.c</file>
<file>opengl32.c</file>
<file>wgl.c</file>

View file

@ -22,6 +22,7 @@
<library>user32</library>
<library>rpcrt4</library>
<library>version</library>
<library>shell32</library>
<file>cfgmgr.c</file>
<file>devclass.c</file>
<file>devinst.c</file>

View file

@ -1,7 +1,7 @@
#define INITGUID
#include <windows.h>
#include <commctrl.h>
#include <shlobj.h>
#include <shlguid.h>
#include <tchar.h>
#include <stdlib.h>
#include <stdio.h>

View file

@ -30,10 +30,6 @@
HINSTANCE hInstance = NULL;
static LONG dllrefs = 0;
/* FIXME - they should be exported somewhere instead of defined here... */
DEFINE_GUID(IID_IClassFactory, 0x00000001, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
static ifaceICompatibilityPageVbtl efvt =
{
/* IUnknown methods */

View file

@ -20,7 +20,7 @@ typedef struct _CITEM
ICompatibilityPage
******************************************************************************/
DEFINE_GUID(CLSID_ICompatibilityPage, 0x513D916F, 0x2A8E, 0x4F51, 0x00AE, 0xAB,0x0C,0xBC,0x76,0xFB,0x1A,0xF9); /* F8 on XP! */
static const GUID CLSID_ICompatibilityPage = {0x513D916F,0x2A8E,0x4F51,{0xAE,0xAB,0x0C,0xBC,0x76,0xFB,0x1A,0xF9}}; /* F8 on XP! */
typedef struct ICompatibilityPage *LPCOMPATIBILITYPAGE;

View file

@ -12,6 +12,7 @@
<library>advapi32</library>
<library>ole32</library>
<library>shell32</library>
<library>uuid</library>
<file>slayer.c</file>
<file>slayer.rc</file>
<pch>precomp.h</pch>

View file

@ -7,6 +7,7 @@
<define name="_WIN32_IE">0x0600</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="_SETUPAPI_VER">0x0501</define>
<library>pseh</library>
<library>uuid</library>
<library>ntdll</library>
<library>kernel32</library>
@ -20,7 +21,6 @@
<library>ole32</library>
<library>shell32</library>
<library>shlwapi</library>
<library>pseh</library>
<file>classinst.c</file>
<file>dllmain.c</file>
<file>install.c</file>

View file

@ -7,98 +7,128 @@
#ifdef __cplusplus
extern "C" {
#endif
#define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
#define SID_SShellBrowser IID_IShellBrowser
extern const GUID CLSID_MyComputer;
extern const GUID CLSID_MyDocuments;
extern const GUID CLSID_ShellDesktop;
extern const GUID CLSID_ShellLink;
extern const GUID CLSID_ControlPanel;
extern const GUID CLSID_Internet;
extern const GUID CLSID_NetworkPlaces;
extern const GUID CLSID_RecycleBin;
extern const GUID CLSID_ShellFSFolder;
extern const GUID CLSID_Printers;
extern const GUID CLSID_FolderShortcut;
extern const GUID FMTID_Intshcut;
extern const GUID FMTID_InternetSite;
extern const GUID CGID_Explorer;
extern const GUID CGID_ShellDocView;
extern const GUID CGID_ShellServiceObject;
extern const GUID IID_INewShortcutHookA;
extern const GUID IID_IShellBrowser;
extern const GUID IID_IShellView;
extern const GUID IID_IContextMenu;
extern const GUID IID_IColumnProvider;
extern const GUID IID_IQueryInfo;
extern const GUID IID_IShellIcon;
extern const GUID IID_IShellIconOverlayIdentifier;
extern const GUID IID_IShellFolder;
extern const GUID IID_IShellExtInit;
extern const GUID IID_IShellPropSheetExt;
extern const GUID IID_IPersistFolder;
extern const GUID IID_IExtractIconA;
extern const GUID IID_IShellLinkA;
extern const GUID IID_IShellLinkDataList;
extern const GUID IID_IShellCopyHookA;
extern const GUID IID_IFileViewerA;
extern const GUID IID_ICommDlgBrowser;
extern const GUID IID_IEnumIDList;
extern const GUID IID_IFileViewerSite;
extern const GUID IID_IContextMenu2;
extern const GUID IID_IShellExecuteHookA;
extern const GUID IID_IPropSheetPage;
extern const GUID IID_INewShortcutHookW;
extern const GUID IID_IFileViewerW;
extern const GUID IID_IShellLinkW;
extern const GUID IID_IExtractIconW;
extern const GUID IID_IShellExecuteHookW;
extern const GUID IID_IShellCopyHookW;
extern const GUID IID_IShellView2;
extern const GUID LIBID_SHDocVw;
extern const GUID IID_IShellExplorer;
extern const GUID DIID_DShellExplorerEvents;
extern const GUID CLSID_ShellExplorer;
extern const GUID IID_ISHItemOC;
extern const GUID DIID_DSHItemOCEvents;
extern const GUID CLSID_SHItemOC;
extern const GUID IID_DHyperLink;
extern const GUID IID_DIExplorer;
extern const GUID DIID_DExplorerEvents;
extern const GUID CLSID_InternetExplorer;
extern const GUID CLSID_StdHyperLink;
extern const GUID CLSID_FileTypes;
extern const GUID CLSID_InternetShortcut;
extern const GUID IID_IUniformResourceLocator;
extern const GUID CLSID_DragDropHelper;
extern const GUID IID_IDropTargetHelper;
extern const GUID IID_IDragSourceHelper;
#if (_WIN32_IE >= 0x400 || _WIN32_WINNT >= 0x500)
extern const GUID IID_IPersistFolder2;
extern const GUID CLSID_AutoComplete;
#endif
#if (_WIN32_WINNT >= 0x500)
extern const GUID IID_IPersistFolder3;
extern const GUID IID_IShellFolder2;
extern const GUID IID_IFileSystemBindData;
#endif
#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_OLEGUID(name,l,w1,w2)
DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
DEFINE_SHLGUID(CATID_BrowsableShellExt, 0x00021490L, 0, 0);
DEFINE_SHLGUID(CATID_BrowseInPlace, 0x00021491L, 0, 0);
DEFINE_SHLGUID(CATID_DeskBand, 0x00021492L, 0, 0);
DEFINE_SHLGUID(CATID_InfoBand, 0x00021493L, 0, 0);
DEFINE_SHLGUID(CATID_CommBand, 0x00021494L, 0, 0);
/* shell32 formatids */
DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
/* command group ids */
DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
DEFINE_SHLGUID(CGID_ShellServiceObject, 0x000214D2L, 0, 0);
DEFINE_SHLGUID(CGID_ExplorerBarDoc, 0x000214D3L, 0, 0);
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
DEFINE_SHLGUID(IID_IShellDetails, 0x000214ECL, 0, 0);
DEFINE_SHLGUID(IID_IDelayedRelease, 0x000214EDL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookA, 0x000214EFL, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerA, 0x000214F0L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
DEFINE_SHLGUID(IID_IRemoteComputer, 0x000214FEL, 0, 0);
DEFINE_SHLGUID(IID_IQueryInfo, 0x00021500L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconA, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
DEFINE_SHLGUID(IID_IPersistFolder, 0x000214EAL, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkA, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
DEFINE_GUID(CLSID_CUrlHistory, 0x3c374a40, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xaa, 0x00, 0x69, 0x46, 0xee);
#define SID_SUrlHistory CLSID_CUrlHistory
DEFINE_GUID(CLSID_CURLSearchHook, 0xcfbfae00, 0x17a6, 0x11d0, 0x99, 0xcb, 0x00, 0xc0, 0x4f, 0xd6, 0x44, 0x97);
DEFINE_GUID(SID_STopLevelBrowser, 0x4C96BE40L, 0x915C, 0x11CF, 0x99, 0xD3, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37);
#define SID_SShellBrowser IID_IShellBrowser
#ifdef UNICODE
#define IID_IFileViewer IID_IFileViewerW
#define IID_IShellLink IID_IShellLinkW
#define IID_IExtractIcon IID_IExtractIconW
#define IID_IShellCopyHook IID_IShellCopyHookW
#define IID_IShellExecuteHook IID_IShellExecuteHookW
#define IID_INewShortcutHook IID_INewShortcutHookW
#define IID_IFileViewer IID_IFileViewerW
#define IID_IShellLink IID_IShellLinkW
#define IID_IExtractIcon IID_IExtractIconW
#define IID_IShellCopyHook IID_IShellCopyHookW
#define IID_IShellExecuteHook IID_IShellExecuteHookW
#define IID_INewShortcutHook IID_INewShortcutHookW
#else
#define IID_IFileViewer IID_IFileViewerA
#define IID_IShellLink IID_IShellLinkA
#define IID_IExtractIcon IID_IExtractIconA
#define IID_IShellCopyHook IID_IShellCopyHookA
#define IID_IShellExecuteHook IID_IShellExecuteHookA
#define IID_INewShortcutHook IID_INewShortcutHookA
#define IID_IFileViewer IID_IFileViewerA
#define IID_IShellLink IID_IShellLinkA
#define IID_IExtractIcon IID_IExtractIconA
#define IID_IShellCopyHook IID_IShellCopyHookA
#define IID_IShellExecuteHook IID_IShellExecuteHookA
#define IID_INewShortcutHook IID_INewShortcutHookA
#endif
extern const GUID IID_IInputObject;
extern const GUID IID_IInputObjectSite;
DEFINE_GUID(IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID(IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID(IID_IInputObject, 0x068284FAA, 0x6A48, 0x11D0, 0x8C, 0x78, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xB4);
DEFINE_GUID(IID_IInputObjectSite, 0x0F1DB8392, 0x7331, 0x11D0, 0x8C, 0x99, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
/****************************************************************************
* the next IID's are the namespace elements of the pidls
*/
DEFINE_GUID(CLSID_NetworkPlaces, 0x208D2C60, 0x3AEA, 0x1069, 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_NetworkDomain, 0x46e06680, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
DEFINE_GUID(CLSID_NetworkServer, 0xc0542a90, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
DEFINE_GUID(CLSID_NetworkShare, 0x54a754c0, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
DEFINE_GUID(CLSID_MyComputer, 0x20D04FE0, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_Internet, 0x871C5380, 0x42A0, 0x1069, 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_ShellFSFolder, 0xF3364BA0, 0x65B9, 0x11CE, 0xA9, 0xBA, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37);
DEFINE_GUID(CLSID_RecycleBin, 0x645FF040, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E);
DEFINE_GUID(CLSID_ControlPanel, 0x21EC2020, 0x3AEA, 0x1069, 0xA2, 0xDD, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_Printers, 0x2227A280, 0x3AEA, 0x1069, 0xA2, 0xDE, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_MyDocuments, 0x450d8fba, 0xad25, 0x11d0, 0x98, 0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03);
DEFINE_GUID(CLSID_FolderShortcut, 0x0AFACED1, 0xE828, 0x11D1, 0x91, 0x87, 0xB5, 0x32, 0xF1, 0xE9, 0x57, 0x5D);
DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57);
DEFINE_GUID(CLSID_DragDropHelper, 0x4657278a, 0x411b, 0x11d2, 0x83, 0x9a, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
DEFINE_GUID(CLSID_AutoComplete, 0x00bb2763, 0x6a77, 0x11d0, 0xa5, 0x35, 0x00, 0xc0, 0x4f, 0xd7, 0xd0, 0x62);
#define PSGUID_SHELLDETAILS {0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0}
DEFINE_GUID(FMTID_ShellDetails, 0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
#define PID_FINDDATA 0
#define PID_NETRESOURCE 1
#define PID_DESCRIPTIONID 2
#define PID_WHICHFOLDER 3
#define PID_NETWORKLOCATION 4
#define PID_COMPUTERNAME 5
/* Note: PSGUID_STORAGE defined in ntquery.h */
DEFINE_GUID(FMTID_Storage, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac);
/* PID_* for FMTID_Storage defined in ntquery.h*/
#define PSGUID_DISPLACED {0x9b174b33, 0x40ff, 0x11d2, 0xa2, 0x7e, 0x0, 0xc0, 0x4f, 0xc3, 0x8, 0x71}
DEFINE_GUID(FMTID_Displaced, 0x9b174b33, 0x40ff, 0x11d2, 0xa2, 0x7e, 0x0, 0xc0, 0x4f, 0xc3, 0x8, 0x71);
#define PID_DISPLACED_FROM 2
#define PID_DISPLACED_DATE 3
#ifdef __cplusplus
}

View file

@ -349,6 +349,8 @@ extern "C" {
#define FCW_STATUS 1
#define FCW_TOOLBAR 2
#define FCW_TREE 3
#define FCW_INTERNETBAR 6
#define FCW_PROGRESS 8
#define FCT_MERGE 1
#define FCT_CONFIGABLE 2
#define FCT_ADDTOEND 4
@ -1549,8 +1551,36 @@ DECLARE_INTERFACE_(IShellView2,IShellView)
STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
STDMETHOD(GetView)(THIS_ SHELLVIEWID*,ULONG) PURE;
STDMETHOD(CreateViewWindow2)(THIS_ LPSV2CVW2_PARAMS) PURE;
STDMETHOD(HandleRename)(THIS_ PCUITEMID_CHILD) PURE;
STDMETHOD(SelectAndPositionItem)(THIS_ PCUITEMID_CHILD,UINT,POINT*) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IShellView2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
#define IShellView2_AddRef(T) (T)->lpVtbl->AddRef(T)
#define IShellView2_Release(T) (T)->lpVtbl->Release(T)
#define IShellView2_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
#define IShellView2_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
#define IShellView2_TranslateAccelerator(T,a) (T)->lpVtbl->TranslateAccelerator(T,a)
#ifdef _FIX_ENABLEMODELESS_CONFLICT
#define IShellView2_EnableModeless(T,a) (T)->lpVtbl->EnableModelessSV(T,a)
#else
#define IShellView2_EnableModeless(T,a) (T)->lpVtbl->EnableModeless(T,a)
#endif
#define IShellView2_UIActivate(T,a) (T)->lpVtbl->UIActivate(T,a)
#define IShellView2_Refresh(T) (T)->lpVtbl->Refresh(T)
#define IShellView2_CreateViewWindow(T,a,b,c,d,e) (T)->lpVtbl->CreateViewWindow(T,a,b,c,d,e)
#define IShellView2_DestroyViewWindow(T) (T)->lpVtbl->DestroyViewWindow(T)
#define IShellView2_GetCurrentInfo(T,a) (T)->lpVtbl->GetCurrentInfo(T,a)
#define IShellView2_AddPropertySheetPages(T,a,b,c) (T)->lpVtbl->AddPropertySheetPages(T,a,b,c)
#define IShellView2_SaveViewState(T) (T)->lpVtbl->SaveViewState(T)
#define IShellView2_SelectItem(T,a,b) (T)->lpVtbl->SelectItem(T,a,b)
#define IShellView2_GetItemObject(T,a,b,c) (T)->lpVtbl->GetItemObject(T,a,b,c)
#define IShellView2_GetView(T,a,b) (T)->lpVtbl->GetView(T,a,b)
#define IShellView2_CreateViewWindow2(T,a) (T)->lpVtbl->CreateViewWindow2(T,a)
#define IShellView2_HandleRename(T,a) (T)->lpVtbl->HandleRename(T,a)
#define IShellView2_SelectAndPositionItem(T,a,b,c) (T)->lpVtbl->SelectAndPositionItem(T,a,b,c)
#endif
#define INTERFACE IShellExecuteHookA
DECLARE_INTERFACE_(IShellExecuteHookA,IUnknown)
@ -1762,11 +1792,22 @@ typedef struct _CSFV
FOLDERVIEWMODE fvm;
} CSFV, *LPCSFV;
/* FIXME: Add the IShellFolderViewCB interface! */
#define IShellFolderViewCB void
typedef struct _SFV_CREATE
{
UINT cbSize;
IShellFolder *pshf;
IShellView *psvOuter;
IShellFolderViewCB *psfvcb;
} SFV_CREATE;
void WINAPI SHAddToRecentDocs(UINT,PCVOID);
LPITEMIDLIST WINAPI SHBrowseForFolderA(PBROWSEINFOA);
LPITEMIDLIST WINAPI SHBrowseForFolderW(PBROWSEINFOW);
DWORD WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*);
DWORD WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*);
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE*,IShellView**);
HRESULT WINAPI SHCreateShellFolderViewEx(LPCSFV pshfvi, IShellView **ppshv);
void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
@ -1825,6 +1866,9 @@ LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
UINT WINAPI ILGetSize(LPCITEMIDLIST);
void WINAPI ILFree(LPITEMIDLIST);
void WINAPI SHFree(LPVOID);
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND,DWORD,BOOL);
HRESULT WINAPI SHCoCreateInstance(LPCWSTR,REFCLSID,IUnknown*,REFIID,void**);
BOOL WINAPI SHObjectProperties(HWND,DWORD,LPCWSTR,LPCWSTR);
#endif

View file

@ -39,6 +39,8 @@ typedef enum tagSTRRET_TYPE {
STRRET_CSTR = 2
} STRRET_TYPE;
#define PCUITEMID_CHILD LPCITEMIDLIST
#pragma pack(pop)
#ifdef __cplusplus
}

View file

@ -16,8 +16,9 @@ extern "C"{
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free(void*);
EXTERN_C const IID IID_IUnknown;
EXTERN_C const IID IID_IClassFactory;
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
DEFINE_OLEGUID(IID_IClassFactory, 0x00000001, 0, 0);
#ifndef __IUnknown_INTERFACE_DEFINED__
#define __IUnknown_INTERFACE_DEFINED__
#define INTERFACE IUnknown

View file

@ -1443,7 +1443,6 @@ DWORD WINAPI GetDllDirectoryW(DWORD,LPWSTR);
UINT WINAPI GetDriveTypeA(LPCSTR);
UINT WINAPI GetDriveTypeW(LPCWSTR);
LPSTR WINAPI GetEnvironmentStrings(void);
LPSTR WINAPI GetEnvironmentStringsA(void);
LPWSTR WINAPI GetEnvironmentStringsW(void);
DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
@ -2360,6 +2359,7 @@ typedef ENUMRESTYPEPROCA ENUMRESTYPEPROC;
#define GetDllDirectory GetDllDirectoryA
#endif
#define GetDriveType GetDriveTypeA
#define GetEnvironmentStringsA GetEnvironmentStrings
#define GetEnvironmentVariable GetEnvironmentVariableA
#define GetFileAttributes GetFileAttributesA
#define GetFileAttributesEx GetFileAttributesExA

View file

@ -60,4 +60,6 @@ DEFINE_GUID(IID_IInputObjectSite, 0x0F1DB8392, 0x7331, 0x11D0, 0x8C, 0x99, 0x0
DEFINE_GUID(IID_IShellLinkDataList, 0x45e2b4ae, 0xb1c3, 0x11d0, 0xb9, 0x2f, 0x00, 0xa0, 0xc9, 0x03, 0x12, 0xe1);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
#endif /* __WINE_SHLGUID_H */

View file

@ -3,14 +3,14 @@
#ifndef __WINE_UNKNWN_H
#define __WINE_UNKNWN_H
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
/*DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);*/
/*** IUnknown methods ***/
#define IUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IUnknown_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IUnknown_Release(p) (p)->lpVtbl->Release(p)
DEFINE_GUID(IID_IClassFactory, 0x00000001, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
/*DEFINE_GUID(IID_IClassFactory, 0x00000001, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);*/
/*** IUnknown methods ***/
#define IClassFactory_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)

View file

@ -10,12 +10,9 @@
*/
#if defined(__LCC__) || defined(__GNUC__)
#define INITGUID 1
#include <windows.h>
#else
#define INITGUID
#include <basetyps.h>
#endif
#include <guiddef.h>
// wine own or ?
// but it keep dsound happy

View file

@ -34,6 +34,9 @@
<directory name="libwine">
<xi:include href="libwine/libwine.rbuild" />
</directory>
<directory name="mingw">
<xi:include href="mingw/mingw.rbuild" />
</directory>
<directory name="nt">
<xi:include href="nt/nt.rbuild" />
</directory>

View file

@ -0,0 +1,16 @@
/*
* CRTfmode.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Include this object to set _CRT_fmode to a state that will cause
* _mingw32_init_fmode to leave all file modes in their default state
* (basically text mode).
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRTfmode.o
*
*/
int _CRT_fmode = 0;

View file

@ -0,0 +1,16 @@
/*
* CRTglob.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Include this object file to set _CRT_glob to a state that will
* turn on command line globbing by default. NOTE: _CRT_glob has a default
* state of on. Specify CRT_noglob.o to turn off globbing by default.
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRTglob.o
*
*/
int _CRT_glob = -1;

View file

@ -0,0 +1,24 @@
/*
* CRTinit.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A dummy version of _CRT_INIT for MS compatibility. Programs, or more often
* dlls, which use the static version of the MSVC run time are supposed to
* call _CRT_INIT to initialize the run time library in DllMain. This does
* not appear to be necessary when using crtdll or the dll versions of the
* MSVC runtime, so the dummy call simply does nothing.
*
* This object file is included as a standard in the link process as provided
* by the appropriate GCC frontend.
*
* To use this object include the object file in your link command:
* gcc -o foo.exe foo.o CRTinit.o
*
*/
void
_CRT_INIT ()
{
}

View file

@ -0,0 +1,5 @@
#include <fcntl.h>
/* Set default file mode to binary */
int _fmode = _O_BINARY;

View file

@ -0,0 +1,105 @@
#include <stdbool.h>
#include "cpu_features.h"
/* level 1 edx bits */
#define EDX_CX8 (1 << 8) /* CMPXCHG8B */
#define EDX_CMOV (1 << 15)
#define EDX_MMX (1 << 23)
#define EDX_FXSR (1 << 24) /* FXSAVE and FXRSTOR */
#define EDX_SSE (1 << 25)
#define EDX_SSE2 (1 << 26)
/* level 1 ecx bits */
#define ECX_SSE3 (1 << 0)
#define ECX_CX16 (1 << 13) /* CMPXCHG16B */
/* extended level 0x80000001 edx bits */
#define EDX_3DNOW (1 << 31)
#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)
{
unsigned int eax, ebx, ecx, edx;
/* Try to change the value of CPUID bit (bit 21) in EFLAGS.
If the bit can be toggled, CPUID is supported. */
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;
__cpuid (0, eax, ebx, ecx, edx);
if (eax == 0)
return;
__cpuid (1, eax, ebx, ecx, edx);
if (edx & EDX_CX8)
__cpu_features |= _CRT_CMPXCHG8B;
if (edx & EDX_CMOV)
__cpu_features |= _CRT_CMOV;
if (edx & EDX_MMX)
__cpu_features |= _CRT_MMX;
if (edx & EDX_FXSR)
__cpu_features |= _CRT_FXSR;
if (edx & EDX_SSE)
__cpu_features |= _CRT_SSE;
if (edx & EDX_SSE2)
__cpu_features |= _CRT_SSE2;
if (ecx & ECX_SSE3)
__cpu_features |= _CRT_SSE3;
if (ecx & ECX_CX16)
__cpu_features |= _CRT_CMPXCHG16B;
__cpuid (0x80000000, eax, ebx, ecx, edx);
if (eax < 0x80000001)
return;
__cpuid (0x80000001, eax, ebx, ecx, edx);
if (edx & EDX_3DNOW);
__cpu_features |= _CRT_3DNOW;
if (edx & EDX_3DNOWP)
__cpu_features |= _CRT_3DNOWP;
return;
}
#ifdef TEST
#include <stdio.h>
#define report(feature) \
if ((feature) & __cpu_features) printf( #feature " found\n")
int main()
{
__cpu_features_init();
report(_CRT_CMPXCHG8B);
report(_CRT_CMOV);
report(_CRT_MMX);
report(_CRT_FXSR);
report(_CRT_SSE);
report(_CRT_SSE2);
report(_CRT_SSE3);
report(_CRT_CMPXCHG16B);
report(_CRT_3DNOW);
report(_CRT_3DNOWP);
return 0;
}
#endif

View file

@ -0,0 +1,25 @@
#ifndef _CPU_FEATURES_H
#define _CPU_FEATURES_H
#include <stdbool.h>
#define _CRT_CMPXCHG8B 0x0001
#define _CRT_CMOV 0x0002
#define _CRT_MMX 0x0004
#define _CRT_FXSR 0x0008
#define _CRT_SSE 0x0010
#define _CRT_SSE2 0x0020
#define _CRT_SSE3 0x0040
#define _CRT_CMPXCHG16B 0x0080
#define _CRT_3DNOW 0x0100
#define _CRT_3DNOWP 0x0200
extern unsigned int __cpu_features;
/* Currently we use this in fpenv functions */
#define __HAS_SSE __cpu_features & _CRT_SSE
void __cpu_features_init (void);
#endif

283
reactos/lib/mingw/crt1.c Normal file
View file

@ -0,0 +1,283 @@
/*
* crt1.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Source code for the startup proceedures used by all programs. This code
* is compiled to make crt1.o, which should be located in the library path.
*
*/
/* Hide the declaration of _fmode with dllimport attribute in stdlib.h to
avoid problems with older GCC. */
#define __IN_MINGW_RUNTIME
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <process.h>
#include <float.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <signal.h>
/* NOTE: The code for initializing the _argv, _argc, and environ variables
* has been moved to a separate .c file which is included in both
* crt1.c and dllcrt1.c. This means changes in the code don't have to
* be manually synchronized, but it does lead to this not-generally-
* a-good-idea use of include. */
#include "init.c"
#include "cpu_features.h"
extern void _pei386_runtime_relocator (void);
extern int main (int, char **, char **);
/*
* Must have the correct app type for MSVCRT.
*/
#ifdef __MSVCRT__
#define __UNKNOWN_APP 0
#define __CONSOLE_APP 1
#define __GUI_APP 2
__MINGW_IMPORT void __set_app_type(int);
#endif /* __MSVCRT__ */
/* Global _fmode for this .exe, not the one in msvcrt.dll,
The default is set in txtmode.o in libmingw32.a */
/* Override the dllimport'd declarations in stdlib.h */
#undef _fmode
extern int _fmode;
#ifdef __MSVCRT__
extern int* __p__fmode(void); /* To access the dll _fmode */
#endif
/*
* Setup the default file handles to have the _CRT_fmode mode, as well as
* any new files created by the user.
*/
extern int _CRT_fmode;
static void
_mingw32_init_fmode (void)
{
/* Don't set the std file mode if the user hasn't set any value for it. */
if (_CRT_fmode)
{
_fmode = _CRT_fmode;
/*
* This overrides the default file mode settings for stdin,
* stdout and stderr. At first I thought you would have to
* test with isatty, but it seems that the DOS console at
* least is smart enough to handle _O_BINARY stdout and
* still display correctly.
*/
if (stdin)
{
_setmode (_fileno (stdin), _CRT_fmode);
}
if (stdout)
{
_setmode (_fileno (stdout), _CRT_fmode);
}
if (stderr)
{
_setmode (_fileno (stderr), _CRT_fmode);
}
}
/* Now sync the dll _fmode to the one for this .exe. */
#ifdef __MSVCRT__
*__p__fmode() = _fmode;
#else
*_imp___fmode_dll = _fmode;
#endif
}
/* This function will be called when a trap occurs. Thanks to Jacob
Navia for his contribution. */
static CALLBACK long
_gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
{
void (*old_handler) (int);
long action = EXCEPTION_CONTINUE_SEARCH;
int reset_fpu = 0;
switch (exception_data->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
/* test if the user has set SIGSEGV */
old_handler = signal (SIGSEGV, SIG_DFL);
if (old_handler == SIG_IGN)
{
/* this is undefined if the signal was raised by anything other
than raise (). */
signal (SIGSEGV, SIG_IGN);
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGSEGV);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
case EXCEPTION_PRIV_INSTRUCTION:
/* test if the user has set SIGILL */
old_handler = signal (SIGILL, SIG_DFL);
if (old_handler == SIG_IGN)
{
/* this is undefined if the signal was raised by anything other
than raise (). */
signal (SIGILL, SIG_IGN);
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGILL);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
case EXCEPTION_FLT_INVALID_OPERATION:
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
case EXCEPTION_FLT_DENORMAL_OPERAND:
case EXCEPTION_FLT_OVERFLOW:
case EXCEPTION_FLT_UNDERFLOW:
case EXCEPTION_FLT_INEXACT_RESULT:
reset_fpu = 1;
/* fall through. */
case EXCEPTION_INT_DIVIDE_BY_ZERO:
/* test if the user has set SIGFPE */
old_handler = signal (SIGFPE, SIG_DFL);
if (old_handler == SIG_IGN)
{
signal (SIGFPE, SIG_IGN);
if (reset_fpu)
_fpreset ();
action = EXCEPTION_CONTINUE_EXECUTION;
}
else if (old_handler != SIG_DFL)
{
/* This means 'old' is a user defined function. Call it */
(*old_handler) (SIGFPE);
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
default:
break;
}
return action;
}
/*
* The function mainCRTStartup is the entry point for all console programs.
*/
static void __attribute__((noreturn))
__mingw_CRTStartup (void)
{
int nRet;
/*
* Set up the top-level exception handler so that signal handling
* works as expected. The mapping between ANSI/POSIX signals and
* Win32 SE is not 1-to-1, so caveat emptore.
*
*/
SetUnhandledExceptionFilter (_gnu_exception_handler);
/*
* Initialize floating point unit.
*/
__cpu_features_init (); /* Do we have SSE, etc.*/
_fpreset (); /* Supplied by the runtime library. */
/*
* Set up __argc, __argv and _environ.
*/
_mingw32_init_mainargs ();
/*
* Sets the default file mode.
* If _CRT_fmode is set, also set mode for stdin, stdout
* and stderr, as well
* NOTE: DLLs don't do this because that would be rude!
*/
_mingw32_init_fmode ();
/* Adust references to dllimported data that have non-zero offsets. */
_pei386_runtime_relocator ();
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
/*
* Call the main function. If the user does not supply one
* the one in the 'libmingw32.a' library will be linked in, and
* that one calls WinMain. See main.c in the 'lib' dir
* for more details.
*/
nRet = main (_argc, _argv, _environ);
/*
* Perform exit processing for the C library. This means
* flushing output and calling 'atexit' registered functions.
*/
_cexit ();
ExitProcess (nRet);
}
/*
* The function mainCRTStartup is the entry point for all console programs.
*/
void
mainCRTStartup (void)
{
#ifdef __MSVCRT__
__set_app_type (__CONSOLE_APP);
#endif
__mingw_CRTStartup ();
}
/*
* For now the GUI startup function is the same as the console one.
* This simply gets rid of the annoying warning about not being able
* to find WinMainCRTStartup when linking GUI applications.
*/
void
WinMainCRTStartup (void)
{
#ifdef __MSVCRT__
__set_app_type (__GUI_APP);
#endif
__mingw_CRTStartup ();
}
#if 0
/*
* We force use of library version of atexit, which is only
* visible in import lib as _imp__atexit
*/
extern int (*_imp__atexit)(void (*)(void));
int atexit (void (* pfn )(void) )
{
return ( (*_imp__atexit)(pfn));
}
/* Likewise for non-ANSI _onexit */
extern _onexit_t (*_imp___onexit)(_onexit_t);
_onexit_t
_onexit (_onexit_t pfn )
{
return (*_imp___onexit)(pfn);
}
#endif

185
reactos/lib/mingw/dllcrt1.c Normal file
View file

@ -0,0 +1,185 @@
/*
* dllcrt1.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Initialization code for DLLs.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <process.h>
#include <errno.h>
#include <windows.h>
/* Unlike normal crt1, I don't initialize the FPU, because the process
* should have done that already. I also don't set the file handle modes,
* because that would be rude. */
#ifdef __GNUC__
extern void __main ();
extern void __do_global_dtors ();
#endif
typedef void (* p_atexit_fn )(void);
static p_atexit_fn* first_atexit;
static p_atexit_fn* next_atexit;
static void
__dll_exit (void);
/* This is based on the function in the Wine project's exit.c */
p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**);
extern BOOL WINAPI DllMain (HANDLE, DWORD, LPVOID);
extern void _pei386_runtime_relocator (void);
BOOL WINAPI
DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
{
BOOL bRet;
if (dwReason == DLL_PROCESS_ATTACH)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_ATTACH (%d)\n", __FUNCTION__);
#endif
/* Initialize private atexit table for this dll.
32 is min size required by ANSI */
first_atexit = (p_atexit_fn*) malloc (32 * sizeof (p_atexit_fn));
if (first_atexit == NULL ) /* can't allocate memory */
{
errno=ENOMEM;
return FALSE;
}
*first_atexit = NULL;
next_atexit = first_atexit;
/* Adust references to dllimported data (from other DLL's)
that have non-zero offsets. */
_pei386_runtime_relocator ();
#ifdef __GNUC__
/* From libgcc.a, __main calls global class constructors,
__do_global_ctors, which registers __do_global_dtors
as the first entry of the private atexit table we
have just initialised */
__main ();
#endif
}
/*
* Call the user-supplied DllMain subroutine.
* This has to come after initialization of atexit table and
* registration of global constructors.
* NOTE: DllMain is optional, so libmingw32.a includes a stub
* which will be used if the user does not supply one.
*/
bRet = DllMain (hDll, dwReason, lpReserved);
/* Handle case where DllMain returns FALSE on attachment attempt. */
if ( (dwReason == DLL_PROCESS_ATTACH) && !bRet)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_ATTACH failed, cleaning up\n", __FUNCTION__);
#endif
__dll_exit (); /* Cleanup now. This will set first_atexit to NULL so we
know we've cleaned up */
}
if (dwReason == DLL_PROCESS_DETACH)
{
#ifdef DEBUG
printf ("%s: DLL_PROCESS_DETACH (%d)\n", __FUNCTION__);
#endif
/* If not attached, return FALSE. Cleanup already done above
if failed attachment attempt. */
if (! first_atexit )
bRet = FALSE;
else
/*
* We used to call __do_global_dtors () here. This is
* no longer necessary since __do_global_dtors is now
* registered at start (last out) of private atexit table.
*/
__dll_exit ();
}
return bRet;
}
static
void
__dll_exit(void)
/* Run LIFO terminators registered in private atexit table */
{
if ( first_atexit )
{
p_atexit_fn* __last = next_atexit - 1;
while ( __last >= first_atexit )
{
if ( *__last != NULL )
{
#ifdef DEBUG
printf ("%s: Calling exit function 0x%x from 0x%x\n",
__FUNCTION__, (unsigned)(*__last),(unsigned)__last);
#endif
(**__last) ();
}
__last--;
}
free ( first_atexit ) ;
first_atexit = NULL ;
}
/*
Make sure output buffers opened by DllMain or
atexit-registered functions are flushed before detaching,
otherwise we can have problems with redirected output.
*/
fflush (NULL);
}
/*
* The atexit exported from msvcrt.dll causes problems in DLLs.
* Here, we override the exported version of atexit with one that passes the
* private table initialised in DllMainCRTStartup to __dllonexit.
* That means we have to hide the mscvrt.dll atexit because the
* atexit defined here gets __dllonexit from the same lib.
*/
#if 0
int
atexit (p_atexit_fn pfn )
{
#ifdef DEBUG
printf ("%s: registering exit function 0x%x at 0x%x\n",
__FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
return (__dllonexit (pfn, &first_atexit, &next_atexit)
== NULL ? -1 : 0 );
}
/*
* Likewise for non-ANSI function _onexit that may be called by
* code in the dll.
*/
_onexit_t
_onexit (_onexit_t pfn )
{
#ifdef DEBUG
printf ("%s: registering exit function 0x%x at 0x%x\n",
__FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
#endif
return ((_onexit_t) __dllonexit ((p_atexit_fn)pfn, &first_atexit, &next_atexit));
}
#endif

View file

@ -0,0 +1,79 @@
/*
* gccmain.c
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* A separate version of __main, __do_global_ctors and __do_global_dtors for
* Mingw32 for use with Cygwin32 b19. Hopefully this object file will only
* be linked if the libgcc.a doesn't include __main, __do_global_dtors and
* __do_global_ctors.
*
*/
/* Needed for the atexit prototype. */
#include <stdlib.h>
typedef void (*func_ptr) (void);
extern func_ptr __CTOR_LIST__[];
extern func_ptr __DTOR_LIST__[];
void
__do_global_dtors (void)
{
static func_ptr *p = __DTOR_LIST__ + 1;
/*
* Call each destructor in the destructor list until a null pointer
* is encountered.
*/
while (*p)
{
(*(p)) ();
p++;
}
}
void
__do_global_ctors (void)
{
unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
unsigned i;
/*
* If the first entry in the constructor list is -1 then the list
* is terminated with a null entry. Otherwise the first entry was
* the number of pointers in the list.
*/
if (nptrs == -1)
{
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
;
}
/*
* Go through the list backwards calling constructors.
*/
for (i = nptrs; i >= 1; i--)
{
__CTOR_LIST__[i] ();
}
/*
* Register the destructors for processing on exit.
*/
atexit (__do_global_dtors);
}
static int initialized = 0;
void
__main (void)
{
if (!initialized)
{
initialized = 1;
__do_global_ctors ();
}
}

View file

@ -0,0 +1,165 @@
/*
* _mingw.h
*
* Mingw specific macros included by ALL include files.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef __MINGW_H
#define __MINGW_H
/* These are defined by the user (or the compiler)
to specify how identifiers are imported from a DLL.
__DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
__MINGW_IMPORT The attribute definition to specify imported
variables/functions.
_CRTIMP As above. For MS compatibility.
__MINGW32_VERSION Runtime version.
__MINGW32_MAJOR_VERSION Runtime major version.
__MINGW32_MINOR_VERSION Runtime minor version.
__MINGW32_BUILD_DATE Runtime build date.
Other macros:
__int64 define to be long long. Using a typedef doesn't
work for "unsigned __int64"
All headers should include this first, and then use __DECLSPEC_SUPPORTED
to choose between the old ``__imp__name'' style or __MINGW_IMPORT
style declarations. */
/* Try to avoid problems with outdated checks for GCC __attribute__ support. */
#undef __attribute__
#ifndef __GNUC__
# ifndef __MINGW_IMPORT
# define __MINGW_IMPORT __declspec(dllimport)
# endif
# ifndef _CRTIMP
# define _CRTIMP __declspec(dllimport)
# endif
# define __DECLSPEC_SUPPORTED
# define __attribute__(x) /* nothing */
#else /* __GNUC__ */
# ifdef __declspec
# ifndef __MINGW_IMPORT
/* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
# define __MINGW_IMPORT extern __attribute__ ((dllimport))
# endif
# ifndef _CRTIMP
# ifdef __USE_CRTIMP
# define _CRTIMP __attribute__ ((dllimport))
# else
# define _CRTIMP
# endif
# endif
# define __DECLSPEC_SUPPORTED
# else /* __declspec */
# undef __DECLSPEC_SUPPORTED
# undef __MINGW_IMPORT
# ifndef _CRTIMP
# define _CRTIMP
# endif
# endif /* __declspec */
# ifndef __cdecl
# define __cdecl __attribute__ ((__cdecl__))
# endif
# ifndef __stdcall
# define __stdcall __attribute__ ((__stdcall__))
# endif
# ifndef __int64
# define __int64 long long
# endif
# ifndef __int32
# define __int32 long
# endif
# ifndef __int16
# define __int16 short
# endif
# ifndef __int8
# define __int8 char
# endif
# ifndef __small
# define __small char
# endif
# ifndef __hyper
# define __hyper long long
# endif
#endif /* __GNUC__ */
#ifdef __cplusplus
#define __CRT_INLINE inline
#else
#define __CRT_INLINE extern __inline__
#endif
#if defined (__GNUC__) && defined (__GNUC_MINOR__)
#define __MINGW_GNUC_PREREQ(major, minor) \
(__GNUC__ > (major) \
|| (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
#else
#define __MINGW_GNUC_PREREQ(major, minor) 0
#endif
#ifdef __cplusplus
# define __UNUSED_PARAM(x)
#else
# ifdef __GNUC__
# define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
# else
# define __UNUSED_PARAM(x) x
# endif
#endif
#ifdef __GNUC__
#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
#else
#define __MINGW_ATTRIB_NORETURN
#define __MINGW_ATTRIB_CONST
#endif
#if __MINGW_GNUC_PREREQ (3, 0)
#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
#else
#define __MINGW_ATTRIB_MALLOC
#define __MINGW_ATTRIB_PURE
#endif
/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
variadiac macro facility, because variadic macros cause syntax
errors with --traditional-cpp. */
#if __MINGW_GNUC_PREREQ (3, 3)
#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
#else
#define __MINGW_ATTRIB_NONNULL(arg)
#endif /* GNUC >= 3.3 */
#ifndef __MSVCRT_VERSION__
/* High byte is the major version, low byte is the minor. */
# define __MSVCRT_VERSION__ 0x0600
#endif
#define __MINGW32_VERSION 3.10
#define __MINGW32_MAJOR_VERSION 3
#define __MINGW32_MINOR_VERSION 10
#endif /* __MINGW_H */

View file

@ -0,0 +1,51 @@
/*
* assert.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Define the assert macro for debug output.
*
*/
/* We should be able to include this file multiple times to allow the assert
macro to be enabled/disabled for different parts of code. So don't add a
header guard. */
#ifndef RC_INVOKED
/* All the headers include this file. */
#include <_mingw.h>
#undef assert
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NDEBUG
/*
* If not debugging, assert does nothing.
*/
#define assert(x) ((void)0)
#else /* debugging enabled */
/*
* CRTDLL nicely supplies a function which does the actual output and
* call to abort.
*/
_CRTIMP void __cdecl _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
/*
* Definition of the assert macro.
*/
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
#endif /* NDEBUG */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */

View file

@ -0,0 +1,205 @@
/*
* complex.h
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Danny Smith <dannysmith@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef _COMPLEX_H_
#define _COMPLEX_H_
/* All the headers include this file. */
#include <_mingw.h>
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__
/* These macros are specified by C99 standard */
#ifndef __cplusplus
#define complex _Complex
#endif
#define _Complex_I (0.0F + 1.0iF)
/* GCC doesn't support _Imaginary type yet, so we don't
define _Imaginary_I */
#define I _Complex_I
#ifdef __cplusplus
extern "C" {
#endif
#ifndef RC_INVOKED
double __MINGW_ATTRIB_CONST creal (double _Complex);
double __MINGW_ATTRIB_CONST cimag (double _Complex);
double __MINGW_ATTRIB_CONST carg (double _Complex);
double __MINGW_ATTRIB_CONST cabs (double _Complex);
double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
double _Complex cacos (double _Complex);
double _Complex casin (double _Complex);
double _Complex catan (double _Complex);
double _Complex ccos (double _Complex);
double _Complex csin (double _Complex);
double _Complex ctan (double _Complex);
double _Complex cacosh (double _Complex);
double _Complex casinh (double _Complex);
double _Complex catanh (double _Complex);
double _Complex ccosh (double _Complex);
double _Complex csinh (double _Complex);
double _Complex ctanh (double _Complex);
double _Complex cexp (double _Complex);
double _Complex clog (double _Complex);
double _Complex cpow (double _Complex, double _Complex);
double _Complex csqrt (double _Complex);
double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
float __MINGW_ATTRIB_CONST crealf (float _Complex);
float __MINGW_ATTRIB_CONST cimagf (float _Complex);
float __MINGW_ATTRIB_CONST cargf (float _Complex);
float __MINGW_ATTRIB_CONST cabsf (float _Complex);
float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
float _Complex cacosf (float _Complex);
float _Complex casinf (float _Complex);
float _Complex catanf (float _Complex);
float _Complex ccosf (float _Complex);
float _Complex csinf (float _Complex);
float _Complex ctanf (float _Complex);
float _Complex cacoshf (float _Complex);
float _Complex casinhf (float _Complex);
float _Complex catanhf (float _Complex);
float _Complex ccoshf (float _Complex);
float _Complex csinhf (float _Complex);
float _Complex ctanhf (float _Complex);
float _Complex cexpf (float _Complex);
float _Complex clogf (float _Complex);
float _Complex cpowf (float _Complex, float _Complex);
float _Complex csqrtf (float _Complex);
float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
long double __MINGW_ATTRIB_CONST creall (long double _Complex);
long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
long double _Complex cacosl (long double _Complex);
long double _Complex casinl (long double _Complex);
long double _Complex catanl (long double _Complex);
long double _Complex ccosl (long double _Complex);
long double _Complex csinl (long double _Complex);
long double _Complex ctanl (long double _Complex);
long double _Complex cacoshl (long double _Complex);
long double _Complex casinhl (long double _Complex);
long double _Complex catanhl (long double _Complex);
long double _Complex ccoshl (long double _Complex);
long double _Complex csinhl (long double _Complex);
long double _Complex ctanhl (long double _Complex);
long double _Complex cexpl (long double _Complex);
long double _Complex clogl (long double _Complex);
long double _Complex cpowl (long double _Complex, long double _Complex);
long double _Complex csqrtl (long double _Complex);
long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
#ifdef __GNUC__
/* double */
__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
{
double res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
/* float */
__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
{
float res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
/* long double */
__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
{
return __real__ _Z;
}
__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
{
return __imag__ _Z;
}
__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
{
return __extension__ ~_Z;
}
__CRT_INLINE long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
{
long double res;
__asm__ ("fpatan;"
: "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
return res;
}
#endif /* __GNUC__ */
#endif /* RC_INVOKED */
#ifdef __cplusplus
}
#endif
#endif /* __STDC_VERSION__ >= 199901L */
#endif /* _COMPLEX_H */

View file

@ -0,0 +1,53 @@
/*
* conio.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Low level console I/O functions. Pretty please try to use the ANSI
* standard ones if you are writing new code.
*
*/
#ifndef _CONIO_H_
#define _CONIO_H_
/* All the headers include this file. */
#include <_mingw.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char* __cdecl _cgets (char*);
_CRTIMP int __cdecl _cprintf (const char*, ...);
_CRTIMP int __cdecl _cputs (const char*);
_CRTIMP int __cdecl _cscanf (char*, ...);
_CRTIMP int __cdecl _getch (void);
_CRTIMP int __cdecl _getche (void);
_CRTIMP int __cdecl _kbhit (void);
_CRTIMP int __cdecl _putch (int);
_CRTIMP int __cdecl _ungetch (int);
#ifndef _NO_OLDNAMES
_CRTIMP int __cdecl getch (void);
_CRTIMP int __cdecl getche (void);
_CRTIMP int __cdecl kbhit (void);
_CRTIMP int __cdecl putch (int);
_CRTIMP int __cdecl ungetch (int);
#endif /* Not _NO_OLDNAMES */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _CONIO_H_ */

View file

@ -0,0 +1,247 @@
/*
* ctype.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for testing character types and converting characters.
*
*/
#ifndef _CTYPE_H_
#define _CTYPE_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#define __need_wint_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/*
* The following flags are used to tell iswctype and _isctype what character
* types you are looking for.
*/
#define _UPPER 0x0001
#define _LOWER 0x0002
#define _DIGIT 0x0004
#define _SPACE 0x0008 /* HT LF VT FF CR SP */
#define _PUNCT 0x0010
#define _CONTROL 0x0020
#define _BLANK 0x0040 /* this is SP only, not SP and HT as in C99 */
#define _HEX 0x0080
#define _LEADBYTE 0x8000
#define _ALPHA 0x0103
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP int __cdecl isalnum(int);
_CRTIMP int __cdecl isalpha(int);
_CRTIMP int __cdecl iscntrl(int);
_CRTIMP int __cdecl isdigit(int);
_CRTIMP int __cdecl isgraph(int);
_CRTIMP int __cdecl islower(int);
_CRTIMP int __cdecl isprint(int);
_CRTIMP int __cdecl ispunct(int);
_CRTIMP int __cdecl isspace(int);
_CRTIMP int __cdecl isupper(int);
_CRTIMP int __cdecl isxdigit(int);
#ifndef __STRICT_ANSI__
_CRTIMP int __cdecl _isctype (int, int);
#endif
/* These are the ANSI versions, with correct checking of argument */
_CRTIMP int __cdecl tolower(int);
_CRTIMP int __cdecl toupper(int);
/*
* NOTE: The above are not old name type wrappers, but functions exported
* explicitly by MSVCRT/CRTDLL. However, underscored versions are also
* exported.
*/
#ifndef __STRICT_ANSI__
/*
* These are the cheap non-std versions: The return values are undefined
* if the argument is not ASCII char or is not of appropriate case
*/
_CRTIMP int __cdecl _tolower(int);
_CRTIMP int __cdecl _toupper(int);
#endif
/* Also defined in stdlib.h */
#ifndef MB_CUR_MAX
#ifdef __DECLSPEC_SUPPORTED
# ifdef __MSVCRT__
# define MB_CUR_MAX __mb_cur_max
__MINGW_IMPORT int __mb_cur_max;
# else /* not __MSVCRT */
# define MB_CUR_MAX __mb_cur_max_dll
__MINGW_IMPORT int __mb_cur_max_dll;
# endif /* not __MSVCRT */
#else /* ! __DECLSPEC_SUPPORTED */
# ifdef __MSVCRT__
extern int* _imp____mbcur_max;
# define MB_CUR_MAX (*_imp____mb_cur_max)
# else /* not __MSVCRT */
extern int* _imp____mbcur_max_dll;
# define MB_CUR_MAX (*_imp____mb_cur_max_dll)
# endif /* not __MSVCRT */
#endif /* __DECLSPEC_SUPPORTED */
#endif /* MB_CUR_MAX */
#ifdef __DECLSPEC_SUPPORTED
__MINGW_IMPORT unsigned short _ctype[];
# ifdef __MSVCRT__
__MINGW_IMPORT unsigned short* _pctype;
# else /* CRTDLL */
__MINGW_IMPORT unsigned short* _pctype_dll;
# define _pctype _pctype_dll
# endif
#else /* __DECLSPEC_SUPPORTED */
extern unsigned short** _imp___ctype;
#define _ctype (*_imp___ctype)
# ifdef __MSVCRT__
extern unsigned short** _imp___pctype;
# define _pctype (*_imp___pctype)
# else /* CRTDLL */
extern unsigned short** _imp___pctype_dll;
# define _pctype (*_imp___pctype_dll)
# endif /* CRTDLL */
#endif /* __DECLSPEC_SUPPORTED */
/*
* Use inlines here rather than macros, because macros will upset
* C++ usage (eg, ::isalnum), and so usually get undefined
*
* According to standard for SB chars, these function are defined only
* for input values representable by unsigned char or EOF.
* Thus, there is no range test.
* This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
*
* If no MB char support is needed, these can be simplified even
* more by command line define -DMB_CUR_MAX=1. The compiler will then
* optimise away the constant condition.
*/
#if ! (defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES) \
|| defined (__STRICT_ANSI__ ))
/* use simple lookup if SB locale, else _isctype() */
#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
__CRT_INLINE int __cdecl isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
__CRT_INLINE int __cdecl iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
__CRT_INLINE int __cdecl isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
__CRT_INLINE int __cdecl isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl islower(int c) {return __ISCTYPE(c, _LOWER);}
__CRT_INLINE int __cdecl isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
__CRT_INLINE int __cdecl isspace(int c) {return __ISCTYPE(c, _SPACE);}
__CRT_INLINE int __cdecl isupper(int c) {return __ISCTYPE(c, _UPPER);}
__CRT_INLINE int __cdecl isxdigit(int c) {return __ISCTYPE(c, _HEX);}
/* these reproduce behaviour of lib underscored versions */
__CRT_INLINE int __cdecl _tolower(int c) {return ( c -'A'+'a');}
__CRT_INLINE int __cdecl _toupper(int c) {return ( c -'a'+'A');}
/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
if we only want C-locale. */
#endif /* _NO_CTYPE_INLINES */
/* Wide character equivalents */
#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif
#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif
_CRTIMP int __cdecl iswalnum(wint_t);
_CRTIMP int __cdecl iswalpha(wint_t);
_CRTIMP int __cdecl iswascii(wint_t);
_CRTIMP int __cdecl iswcntrl(wint_t);
_CRTIMP int __cdecl iswctype(wint_t, wctype_t);
_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); /* Obsolete! */
_CRTIMP int __cdecl iswdigit(wint_t);
_CRTIMP int __cdecl iswgraph(wint_t);
_CRTIMP int __cdecl iswlower(wint_t);
_CRTIMP int __cdecl iswprint(wint_t);
_CRTIMP int __cdecl iswpunct(wint_t);
_CRTIMP int __cdecl iswspace(wint_t);
_CRTIMP int __cdecl iswupper(wint_t);
_CRTIMP int __cdecl iswxdigit(wint_t);
/* Older MS docs uses wchar_t for arg and return type, while newer
online MS docs say arg is wint_t and return is int.
ISO C uses wint_t for both. */
_CRTIMP wint_t __cdecl towlower (wint_t);
_CRTIMP wint_t __cdecl towupper (wint_t);
_CRTIMP int __cdecl isleadbyte (int);
/* Also in wctype.h */
#if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
|| defined(__WCTYPE_INLINES_DEFINED))
#define __WCTYPE_INLINES_DEFINED
__CRT_INLINE int __cdecl iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
__CRT_INLINE int __cdecl iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
__CRT_INLINE int __cdecl iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
__CRT_INLINE int __cdecl iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
__CRT_INLINE int __cdecl iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
__CRT_INLINE int __cdecl iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
__CRT_INLINE int __cdecl iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
__CRT_INLINE int __cdecl iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
__CRT_INLINE int __cdecl iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
__CRT_INLINE int __cdecl isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
#ifndef __STRICT_ANSI__
int __cdecl __isascii (int);
int __cdecl __toascii (int);
int __cdecl __iscsymf (int); /* Valid first character in C symbol */
int __cdecl __iscsym (int); /* Valid character in C symbol (after first) */
#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES))
__CRT_INLINE int __cdecl __isascii(int c) {return ((c & ~0x7F) == 0);}
__CRT_INLINE int __cdecl __toascii(int c) {return (c & 0x7F);}
__CRT_INLINE int __cdecl __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
__CRT_INLINE int __cdecl __iscsym(int c) {return (isalnum(c) || (c == '_'));}
#endif /* __NO_CTYPE_INLINES */
#ifndef _NO_OLDNAMES
/* Not _CRTIMP */
int __cdecl isascii (int);
int __cdecl toascii (int);
int __cdecl iscsymf (int);
int __cdecl iscsym (int);
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _CTYPE_H_ */

View file

@ -0,0 +1,26 @@
/*
* dir.h
*
* This file OBSOLESCENT and only provided for backward compatibility.
* Please use io.h instead.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
* Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include <io.h>

View file

@ -0,0 +1,73 @@
/*
* direct.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Functions for manipulating paths and directories (included from io.h)
* plus functions for setting the current drive.
*
*/
#ifndef _DIRECT_H_
#define _DIRECT_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DISKFREE_T_DEFINED
/* needed by _getdiskfree (also in dos.h) */
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _DISKFREE_T_DEFINED
#endif
/*
* You really shouldn't be using these. Use the Win32 API functions instead.
* However, it does make it easier to port older code.
*/
_CRTIMP int __cdecl _getdrive (void);
_CRTIMP unsigned long __cdecl _getdrives(void);
_CRTIMP int __cdecl _chdrive (int);
_CRTIMP char* __cdecl _getdcwd (int, char*, int);
_CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *);
#ifndef _NO_OLDNAMES
# define diskfree_t _diskfree_t
#endif
#ifndef _WDIRECT_DEFINED
/* wide character versions. Also in wchar.h */
#ifdef __MSVCRT__
_CRTIMP int __cdecl _wchdir(const wchar_t*);
_CRTIMP wchar_t* __cdecl _wgetcwd(wchar_t*, int);
_CRTIMP wchar_t* __cdecl _wgetdcwd(int, wchar_t*, int);
_CRTIMP int __cdecl _wmkdir(const wchar_t*);
_CRTIMP int __cdecl _wrmdir(const wchar_t*);
#endif /* __MSVCRT__ */
#define _WDIRECT_DEFINED
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _DIRECT_H_ */

View file

@ -0,0 +1,123 @@
/*
* DIRENT.H (formerly DIRLIB.H)
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
*/
#ifndef _DIRENT_H_
#define _DIRENT_H_
/* All the headers include this file. */
#include <_mingw.h>
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
struct dirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
char d_name[FILENAME_MAX]; /* File name. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
* dd_stat field is now int (was short in older versions).
*/
typedef struct
{
/* disk transfer area for this dir */
struct _finddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct dirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
char dd_name[1];
} DIR;
DIR* __cdecl opendir (const char*);
struct dirent* __cdecl readdir (DIR*);
int __cdecl closedir (DIR*);
void __cdecl rewinddir (DIR*);
long __cdecl telldir (DIR*);
void __cdecl seekdir (DIR*, long);
/* wide char versions */
struct _wdirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
wchar_t d_name[FILENAME_MAX]; /* File name. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
*/
typedef struct
{
/* disk transfer area for this dir */
struct _wfinddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct _wdirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
wchar_t dd_name[1];
} _WDIR;
_WDIR* __cdecl _wopendir (const wchar_t*);
struct _wdirent* __cdecl _wreaddir (_WDIR*);
int __cdecl _wclosedir (_WDIR*);
void __cdecl _wrewinddir (_WDIR*);
long __cdecl _wtelldir (_WDIR*);
void __cdecl _wseekdir (_WDIR*, long);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _DIRENT_H_ */

View file

@ -0,0 +1,89 @@
/*
* dos.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* DOS-specific functions and structures.
*
*/
#ifndef _DOS_H_
#define _DOS_H_
/* All the headers include this file. */
#include <_mingw.h>
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
/* For DOS file attributes */
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
#ifndef __DECLSPEC_SUPPORTED
extern unsigned int *_imp___basemajor_dll;
extern unsigned int *_imp___baseminor_dll;
extern unsigned int *_imp___baseversion_dll;
extern unsigned int *_imp___osmajor_dll;
extern unsigned int *_imp___osminor_dll;
extern unsigned int *_imp___osmode_dll;
#define _basemajor (*_imp___basemajor_dll)
#define _baseminor (*_imp___baseminor_dll)
#define _baseversion (*_imp___baseversion_dll)
#define _osmajor (*_imp___osmajor_dll)
#define _osminor (*_imp___osminor_dll)
#define _osmode (*_imp___osmode_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT unsigned int _basemajor_dll;
__MINGW_IMPORT unsigned int _baseminor_dll;
__MINGW_IMPORT unsigned int _baseversion_dll;
__MINGW_IMPORT unsigned int _osmajor_dll;
__MINGW_IMPORT unsigned int _osminor_dll;
__MINGW_IMPORT unsigned int _osmode_dll;
#define _basemajor _basemajor_dll
#define _baseminor _baseminor_dll
#define _baseversion _baseversion_dll
#define _osmajor _osmajor_dll
#define _osminor _osminor_dll
#define _osmode _osmode_dll
#endif /* __DECLSPEC_SUPPORTED */
#endif /* ! __MSVCRT__ */
#ifndef _DISKFREE_T_DEFINED
/* needed by _getdiskfree (also in direct.h) */
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _DISKFREE_T_DEFINED
#endif
_CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *);
#ifndef _NO_OLDNAMES
# define diskfree_t _diskfree_t
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _DOS_H_ */

View file

@ -0,0 +1,101 @@
/*
* errno.h
* This file has no copyright assigned and is placed in the Public Domain.
* This file is a part of the mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within the package.
*
* Error numbers and access to error reporting.
*
*/
#ifndef _ERRNO_H_
#define _ERRNO_H_
/* All the headers include this file. */
#include <_mingw.h>
/*
* Error numbers.
* TODO: Can't be sure of some of these assignments, I guessed from the
* names given by strerror and the defines in the Cygnus errno.h. A lot
* of the names from the Cygnus errno.h are not represented, and a few
* of the descriptions returned by strerror do not obviously match
* their error naming.
*/
#define EPERM 1 /* Operation not permitted */
#define ENOFILE 2 /* No such file or directory */
#define ENOENT 2
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted function call */
#define EIO 5 /* Input/output error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Arg list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file descriptor */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Resource temporarily unavailable */
#define ENOMEM 12 /* Not enough space */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
/* 15 - Unknown Error */
#define EBUSY 16 /* strerror reports "Resource device" */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Improper link (cross-device link?) */
#define ENODEV 19 /* No such device */
#define ENOTDIR 20 /* Not a directory */
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate I/O control operation */
/* 26 - Unknown Error */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
#define EDOM 33 /* Domain error (math functions) */
#define ERANGE 34 /* Result too large (possibly too small) */
/* 35 - Unknown Error */
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
#define EDEADLK 36
/* 37 - Unknown Error */
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
#define EILSEQ 42 /* Illegal byte sequence */
/*
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
* sockets.h header provided with windows32api-0.1.2.
* You should go and put an #if 0 ... #endif around the whole block
* of errors (look at the comment above them).
*/
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
* stdlib.h.
*/
#ifdef _UWIN
#undef errno
extern int errno;
#else
_CRTIMP int* __cdecl _errno(void);
#define errno (*_errno())
#endif
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* Not _ERRNO_H_ */

Some files were not shown because too many files have changed in this diff Show more