This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
(69) |
3
|
4
|
5
|
6
|
7
|
8
|
|
9
|
10
|
11
|
12
|
13
(4) |
14
(12) |
15
(3) |
|
16
(2) |
17
|
18
|
19
(1) |
20
(3) |
21
|
22
|
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
|
30
|
|
|
|
|
|
|
Update of /cvsroot/mingw/w32api/include
In directory usw-pr-cvs1:/tmp/cvs-serv24585/include
Modified Files:
ddeml.h winbase.h wincon.h windef.h winerror.h wingdi.h
winreg.h winsvc.h winuser.h winver.h
Log Message:
Merge changes from Cygwin
Index: ddeml.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/ddeml.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ddeml.h 9 Apr 2002 21:17:17 -0000 1.2
--- ddeml.h 20 Jun 2002 16:18:03 -0000 1.3
***************
*** 191,196 ****
HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
! HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
! HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
BOOL WINAPI DdeDisconnect(HCONV);
BOOL WINAPI DdeDisconnectList(HCONVLIST);
--- 191,196 ----
HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
! HSZ WINAPI DdeCreateStringHandleA(DWORD,LPSTR,int);
! HSZ WINAPI DdeCreateStringHandleW(DWORD,LPWSTR,int);
BOOL WINAPI DdeDisconnect(HCONV);
BOOL WINAPI DdeDisconnectList(HCONVLIST);
Index: winbase.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winbase.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** winbase.h 9 Apr 2002 21:17:17 -0000 1.11
--- winbase.h 20 Jun 2002 16:18:03 -0000 1.12
***************
*** 956,962 ****
BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
! BOOL WINAPI BackupRead(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID);
! BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,PDWORD,PDWORD,PVOID);
! BOOL WINAPI BackupWrite(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID);
BOOL WINAPI Beep(DWORD,DWORD);
HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
--- 956,962 ----
BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
! BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
! BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
! BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
BOOL WINAPI Beep(DWORD,DWORD);
HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
***************
*** 1069,1073 ****
void WINAPI FatalExit(int);
BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,LPWORD,LPWORD);
! BOOL WINAPI FileTimeToLocalFileTime(FILETIME *,LPFILETIME);
BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME);
ATOM WINAPI FindAtomA(LPCSTR);
--- 1069,1073 ----
void WINAPI FatalExit(int);
BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,LPWORD,LPWORD);
! BOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *,LPFILETIME);
BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME);
ATOM WINAPI FindAtomA(LPCSTR);
***************
*** 1104,1108 ****
#endif /* ndef XFree86Server */
PVOID WINAPI FreeSid(PSID);
! BOOL WINAPI GetAce(PACL,DWORD,PVOID);
BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
UINT WINAPI GetAtomNameA(ATOM,LPSTR,int);
--- 1104,1108 ----
#endif /* ndef XFree86Server */
PVOID WINAPI FreeSid(PSID);
! BOOL WINAPI GetAce(PACL,DWORD,LPVOID*);
BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
UINT WINAPI GetAtomNameA(ATOM,LPSTR,int);
***************
*** 1189,1194 ****
DWORD WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPCSTR);
DWORD WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD,LPCWSTR);
! BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR);
! BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR);
FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
--- 1189,1194 ----
DWORD WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPCSTR);
DWORD WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD,LPCWSTR);
! BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
! BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
***************
*** 1242,1246 ****
BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
! DWORD WINAPI GetTickCount(void);
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD);
--- 1242,1246 ----
BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
! DWORD WINAPI GetTickCount(VOID);
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD);
***************
*** 1310,1314 ****
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
! LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
LONG WINAPI InterlockedIncrement(LPLONG);
BOOL WINAPI IsBadCodePtr(FARPROC);
--- 1310,1314 ----
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
! LONG WINAPI InterlockedExchangeAdd(LPLONG,LONG);
LONG WINAPI InterlockedIncrement(LPLONG);
BOOL WINAPI IsBadCodePtr(FARPROC);
***************
*** 1563,1568 ****
BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
! BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR);
! BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR);
BOOL WINAPI WriteProcessMemory(HANDLE,PVOID,PVOID,DWORD,PDWORD);
BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
--- 1563,1568 ----
BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
! BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
! BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
BOOL WINAPI WriteProcessMemory(HANDLE,PVOID,PVOID,DWORD,PDWORD);
BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
Index: wincon.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/wincon.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wincon.h 9 Apr 2002 21:17:17 -0000 1.2
--- wincon.h 20 Jun 2002 16:18:03 -0000 1.3
***************
*** 5,9 ****
#endif
-
#ifdef __cplusplus
extern "C" {
--- 5,8 ----
***************
*** 120,124 ****
BOOL WINAPI AllocConsole(void);
! HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID);
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
--- 119,123 ----
BOOL WINAPI AllocConsole(void);
! HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,CONST SECURITY_ATTRIBUTES*,DWORD,LPVOID);
BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
Index: windef.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/windef.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** windef.h 14 Jun 2002 11:44:47 -0000 1.6
--- windef.h 20 Jun 2002 16:18:03 -0000 1.7
***************
*** 52,55 ****
--- 52,61 ----
#ifdef __GNUC__
#define PACKED __attribute__((packed))
+ #ifndef _fastcall
+ #define _fastcall __attribute__((fastcall))
+ #endif
+ #ifndef __fastcall
+ #define __fastcall __attribute__((fastcall))
+ #endif
#ifndef _stdcall
#define _stdcall __attribute__((stdcall))
***************
*** 85,88 ****
--- 91,95 ----
#define CDECL _cdecl
#define STDCALL __stdcall
+ #define FASTCALL __fastcall
#define WINAPI __stdcall
#define WINAPIV __cdecl
Index: winerror.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winerror.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** winerror.h 9 Apr 2002 21:17:17 -0000 1.3
--- winerror.h 20 Jun 2002 16:18:03 -0000 1.4
***************
*** 632,635 ****
--- 632,638 ----
#define RPC_X_WRONG_ES_VERSION 1828L
#define RPC_X_WRONG_STUB_VERSION 1829L
+ #define RPC_X_INVALID_PIPE_OBJECT 1830L
+ #define RPC_X_WRONG_PIPE_ORDER 1831L
+ #define RPC_X_WRONG_PIPE_VERSION 1832L
#define RPC_S_GROUP_MEMBER_NOT_FOUND 1898L
#define EPT_S_CANT_CREATE 1899L
***************
*** 644,647 ****
--- 647,651 ----
#define ERROR_DOMAIN_CONTROLLER_NOT_FOUND 1908L
#define ERROR_ACCOUNT_LOCKED_OUT 1909L
+ #define RPC_S_SEND_INCOMPLETE 1913L
#define ERROR_NO_BROWSER_SERVERS_FOUND 6118L
#define ERROR_INVALID_PIXEL_FORMAT 2000L
Index: wingdi.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/wingdi.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** wingdi.h 14 Jun 2002 11:44:47 -0000 1.8
--- wingdi.h 20 Jun 2002 16:18:03 -0000 1.9
***************
*** 1402,1406 ****
FLOAT eDx;
FLOAT eDy;
! } XFORM,*LPXFORM;
typedef struct tagEMRBITBLT {
EMR emr;
--- 1402,1406 ----
FLOAT eDx;
FLOAT eDy;
! } XFORM,*PXFORM,*LPXFORM;
typedef struct tagEMRBITBLT {
EMR emr;
***************
*** 1424,1428 ****
COLORREF lbColor;
LONG lbHatch;
! } LOGBRUSH,*LPLOGBRUSH;
typedef LOGBRUSH PATTERN,*PPATTERN,*LPPATTERN;
typedef struct tagEMRCREATEBRUSHINDIRECT {
--- 1424,1428 ----
COLORREF lbColor;
LONG lbHatch;
! } LOGBRUSH,*PLOGBRUSH,*LPLOGBRUSH;
typedef LOGBRUSH PATTERN,*PPATTERN,*LPPATTERN;
typedef struct tagEMRCREATEBRUSHINDIRECT {
***************
*** 1500,1504 ****
POINT lopnWidth;
COLORREF lopnColor;
! } LOGPEN,*LPLOGPEN;
typedef struct tagEMRCREATEPEN {
EMR emr;
--- 1500,1504 ----
POINT lopnWidth;
COLORREF lopnColor;
! } LOGPEN,*PLOGPEN,*LPLOGPEN;
typedef struct tagEMRCREATEPEN {
EMR emr;
***************
*** 2021,2025 ****
RGNDATAHEADER rdh;
char Buffer[1];
! } RGNDATA,*LPRGNDATA;
/* for GetRandomRgn */
#define SYSRGN 4
--- 2021,2025 ----
RGNDATAHEADER rdh;
char Buffer[1];
! } RGNDATA,*PRGNDATA, *LPRGNDATA;
/* for GetRandomRgn */
#define SYSRGN 4
***************
*** 2149,2153 ****
RECT rcl;
int *pdx;
! } POLYTEXTA;
typedef struct _POLYTEXTW {
int x;
--- 2149,2153 ----
RECT rcl;
int *pdx;
! } POLYTEXTA, *PPOLYTEXTA;
typedef struct _POLYTEXTW {
int x;
***************
*** 2158,2162 ****
RECT rcl;
int *pdx;
! } POLYTEXTW;
typedef struct tagPIXELFORMATDESCRIPTOR {
WORD nSize;
--- 2158,2162 ----
RECT rcl;
int *pdx;
! } POLYTEXTW, *PPOLYTEXTW;
typedef struct tagPIXELFORMATDESCRIPTOR {
WORD nSize;
***************
*** 2347,2350 ****
--- 2347,2374 ----
BYTE AlphaFormat;
} BLENDFUNCTION,*PBLENDFUNCTION,*LPBLENDFUNCTION;
+ #define MM_MAX_NUMAXES 16
+ typedef struct _DESIGNVECTOR {
+ DWORD dvReserved;
+ DWORD dvNumAxes;
+ LONG dvValues[MM_MAX_NUMAXES];
+ } DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR;
+ typedef USHORT COLOR16;
+ typedef struct _TRIVERTEX {
+ LONG x;
+ LONG y;
+ COLOR16 Red;
+ COLOR16 Green;
+ COLOR16 Blue;
+ COLOR16 Alpha;
+ } TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;
+ typedef struct _DISPLAY_DEVICE {
+ DWORD cb;
+ WCHAR DeviceName[32];
+ WCHAR DeviceString[128];
+ DWORD StateFlags;
+ WCHAR DeviceID[128];
+ WCHAR DeviceKey[128];
+ } DISPLAY_DEVICE, *PDISPLAY_DEVICE;
+
typedef BOOL (CALLBACK *ABORTPROC)(HDC,int);
typedef int (CALLBACK *MFENUMPROC)(HDC,HANDLETABLE*,METARECORD*,int,LPARAM);
***************
*** 2451,2455 ****
int WINAPI EnumFontFamiliesExW(HDC,PLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
int WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
! int WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCA,LPARAM);
int WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
int WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
--- 2475,2479 ----
int WINAPI EnumFontFamiliesExW(HDC,PLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
int WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
! int WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
int WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
int WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
***************
*** 2524,2528 ****
UINT WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
UINT WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
! UINT WINAPI GetEnhMetaFilePixelFormat(HENHMETAFILE,DWORD,PIXELFORMATDESCRIPTOR*);
DWORD WINAPI GetFontData(HDC,DWORD,DWORD,PVOID,DWORD);
DWORD WINAPI GetFontLanguageInfo(HDC);
--- 2548,2552 ----
UINT WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
UINT WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
! UINT WINAPI GetEnhMetaFilePixelFormat(HENHMETAFILE,DWORD,CONST PIXELFORMATDESCRIPTOR*);
DWORD WINAPI GetFontData(HDC,DWORD,DWORD,PVOID,DWORD);
DWORD WINAPI GetFontLanguageInfo(HDC);
***************
*** 2701,2705 ****
HGLRC WINAPI wglGetCurrentContext(void);
HDC WINAPI wglGetCurrentDC(void);
! int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
PROC WINAPI wglGetProcAddress(LPCSTR);
BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
--- 2725,2729 ----
HGLRC WINAPI wglGetCurrentContext(void);
HDC WINAPI wglGetCurrentDC(void);
! int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,CONST COLORREF*);
PROC WINAPI wglGetProcAddress(LPCSTR);
BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
Index: winreg.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winreg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** winreg.h 28 May 2002 13:19:42 -0000 1.3
--- winreg.h 20 Jun 2002 16:18:03 -0000 1.4
***************
*** 84,92 ****
LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
! LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
! LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
! LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
! LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
--- 84,92 ----
LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
! LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
! LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
! LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
! LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
Index: winsvc.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winsvc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** winsvc.h 9 Apr 2002 21:17:17 -0000 1.3
--- winsvc.h 20 Jun 2002 16:18:03 -0000 1.4
***************
*** 236,240 ****
BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
! BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR);
BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
--- 236,240 ----
BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
! BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR*);
BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
Index: winuser.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winuser.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** winuser.h 14 Jun 2002 11:44:47 -0000 1.16
--- winuser.h 20 Jun 2002 16:18:03 -0000 1.17
***************
*** 1897,1900 ****
--- 1897,1911 ----
#define MOD_LEFT 32768
#define LLKHF_ALTDOWN 0x00000020
+ #if(WINVER >= 0x0500)
+ #define FLASHW_STOP 0
+ #define FLASHW_CAPTION 1
+ #define FLASHW_TRAY 2
+ #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
+ #define FLASHW_TIMER 4
+ #define FLASHW_TIMERNOFG 12
+ #endif /* (WINVER >= 0x0500) */
+ #define INPUT_MOUSE 0
+ #define INPUT_KEYBOARD 1
+ #define INPUT_HARDWARE 2
#ifndef RC_INVOKED
***************
*** 1923,1926 ****
--- 1934,1938 ----
DECLARE_HANDLE(HHOOK);
DECLARE_HANDLE(HDWP);
+ DECLARE_HANDLE(HDEVNOTIFY);
typedef struct tagACCEL {
BYTE fVirt;
***************
*** 2591,2595 ****
DWORD dwExtraInfo;
} KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
!
#define AnsiToOem CharToOemA
--- 2603,2660 ----
DWORD dwExtraInfo;
} KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
! #if(WINVER >= 0x0500)
! typedef struct {
! UINT cbSize;
! HWND hwnd;
! DWORD dwFlags;
! UINT uCount;
! DWORD dwTimeout;
! } FLASHWINFO, *PFLASHWINFO;
! #endif /* (WINVER >= 0x0500) */
! typedef struct tagMOUSEMOVEPOINT {
! int x;
! int y;
! DWORD time;
! ULONG_PTR dwExtraInfo;
! } MOUSEMOVEPOINT, *PMOUSEMOVEPOINT;
! typedef struct tagMOUSEINPUT {
! LONG dx;
! LONG dy;
! DWORD mouseData;
! DWORD dwFlags;
! DWORD time;
! ULONG_PTR dwExtraInfo;
! } MOUSEINPUT, *PMOUSEINPUT;
! typedef struct tagKEYBDINPUT {
! WORD wVk;
! WORD wScan;
! DWORD dwFlags;
! DWORD time;
! ULONG_PTR dwExtraInfo;
! } KEYBDINPUT, *PKEYBDINPUT;
! typedef struct tagHARDWAREINPUT {
! DWORD uMsg;
! WORD wParamL;
! WORD wParamH;
! } HARDWAREINPUT, *PHARDWAREINPUT;
! typedef struct tagINPUT {
! DWORD type;
! _ANONYMOUS_UNION union {
! MOUSEINPUT mi;
! KEYBDINPUT ki;
! HARDWAREINPUT hi;
! } DUMMYUNIONNAME;
! } INPUT, *PINPUT, FAR *LPINPUT;
! typedef struct tagGUITHREADINFO {
! DWORD cbSize;
! DWORD flags;
! HWND hwndActive;
! HWND hwndFocus;
! HWND hwndCapture;
! HWND hwndMenuOwner;
! HWND hwndMoveSize;
! HWND hwndCaret;
! RECT rcCaret;
! } GUITHREADINFO, *PGUITHREADINFO;
#define AnsiToOem CharToOemA
***************
*** 2677,2682 ****
BOOL WINAPI CreateCaret(HWND,HBITMAP,int,int);
HCURSOR WINAPI CreateCursor(HINSTANCE,int,int,int,int,PCVOID,PCVOID);
! HDESK WINAPI CreateDesktopA(LPSTR,LPSTR,LPDEVMODEA,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
! HDESK WINAPI CreateDesktopW(LPWSTR,LPWSTR,LPDEVMODEW,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
#define CreateDialogA(h,n,w,f) CreateDialogParamA(h,n,w,f,0)
#define CreateDialogW(h,n,w,f) CreateDialogParamW(h,n,w,f,0)
--- 2742,2747 ----
BOOL WINAPI CreateCaret(HWND,HBITMAP,int,int);
HCURSOR WINAPI CreateCursor(HINSTANCE,int,int,int,int,PCVOID,PCVOID);
! HDESK WINAPI CreateDesktopA(LPCSTR,LPCSTR,LPDEVMODEA,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
! HDESK WINAPI CreateDesktopW(LPCWSTR,LPCWSTR,LPDEVMODEW,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
#define CreateDialogA(h,n,w,f) CreateDialogParamA(h,n,w,f,0)
#define CreateDialogW(h,n,w,f) CreateDialogParamW(h,n,w,f,0)
***************
*** 2691,2696 ****
HICON WINAPI CreateIconFromResourceEx(PBYTE,DWORD,BOOL,DWORD,int,int,UINT);
HICON WINAPI CreateIconIndirect(PICONINFO);
! HWND WINAPI CreateMDIWindowA(LPSTR,LPSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
! HWND WINAPI CreateMDIWindowW(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
HMENU WINAPI CreateMenu(void);
HMENU WINAPI CreatePopupMenu(void);
--- 2756,2761 ----
HICON WINAPI CreateIconFromResourceEx(PBYTE,DWORD,BOOL,DWORD,int,int,UINT);
HICON WINAPI CreateIconIndirect(PICONINFO);
! HWND WINAPI CreateMDIWindowA(LPCSTR,LPCSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
! HWND WINAPI CreateMDIWindowW(LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
HMENU WINAPI CreateMenu(void);
HMENU WINAPI CreatePopupMenu(void);
***************
*** 2792,2799 ****
UINT WINAPI GetCaretBlinkTime(void);
BOOL WINAPI GetCaretPos(LPPOINT);
! BOOL WINAPI GetClassInfoA(HINSTANCE,LPCSTR,PWNDCLASSA);
! BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,PWNDCLASSEXA);
! BOOL WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,PWNDCLASSW);
! BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,PWNDCLASSEXW);
DWORD WINAPI GetClassLongA(HWND,int);
DWORD WINAPI GetClassLongW(HWND,int);
--- 2857,2864 ----
UINT WINAPI GetCaretBlinkTime(void);
BOOL WINAPI GetCaretPos(LPPOINT);
! BOOL WINAPI GetClassInfoA(HINSTANCE,LPCSTR,LPWNDCLASSA);
! BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,LPWNDCLASSEXA);
! BOOL WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,LPWNDCLASSW);
! BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,LPWNDCLASSEXW);
DWORD WINAPI GetClassLongA(HWND,int);
DWORD WINAPI GetClassLongW(HWND,int);
***************
*** 2825,2829 ****
UINT WINAPI GetKBCodePage(void);
HKL WINAPI GetKeyboardLayout(DWORD);
! int WINAPI GetKeyboardLayoutList(int,HKL*);
BOOL WINAPI GetKeyboardLayoutNameA(LPSTR);
BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR);
--- 2890,2894 ----
UINT WINAPI GetKBCodePage(void);
HKL WINAPI GetKeyboardLayout(DWORD);
! UINT WINAPI GetKeyboardLayoutList(int,HKL*);
BOOL WINAPI GetKeyboardLayoutNameA(LPSTR);
BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR);
***************
*** 2988,2999 ****
int WINAPI MessageBoxExA(HWND,LPCSTR,LPCSTR,UINT,WORD);
int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
! int WINAPI MessageBoxIndirectA(LPMSGBOXPARAMSA);
! int WINAPI MessageBoxIndirectW(LPMSGBOXPARAMSW);
BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,DWORD);
BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
! DWORD WINAPI MsgWaitForMultipleObjects(DWORD,LPHANDLE,BOOL,DWORD,DWORD);
! DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD,LPHANDLE,DWORD,DWORD,DWORD);
DWORD WINAPI OemKeyScan(WORD);
BOOL WINAPI OemToCharA(LPCSTR,LPSTR);
--- 3053,3064 ----
int WINAPI MessageBoxExA(HWND,LPCSTR,LPCSTR,UINT,WORD);
int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
! int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA*);
! int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*);
BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,DWORD);
BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
! DWORD WINAPI MsgWaitForMultipleObjects(DWORD,CONST HANDLE*,BOOL,DWORD,DWORD);
! DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD,CONST HANDLE*,DWORD,DWORD,DWORD);
DWORD WINAPI OemKeyScan(WORD);
BOOL WINAPI OemToCharA(LPCSTR,LPSTR);
***************
*** 3021,3028 ****
BOOL WINAPI PtInRect(LPCRECT,POINT);
BOOL WINAPI RedrawWindow(HWND,LPCRECT,HRGN,UINT);
! ATOM WINAPI RegisterClassA(const WNDCLASSA*);
! ATOM WINAPI RegisterClassW(const WNDCLASSW*);
! ATOM WINAPI RegisterClassExA(const WNDCLASSEXA*);
! ATOM WINAPI RegisterClassExW(const WNDCLASSEXW*);
UINT WINAPI RegisterClipboardFormatA(LPCSTR);
UINT WINAPI RegisterClipboardFormatW(LPCWSTR);
--- 3086,3093 ----
BOOL WINAPI PtInRect(LPCRECT,POINT);
BOOL WINAPI RedrawWindow(HWND,LPCRECT,HRGN,UINT);
! ATOM WINAPI RegisterClassA(CONST WNDCLASSA*);
! ATOM WINAPI RegisterClassW(CONST WNDCLASSW*);
! ATOM WINAPI RegisterClassExA(CONST WNDCLASSEXA*);
! ATOM WINAPI RegisterClassExW(CONST WNDCLASSEXW*);
UINT WINAPI RegisterClipboardFormatA(LPCSTR);
UINT WINAPI RegisterClipboardFormatW(LPCWSTR);
Index: winver.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winver.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** winver.h 9 Apr 2002 21:17:17 -0000 1.2
--- winver.h 20 Jun 2002 16:18:03 -0000 1.3
***************
*** 108,113 ****
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
! BOOL WINAPI VerQueryValueA(PCVOID,LPSTR,PVOID*,PUINT);
! BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,PUINT);
#ifdef UNICODE
#define VerFindFile VerFindFileW
--- 108,113 ----
DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
! BOOL WINAPI VerQueryValueA(const LPVOID,LPSTR,LPVOID*,PUINT);
! BOOL WINAPI VerQueryValueW(const LPVOID,LPWSTR,LPVOID*,PUINT);
#ifdef UNICODE
#define VerFindFile VerFindFileW
|
|
From: <ea...@us...> - 2002-06-20 16:18:06
|
Update of /cvsroot/mingw/w32api
In directory usw-pr-cvs1:/tmp/cvs-serv24585
Modified Files:
ChangeLog
Log Message:
Merge changes from Cygwin
Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/w32api/ChangeLog,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** ChangeLog 14 Jun 2002 13:52:13 -0000 1.96
--- ChangeLog 20 Jun 2002 16:18:02 -0000 1.97
***************
*** 1,2 ****
--- 1,59 ----
+ 2002-06-19 Casper S. Hornstrup <ch...@us...>
+
+ * include/winuser.h (FLASHW_*,INPUT_MOUSE,INPUT_KEYBOARD,
+ INPUT_HARDWARE): Add defines.
+ (HDEVNOTIFY): Add typedef.
+ (FLASHWINFO,tagMOUSEMOVEPOINT,tagMOUSEINPUT,tagKEYBDINPUT,
+ tagHARDWAREINPUT,tagINPUT,tagGUITHREADINFO): Define structs and
+ typedefs.
+ (CreateDesktop[AW],CreateMDIWindow[AW],GetClassInfo[AW],
+ GetClassInfoEx[AW],GetKeyboardLayoutList,
+ MessageBoxIndirect[AW],MsgWaitForMultipleObjects,
+ MsgWaitForMultipleObjectsEx, RegisterClass[AW],
+ RegisterClassEx[AW]): Correct prototypes.
+
+ 2002-06-19 Casper S. Hornstrup <ch...@us...>
+
+ * include/ddeml.h (DdeCreateStringHandle{AW]:Correct
+ prototypes.
+ * include/winsvc.h (StartServiceW): Correct prototype.
+ * include/winbase.h (BackupRead,BackupSeek,BackupWrite,
+ FileTimeToLocalFileTime, GetAce,GetPrivateProfileStruct[AW],
+ GetTickCount,InterlockedExchangeAdd,
+ WritePrivateProfileStruct[AW]: Correct prototypes.
+ (GetEnvironmentStrings): Correct mapping to
+ GetEnvironmentStringsA.
+ * include/winver.h (VerQueryValueA,VerQueryValueW):
+ Correct prototypes.
+ * include/wincon.h (CreateConsoleScreenBuffer): Correct
+ prototype.
+ * include/winreg.h (RegQueryMultipleValues[AW],
+ RegQueryValueEx[AW]):Correct prototypes.
+ * include/wingdi.h (PXFORM, PLOGBRUSH, PLOGPEN, PPOLYTEXTA,
+ PPOLYTEXTW): Add typedefs.
+ (_DESIGNVECTOR,COLOR16, _TRIVERTEX, _DISPLAY_DEVICE): Add
+ structures and typedefs.
+ (MM_MAX_NUMAXES): Add define.
+ (EnumFontsW,GetEnhMetaFilePixelFormat,
+ wglGetLayerPaletteEntries): Correct prototypes.
+ * include/winerror.h (RPC_X_INVALID_PIPE_OBJECT,
+ RPC_X_WRONG_PIPE_ORDER,RPC_X_WRONG_PIPE_VERSION,
+ RPC_S_SEND_INCOMPLETE): Add defines.
+
+ 2002-06-17 Casper S. Hornstrup <ch...@us...>
+
+ * include/windef.h (_fastcall, __fastcall, FASTCALL):
+ Add defines.
+
+ 2002-06-16 Egor Duda <de...@lo...>
+
+ * include/ntdll.h: New file.
+ * lib/ntdll.def: Add NtShutdownSystem.
+
+ 2002-06-16 Steven Edwards <Ste...@ya...>
+
+ * lib/dinput.def (DirectInputCreateEx): Add stub.
+ * lib/ntdll.def: New file.
+
2002-06-14 Earnie Boyd <ea...@us...>
***************
*** 665,676 ****
* Makefile.in: Increment VERSION.
* include/w32api.h: Ditto.
-
- 2001-12-07 Danny Smith <dan...@us...>
-
- * include/setupi.h (SetupDiCreateDeviceInterfaceRegKey[AW],
- SetupDiCreateDevRegKey[AW],SetupDiDeleteDeviceInterfaceRegKey,
- SetupDiDeleteDevRegKey,SetupDiOpenClassRegKey,
- SetupDiOpenClassRegKeyEx[AW],SetupDiOpenDeviceInterfaceRegKey,
- SetupDiOpenDevRegKey): Correct function names.
2001-12-07 Earnie Boyd <ea...@us...>
--- 722,725 ----
|
|
From: <ea...@us...> - 2002-06-20 16:18:06
|
Update of /cvsroot/mingw/w32api/lib In directory usw-pr-cvs1:/tmp/cvs-serv24585/lib Modified Files: dinput.def Log Message: Merge changes from Cygwin Index: dinput.def =================================================================== RCS file: /cvsroot/mingw/w32api/lib/dinput.def,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dinput.def 5 Jun 2001 01:36:46 -0000 1.1.1.1 --- dinput.def 20 Jun 2002 16:18:03 -0000 1.2 *************** *** 4,5 **** --- 4,6 ---- DirectInputCreateA@16 DirectInputCreateW@16 + DirectInputCreateEx@20 |
|
From: <ea...@us...> - 2002-06-19 12:23:03
|
Update of /cvsroot/mingw/msys/rt/src/winsup/cygwin
In directory usw-pr-cvs1:/tmp/cvs-serv16168
Modified Files:
ChangeLog.MSYS shared.cc msys.cc
Log Message:
* msys.cc: Add guards for pointers returned by strrchr throughout.
* shared.cc (shared_name): Add guard to check pointer of return from
strchr.
Thanks to Luke Dunstan for both of the above.
Index: ChangeLog.MSYS
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/ChangeLog.MSYS,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ChangeLog.MSYS 13 Jun 2002 21:54:21 -0000 1.17
--- ChangeLog.MSYS 19 Jun 2002 12:23:00 -0000 1.18
***************
*** 1,2 ****
--- 1,9 ----
+ 2002-06-19 Earnie Boyd <ea...@us...>
+
+ * msys.cc: Add guards for pointers returned by strrchr throughout.
+ * shared.cc (shared_name): Add guard to check pointer of return from
+ strchr.
+ Thanks to Luke Dunstan for both of the above.
+
2002-06-13 Earnie Boyd <ea...@us...>
Index: shared.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/shared.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** shared.cc 13 Jun 2002 21:54:21 -0000 1.3
--- shared.cc 19 Jun 2002 12:23:00 -0000 1.4
***************
*** 47,55 ****
static NO_COPY char buf2[MAX_PATH] = {0};
extern bool _cygwin_testing;
//FIXME: This should be based on where the DLL actually is located.
AbsDllPath("msys-1.0.dll", buf2, MAX_PATH);
strcpy(buf2, &buf2[3]);
! *(strchr(buf2, '\\')) = '\0';
debug_printf("buf2 = %s", buf2);
__small_sprintf (buf, "%s.%s.%s.%d", buf2, cygwin_version.shared_id, str, num);
--- 47,58 ----
static NO_COPY char buf2[MAX_PATH] = {0};
extern bool _cygwin_testing;
+ char *tptr;
//FIXME: This should be based on where the DLL actually is located.
AbsDllPath("msys-1.0.dll", buf2, MAX_PATH);
strcpy(buf2, &buf2[3]);
! tptr = strchr(buf2, '\\');
! if (tptr)
! *tptr = '\0';
debug_printf("buf2 = %s", buf2);
__small_sprintf (buf, "%s.%s.%s.%d", buf2, cygwin_version.shared_id, str, num);
Index: msys.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/msys.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** msys.cc 24 Apr 2002 12:47:53 -0000 1.2
--- msys.cc 19 Jun 2002 12:23:00 -0000 1.3
***************
*** 33,37 ****
{
char *ptr = strrchr(AbsDllPath, '\\');
! *ptr = '\0';
}
}
--- 33,38 ----
{
char *ptr = strrchr(AbsDllPath, '\\');
! if (ptr)
! *ptr = '\0';
}
}
***************
*** 54,58 ****
{
char *ptr = strrchr(AbsExeModPath, '\\');
! *ptr = '\0';
}
}
--- 55,60 ----
{
char *ptr = strrchr(AbsExeModPath, '\\');
! if (ptr)
! *ptr = '\0';
}
}
|
|
From: <ea...@us...> - 2002-06-16 16:58:48
|
Update of /cvsroot/mingw/msys/packages/fileutils/4.1/src
In directory usw-pr-cvs1:/tmp/cvs-serv10643/src
Modified Files:
copy.c ln.c
Log Message:
* src/copy.c (copy_reg): Make buf_size 256 * bigger to speed up disk
I/O.
* src/ln.c: Modify to make it work with symlink == copy.
Index: copy.c
===================================================================
RCS file: /cvsroot/mingw/msys/packages/fileutils/4.1/src/copy.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** copy.c 21 May 2002 15:21:41 -0000 1.3
--- copy.c 16 Jun 2002 16:58:45 -0000 1.4
***************
*** 283,290 ****
* destination file is created with a known file size.
* ************************************************************************/
! if (buf_size < 1024)
! buf_size *= 128;
! else
! buf_size *= 64;
#endif
--- 283,287 ----
* destination file is created with a known file size.
* ************************************************************************/
! buf_size *= 256;
#endif
Index: ln.c
===================================================================
RCS file: /cvsroot/mingw/msys/packages/fileutils/4.1/src/ln.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ln.c 5 May 2002 17:48:25 -0000 1.2
--- ln.c 16 Jun 2002 16:58:45 -0000 1.3
***************
*** 198,203 ****
--- 198,208 ----
#endif
)
+
{
/* Target is a directory; build the full filename. */
+ #if __MSYS__
+ if (! strcmp (dest, ".") || ! strcmp(dest, ".."))
+ {
+ #endif
char *new_dest;
PATH_BASENAME_CONCAT (new_dest, dest, source);
***************
*** 211,214 ****
--- 216,222 ----
return 1;
}
+ #if __MSYS__
+ }
+ #endif
}
***************
*** 249,254 ****
if (S_ISDIR (dest_stats.st_mode))
{
! error (0, 0, _("%s: cannot overwrite directory"), quote (dest));
! return 1;
}
if (interactive)
--- 257,290 ----
if (S_ISDIR (dest_stats.st_mode))
{
! #if __MSYS__
! if (remove_existing_files)
! {
! #include "remove.h"
! struct rm_options rmopt;
! struct File_spec rmfilespec;
! enum RM_status rmstatus;
! int fail = 0;
! rmopt.unlink_dirs = 0;
! rmopt.ignore_missing_files = 1;
! rmopt.interactive = 0;
! rmopt.recursive = 1;
! rmopt.stdin_tty = isatty (STDIN_FILENO);
! rmopt.verbose = 0;
! remove_init ();
! strip_trailing_slashes (dest);
! fspec_init_file (&rmfilespec, dest);
! rmstatus = rm (&rmfilespec, 1, &rmopt);
! if (rmstatus == RM_ERROR)
! fail = 1;
! remove_fini ();
! if (fail)
! exit (fail);
! }
! else
! #endif
! {
! error (0, 0, _("%s: cannot overwrite directory"), quote (dest));
! return 1;
! }
}
if (interactive)
|
|
From: <ea...@us...> - 2002-06-16 16:58:48
|
Update of /cvsroot/mingw/msys/packages/fileutils/4.1 In directory usw-pr-cvs1:/tmp/cvs-serv10643 Modified Files: ChangeLog.MSYS Log Message: * src/copy.c (copy_reg): Make buf_size 256 * bigger to speed up disk I/O. * src/ln.c: Modify to make it work with symlink == copy. Index: ChangeLog.MSYS =================================================================== RCS file: /cvsroot/mingw/msys/packages/fileutils/4.1/ChangeLog.MSYS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog.MSYS 21 May 2002 15:21:40 -0000 1.1 --- ChangeLog.MSYS 16 Jun 2002 16:58:44 -0000 1.2 *************** *** 1,2 **** --- 1,8 ---- + 2002.06.16 Earnie Boyd <ea...@us...> + + * src/copy.c (copy_reg): Make buf_size 256 * bigger to speed up disk + I/O. + * src/ln.c: Modify to make it work with symlink == copy. + 2002.05.21 Earnie Boyd <ea...@us...> |
|
From: <ea...@us...> - 2002-06-15 16:01:39
|
Update of /cvsroot/mingw/runtime In directory usw-pr-cvs1:/tmp/cvs-serv15599 Modified Files: ChangeLog Makefile.in Log Message: * include/_mingw.h: Increment to version 2.1. * Makefile.in: Ditto. Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/runtime/ChangeLog,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ChangeLog 15 Jun 2002 14:07:32 -0000 1.30 --- ChangeLog 15 Jun 2002 16:01:35 -0000 1.31 *************** *** 1,4 **** --- 1,9 ---- 2002-06-15 Earnie Boyd <ea...@us...> + * include/_mingw.h: Increment to version 2.1. + * Makefile.in: Ditto. + + 2002-06-15 Earnie Boyd <ea...@us...> + * Makefile.in (conf_prefix): New variable. (dist_prefix): Ditto. Conditionally set to $(conf_prefix). Index: Makefile.in =================================================================== RCS file: /cvsroot/mingw/runtime/Makefile.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.in 15 Jun 2002 14:07:33 -0000 1.10 --- Makefile.in 15 Jun 2002 16:01:35 -0000 1.11 *************** *** 19,23 **** PACKAGE = mingw-runtime ! VERSION = 2.0 CYGRELEASE = 1 --- 19,23 ---- PACKAGE = mingw-runtime ! VERSION = 2.1 CYGRELEASE = 1 |
|
From: <ea...@us...> - 2002-06-15 16:01:39
|
Update of /cvsroot/mingw/runtime/include In directory usw-pr-cvs1:/tmp/cvs-serv15599/include Modified Files: _mingw.h Log Message: * include/_mingw.h: Increment to version 2.1. * Makefile.in: Ditto. Index: _mingw.h =================================================================== RCS file: /cvsroot/mingw/runtime/include/_mingw.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** _mingw.h 14 Jun 2002 15:12:54 -0000 1.7 --- _mingw.h 15 Jun 2002 16:01:35 -0000 1.8 *************** *** 61,67 **** #endif /* __GNUC__ */ ! #define __MINGW32_VERSION 2.0 #define __MINGW32_MAJOR_VERSION 2 ! #define __MINGW32_MINOR_VERSION 0 #endif /* __MINGW_H */ --- 61,67 ---- #endif /* __GNUC__ */ ! #define __MINGW32_VERSION 2.1 #define __MINGW32_MAJOR_VERSION 2 ! #define __MINGW32_MINOR_VERSION 1 #endif /* __MINGW_H */ |
|
From: <ea...@us...> - 2002-06-15 14:07:35
|
Update of /cvsroot/mingw/runtime In directory usw-pr-cvs1:/tmp/cvs-serv24351 Modified Files: ChangeLog Makefile.in Log Message: * Makefile.in (conf_prefix): New variable. (dist_prefix): Ditto. Conditionally set to $(conf_prefix). (bindist): Use dist_prefix. Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/runtime/ChangeLog,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ChangeLog 14 Jun 2002 15:12:54 -0000 1.29 --- ChangeLog 15 Jun 2002 14:07:32 -0000 1.30 *************** *** 1,2 **** --- 1,8 ---- + 2002-06-15 Earnie Boyd <ea...@us...> + + * Makefile.in (conf_prefix): New variable. + (dist_prefix): Ditto. Conditionally set to $(conf_prefix). + (bindist): Use dist_prefix. + 2002-06-13 Danny Smith <dan...@us...> Index: Makefile.in =================================================================== RCS file: /cvsroot/mingw/runtime/Makefile.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.in 14 Jun 2002 15:12:54 -0000 1.9 --- Makefile.in 15 Jun 2002 14:07:33 -0000 1.10 *************** *** 30,33 **** --- 30,34 ---- target_alias = @target_alias@ prefix = @prefix@ + conf_prefix = @prefix@ program_transform_name = @program_transform_name@ *************** *** 287,290 **** --- 288,297 ---- endif + ifneq (,$(findstring mingw, $(target_alias))) + dist_prefix = + else + dist_prefix = $(conf_prefix) + endif + dist: srcdist bindist *************** *** 313,317 **** mkdir $(distdir) chmod 755 $(distdir) ! $(MAKE) install prefix=$(shell pwd)/$(distdir) rm -f $(distdir).tar.gz cd $(distdir); \ --- 320,324 ---- mkdir $(distdir) chmod 755 $(distdir) ! $(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix) rm -f $(distdir).tar.gz cd $(distdir); \ |
|
From: <ea...@us...> - 2002-06-14 15:12:57
|
Update of /cvsroot/mingw/runtime/samples/dirent
In directory usw-pr-cvs1:/tmp/cvs-serv23887/samples/dirent
Added Files:
wtest.c
Log Message:
Merge in mingwex branch from Cygwin
--- NEW FILE: wtest.c ---
/*
* A test which demonstrates the use of _wopendir and related
* wide char functions declared in dirent.h.
*
* TODO: Make this _UNICODE neutral using tchar.h mappings.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>
int
main (int argc, char* argv[])
{
int i;
struct _wdirent* de;
_WDIR* dir;
long lPos;
if (argc == 2)
{
size_t len = strlen(argv[1]) + 1;
wchar_t* wpath = (wchar_t*) malloc(len *sizeof(wchar_t));
mbstowcs(wpath, argv[1], len);
wprintf (L"Opening directory \"%s\"\n", wpath);
dir = _wopendir(wpath);
free (wpath);
}
else
{
wprintf (L"Opening \".\"\n");
dir = _wopendir(L".");
}
if (!dir)
{
wprintf (L"Directory open failed!\n");
if (errno)
{
wprintf (L"Error : %S\n", strerror(errno));
}
return 1;
}
i = 0;
lPos = -1;
while ((de = _wreaddir (dir)))
{
i++;
wprintf (L"%d : \"%s\" (tell %ld)\n", i, de->d_name,
_wtelldir(dir));
if (i == 3)
{
wprintf (L"We will seek here later.\n");
lPos = _wtelldir (dir);
}
}
printf ("Rewind directory.\n");
_wrewinddir (dir);
if ((de = _wreaddir (dir)))
{
wprintf (L"First entry : \"%s\"\n", de->d_name);
}
else
{
wprintf (L"Empty directory.\n");
}
if (lPos != -1)
{
wprintf (L"Seeking to fourth entry.\n");
_wseekdir (dir, lPos);
if ((de = _wreaddir (dir)))
{
wprintf (L"Fourth entry : \"%s\"\n", de->d_name);
}
else
{
wprintf (L"No fourth entry.\n");
}
}
else
{
wprintf (L"Seek position is past end of directory.\n");
}
wprintf (L"Closing directory.\n");
_wclosedir (dir);
return 0;
}
|
Update of /cvsroot/mingw/runtime/mingwex
In directory usw-pr-cvs1:/tmp/cvs-serv23887/mingwex
Added Files:
Makefile.in _Exit.c atoll.c configure configure.in copysignl.S
dirent.c fdim.c fdimf.c fdiml.c feclearexcept.c fegetenv.c
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c
feupdateenv.c fma.S fmaf.S fmal.c fmax.c fmaxf.c fmaxl.c
fmin.c fminf.c fminl.c fp_consts.c fpclassify.c fpclassifyf.c
fpclassifyl.c fucom.c fwide.c imaxabs.c imaxdiv.c isnan.c
isnanf.c isnanl.c lltoa.c lltow.c log2.c log2f.c log2l.c
math_stubs.c mbsinit.c mingw-fseek.c rint.c rintf.c rintl.c
round.c roundf.c roundl.c signbit.c signbitf.c signbitl.c
sitest.c snprintf.c snwprintf.c strtof.c strtoimax.c
strtoumax.c testwmem.c trunc.c truncf.c truncl.c ulltoa.c
ulltow.c vsnprintf.c vsnwprintf.c wcstof.c wcstoimax.c
wcstoumax.c wdirent.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c
wmemset.c wtoll.c
Log Message:
Merge in mingwex branch from Cygwin
--- NEW FILE: Makefile.in ---
#
# mingw/mingwex/Makefile.in: This file is part of Mingw runtime.
#
# This makefile requires GNU make.
VPATH = @srcdir@
srcdir = @srcdir@
objdir = .
target_alias = @target_alias@
prefix = @prefix@
program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
tooldir = $(exec_prefix)/$(target_alias)
datadir = @datadir@
infodir = @infodir@
includedir = @includedir@
SHELL = /bin/sh
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
DISTFILES = Makefile.in configure configure.in \
mingw-fseek.c \
_Exit.c \
atoll.c \
copysignl.S \
dirent.c \
fdim.c \
fdimf.c \
fdiml.c \
feclearexcept.c \
fegetenv.c \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetround.c \
fetestexcept.c \
fesetexceptflag.c \
feupdateenv.c \
fma.S \
fmaf.S \
fmal.c \
fmax.c \
fmaxf.c \
fmaxl.c \
fmin.c \
fminf.c \
fminl.c \
fp_consts.c \
fpclassify.c \
fpclassifyf.c \
fpclassifyl.c \
fucom.c \
fwide.c \
imaxabs.c \
imaxdiv.c \
isnan.c \
isnanf.c \
isnanl.c \
lltoa.c \
lltow.c \
log2.c \
log2f.c \
log2l.c \
math_stubs.c \
mbsinit.c \
rint.c \
rintf.c \
rintl.c \
round.c \
roundf.c \
roundl.c \
signbit.c \
signbitf.c \
signbitl.c \
sitest.c \
snprintf.c \
snwprintf.c \
strtof.c \
strtoimax.c \
strtoumax.c \
testwmem.c \
trunc.c \
truncf.c \
truncl.c \
ulltoa.c \
ulltow.c \
vsnprintf.c \
vsnwprintf.c \
wcstof.c \
wcstoimax.c \
wcstoumax.c \
wdirent.c \
wmemchr.c \
wmemcmp.c \
wmemcpy.c \
wmemmove.c \
wmemset.c \
wtoll.c
CC = @CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET = $(CC)
AS_FOR_TARGET = $(AS)
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@
OPTFLAGS= -fomit-frame-pointer
# compiling with Cygwin?
MNO_CYGWIN = @MNO_CYGWIN@
INCLUDES = -I$(srcdir) -I$(srcdir)/../include \
-I$(srcdir)/../../w32api/include \
-nostdinc -nostdinc++ \
-iwithprefixbefore include
ALL_CFLAGS = $(CFLAGS) $(OPTFLAGS) $(INCLUDES) $(MNO_CYGWIN)
ALL_CXXFLAGS = $(CXXFLAGS) $(OPTFLAGS) $(INCLUDES) $(MNO_CYGWIN)
AS = @AS@
AR = @AR@
LD = @LD@
AR_FLAGS = rcv
RANLIB = @RANLIB@
DLLTOOL = @DLLTOOL@
DLLTOOLFLAGS =
DLLTOOL_FOR_TARGET = $(DLLTOOL)
DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
LIBMINGWEX_A = libmingwex.a
Q8_OBJS = \
fwide.o imaxabs.o imaxdiv.o mbsinit.o \
strtoimax.o strtoumax.o wcstoimax.o wcstoumax.o \
wmemchr.o wmemcmp.o wmemcpy.o wmemmove.o wmemset.o
STDLIB_STUB_OBJS = \
lltoa.o ulltoa.o \
lltow.o ulltow.o \
atoll.o wtoll.o \
strtof.o wcstof.o \
_Exit.o
STDIO_STUB_OBJS = \
snprintf.o vsnprintf.o snwprintf.o vsnwprintf.o
MATH_OBJS = \
fpclassify.o fpclassifyf.o fpclassifyl.o \
fucom.o \
round.o roundf.o roundl.o \
rint.o rintf.o rintl.o \
signbit.o signbitf.o signbitl.o \
trunc.o truncf.o truncl.o \
isnan.o isnanf.o isnanl.o \
fp_consts.o \
fdim.o fdimf.o fdiml.o \
fmax.o fmaxf.o fmaxl.o \
fmin.o fminf.o fminl.o \
fma.o fmaf.o fmal.o \
log2.o log2f.o log2l.o \
copysignl.o
MATH_STUB_OBJS = \
math_stubs.o
FENV_OBJS = fesetround.o fegetround.o \
fegetenv.o fesetenv.o feupdateenv.o \
feclearexcept.o feholdexcept.o fegetexceptflag.o \
feraiseexcept.o fetestexcept.o fesetexceptflag.o
POSIX_OBJS = \
dirent.o wdirent.o
REPLACE_OBJS = \
mingw-fseek.o
LIB_OBJS = $(Q8_OBJS) $(STDLIB_STUB_OBJS) $(STDIO_STUB_OBJS) \
$(MATH_OBJS) $(MATH_STUB_OBJS) $(FENV_OBJS) $(POSIX_OBJS) \
$(REPLACE_OBJS)
LIBS = $(LIBMINGWEX_A)
DLLS =
all: $(LIBMINGWEX_A)
$(LIBMINGWEX_A): $(LIB_OBJS)
$(AR) $(ARFLAGS) $@ $(LIB_OBJS)
$(RANLIB) $@
Makefile: Makefile.in config.status configure
$(SHELL) config.status
config.status: configure
$(SHELL) config.status --recheck
info:
info-html:
install-info: info
install: all
$(mkinstalldirs) $(inst_libdir)
for i in $(LIBS); do \
$(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
done
clean:
-rm -f $(LIB_OBJS) $(LIBMINGWEX_A)
distclean:
-rm -f *.o *.a *~ core a.out
-rm -f config.cache config.status config.log
-rm -f Makefile
.c.o:
$(CC) -c $(ALL_CFLAGS) $< -o $@
.S.o:
$(CC) -c $< -o $@
.s.o:
$(CC) -c $< -o $@
#
# Dependancies
#
wdirent.o: $(srcdir)/dirent.c $(srcdir)/wdirent.c
dist:
mkdir $(distdir)/mingwex
chmod 755 $(distdir)/mingwex
@for i in $(DISTFILES); do\
cp -p $(srcdir)/$$i $(distdir)/mingwex/$$i ; \
done
--- NEW FILE: _Exit.c ---
#include <stdlib.h>
void _Exit(int status)
{ _exit(status); }
--- NEW FILE: atoll.c ---
#include <stdlib.h>
long long atoll (const char * _c)
{ return _atoi64 (_c); }
--- NEW FILE: configure ---
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
[...968 lines suppressed...]
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
--- NEW FILE: configure.in ---
dnl Process this file with autoconf to produce a configure script.
dnl This file is part of Mingw runtime.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_PREREQ(2.13)
AC_INIT(imaxabs.c)
CC=${CC-cc}
AC_SUBST(CC)
AS=${AS-as}
AC_SUBST(AS)
AR=${AR-ar}
AC_SUBST(AR)
LD=${LD-ld}
AC_SUBST(LD)
RANLIB=${RANLIB-ranlib}
AC_SUBST(RANLIB)
DLLTOOL=${DLLTOOL-dlltool}
AC_SUBST(DLLTOOL)
DLLWRAP=${DLLWRAP-dllwrap}
AC_SUBST(DLLWRAP)
AC_CANONICAL_SYSTEM
case "$target_os" in
*cygwin*)
MNO_CYGWIN=-mno-cygwin
;;
*)
# Build it for MSVCRT by default.
MNO_CYGWIN=
;;
esac
AC_SUBST(MNO_CYGWIN)
AC_PROG_INSTALL
AC_OUTPUT(Makefile)
--- NEW FILE: copysignl.S ---
/*
* Written by J.T. Conklin <jt...@ne...>.
* Changes for long double by Ulrich Drepper <dr...@cy...>
* Public domain.
*/
.file "copysignl.S"
.text
.align 2
.p2align 4,,15
.globl _copysignl
.def _copysignl; .scl 2; .type 32; .endef
_copysignl:
movl 24(%esp),%edx
movl 12(%esp),%eax
andl $0x8000,%edx
andl $0x7fff,%eax
orl %edx,%eax
movl %eax,12(%esp)
fldt 4(%esp)
ret
--- NEW FILE: dirent.c ---
/*
* dirent.c
*
* Derived from DIRLIB.C by Matt J. Weinstein
* This note appears in the DIRLIB.H
* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89
*
* Updated by Jeremy Bettis <je...@hk...>
* Significantly revised and rewinddir, seekdir and telldir added by Colin
* Peters <co...@fu...>
*
* $Revision: 1.1 $
* $Author: earnie $
* $Date: 2002/06/14 15:12:54 $
*
*/
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <io.h>
#include <direct.h>
#include <dirent.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h> /* for GetFileAttributes */
#include <tchar.h>
#define SUFFIX _T("*")
#define SLASH _T("\\")
/*
* opendir
*
* Returns a pointer to a DIR structure appropriately filled in to begin
* searching a directory.
*/
_TDIR *
_topendir (const _TCHAR *szPath)
{
_TDIR *nd;
unsigned int rc;
_TCHAR szFullPath[MAX_PATH];
errno = 0;
if (!szPath)
{
errno = EFAULT;
return (_TDIR *) 0;
}
if (szPath[0] == _T('\0'))
{
errno = ENOTDIR;
return (_TDIR *) 0;
}
/* Attempt to determine if the given path really is a directory. */
rc = GetFileAttributes (szPath);
if (rc == -1)
{
/* call GetLastError for more error info */
errno = ENOENT;
return (_TDIR *) 0;
}
if (!(rc & FILE_ATTRIBUTE_DIRECTORY))
{
/* Error, entry exists but not a directory. */
errno = ENOTDIR;
return (_TDIR *) 0;
}
/* Make an absolute pathname. */
_tfullpath (szFullPath, szPath, MAX_PATH);
/* Allocate enough space to store DIR structure and the complete
* directory path given. */
nd = (_TDIR *) malloc (sizeof (_TDIR) + _tcslen (szFullPath) + _tcslen (SLASH) +
_tcslen (SUFFIX));
if (!nd)
{
/* Error, out of memory. */
errno = ENOMEM;
return (_TDIR *) 0;
}
/* Create the search expression. */
_tcscpy (nd->dd_name, szFullPath);
/* Add on a slash if the path does not end with one. */
if (nd->dd_name[0] != _T('\0') &&
nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('/') &&
nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('\\'))
{
_tcscat (nd->dd_name, SLASH);
}
/* Add on the search pattern */
_tcscat (nd->dd_name, SUFFIX);
/* Initialize handle to -1 so that a premature closedir doesn't try
* to call _findclose on it. */
nd->dd_handle = -1;
/* Initialize the status. */
nd->dd_stat = 0;
/* Initialize the dirent structure. ino and reclen are invalid under
* Win32, and name simply points at the appropriate part of the
* findfirst_t structure. */
nd->dd_dir.d_ino = 0;
nd->dd_dir.d_reclen = 0;
nd->dd_dir.d_namlen = 0;
nd->dd_dir.d_name = nd->dd_dta.name;
return nd;
}
/*
* readdir
*
* Return a pointer to a dirent structure filled with the information on the
* next entry in the directory.
*/
struct _tdirent *
_treaddir (_TDIR * dirp)
{
errno = 0;
/* Check for valid DIR struct. */
if (!dirp)
{
errno = EFAULT;
return (struct _tdirent *) 0;
}
if (dirp->dd_dir.d_name != dirp->dd_dta.name)
{
/* The structure does not seem to be set up correctly. */
errno = EINVAL;
return (struct _tdirent *) 0;
}
if (dirp->dd_stat < 0)
{
/* We have already returned all files in the directory
* (or the structure has an invalid dd_stat). */
return (struct _tdirent *) 0;
}
else if (dirp->dd_stat == 0)
{
/* We haven't started the search yet. */
/* Start the search */
dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
if (dirp->dd_handle == -1)
{
/* Whoops! Seems there are no files in that
* directory. */
dirp->dd_stat = -1;
}
else
{
dirp->dd_stat = 1;
}
}
else
{
/* Get the next search entry. */
if (_tfindnext (dirp->dd_handle, &(dirp->dd_dta)))
{
/* We are off the end or otherwise error. */
_findclose (dirp->dd_handle);
dirp->dd_handle = -1;
dirp->dd_stat = -1;
}
else
{
/* Update the status to indicate the correct
* number. */
dirp->dd_stat++;
}
}
if (dirp->dd_stat > 0)
{
/* Successfully got an entry. Everything about the file is
* already appropriately filled in except the length of the
* file name. */
dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dir.d_name);
return &dirp->dd_dir;
}
return (struct _tdirent *) 0;
}
/*
* closedir
*
* Frees up resources allocated by opendir.
*/
int
_tclosedir (_TDIR * dirp)
{
int rc;
errno = 0;
rc = 0;
if (!dirp)
{
errno = EFAULT;
return -1;
}
if (dirp->dd_handle != -1)
{
rc = _findclose (dirp->dd_handle);
}
/* Delete the dir structure. */
free (dirp);
return rc;
}
/*
* rewinddir
*
* Return to the beginning of the directory "stream". We simply call findclose
* and then reset things like an opendir.
*/
void
_trewinddir (_TDIR * dirp)
{
errno = 0;
if (!dirp)
{
errno = EFAULT;
return;
}
if (dirp->dd_handle != -1)
{
_findclose (dirp->dd_handle);
}
dirp->dd_handle = -1;
dirp->dd_stat = 0;
}
/*
* telldir
*
* Returns the "position" in the "directory stream" which can be used with
* seekdir to go back to an old entry. We simply return the value in stat.
*/
long
_ttelldir (_TDIR * dirp)
{
errno = 0;
if (!dirp)
{
errno = EFAULT;
return -1;
}
return dirp->dd_stat;
}
/*
* seekdir
*
* Seek to an entry previously returned by telldir. We rewind the directory
* and call readdir repeatedly until either dd_stat is the position number
* or -1 (off the end). This is not perfect, in that the directory may
* have changed while we weren't looking. But that is probably the case with
* any such system.
*/
void
_tseekdir (_TDIR * dirp, long lPos)
{
errno = 0;
if (!dirp)
{
errno = EFAULT;
return;
}
if (lPos < -1)
{
/* Seeking to an invalid position. */
errno = EINVAL;
return;
}
else if (lPos == -1)
{
/* Seek past end. */
if (dirp->dd_handle != -1)
{
_findclose (dirp->dd_handle);
}
dirp->dd_handle = -1;
dirp->dd_stat = -1;
}
else
{
/* Rewind and read forward to the appropriate index. */
_trewinddir (dirp);
while ((dirp->dd_stat < lPos) && _treaddir (dirp))
;
}
}
--- NEW FILE: fdim.c ---
#include <math.h>
double
fdim (double x, double y)
{
return (isgreater(x, y) ? (x - y) : 0.0);
}
--- NEW FILE: fdimf.c ---
#include <math.h>
float
fdimf (float x, float y)
{
return (isgreater(x, y) ? (x - y) : 0.0F);
}
--- NEW FILE: fdiml.c ---
#include <math.h>
long double
fdiml (long double x, long double y)
{
return (isgreater(x, y) ? (x - y) : 0.0L);
}
--- NEW FILE: feclearexcept.c ---
#include <fenv.h>
/* 7.6.2.1
The feclearexcept function clears the supported exceptions
represented by its argument. */
int feclearexcept (int excepts)
{
fenv_t _env;
__asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */
_env.__status_word &= ~(excepts & FE_ALL_EXCEPT); /* clear the except */
__asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */
return 0;
}
--- NEW FILE: fegetenv.c ---
#include <fenv.h>
/* 7.6.4.1
The fegetenv function stores the current floating-point environment
in the object pointed to by envp. */
int fegetenv (fenv_t * envp)
{
__asm__ ("fnstenv %0;": "=m" (*envp));
return 0;
}
--- NEW FILE: fegetexceptflag.c ---
#include <fenv.h>
/* 7.6.2.2
The fegetexceptflag function stores an implementation-defined
representation of the exception flags indicated by the argument
excepts in the object pointed to by the argument flagp. */
int fegetexceptflag (fexcept_t * flagp, int excepts)
{
unsigned short _sw;
__asm__ ("fnstsw %%ax;": "=a" (_sw));
*flagp = _sw & excepts & FE_ALL_EXCEPT;
return 0;
}
--- NEW FILE: fegetround.c ---
#include <fenv.h>
/* 7.6.3.1
The fegetround function returns the value of the rounding direction
macro representing the current rounding direction. */
int
fegetround (void)
{
unsigned short _cw;
__asm__ ("fnstcw %0;" : "=m" (_cw));
return _cw
& (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO);
}
--- NEW FILE: feholdexcept.c ---
#include <fenv.h>
/* 7.6.4.2
The feholdexcept function saves the current floating-point
environment in the object pointed to by envp, clears the exception
flags, and then installs a non-stop (continue on exceptions) mode,
if available, for all exceptions. */
int feholdexcept (fenv_t * envp)
{
fenv_t tmp_env;
__asm__ ("fnstenv %0;" : "=m" (* envp)); /* save current into envp */
tmp_env = * envp;
tmp_env.__status_word &= ~FE_ALL_EXCEPT; /* clear exception flags */
tmp_env.__control_word |= FE_ALL_EXCEPT; /* set cw to non-stop */
__asm__ volatile ("fldenv %0;" : : "m" (tmp_env)); /* install the copy */
return 0;
}
--- NEW FILE: feraiseexcept.c ---
#include <fenv.h>
/* 7.6.2.3
The feraiseexcept function raises the supported exceptions
represented by its argument The order in which these exceptions
are raised is unspecified, except as stated in F.7.6.
Whether the feraiseexcept function additionally raises
the inexact exception whenever it raises the overflow
or underflow exception is implementation-defined. */
int feraiseexcept (int excepts)
{
fenv_t _env;
__asm__ volatile ("fnstenv %0;" : "=m" (_env));
_env.__status_word |= excepts & FE_ALL_EXCEPT;
__asm__ volatile ("fldenv %0;"
"fwait;" : : "m" (_env));
return 0;
}
--- NEW FILE: fesetenv.c ---
#include <fenv.h>
/* 7.6.4.3
The fesetenv function establishes the floating-point environment
represented by the object pointed to by envp. The argument envp
points to an object set by a call to fegetenv or feholdexcept, or
equal the macro FE_DFL_ENV or an implementation-defined environment
macro. Note that fesetenv merely installs the state of the exception
flags represented through its argument, and does not raise these
exceptions.
*/
extern void (*_imp___fpreset)( void ) ;
int fesetenv (const fenv_t * envp)
{
if (envp == FE_PC64_ENV)
/*
* fninit initializes the control register to 0x37f,
* the status register to zero and the tag word to 0FFFFh.
* The other registers are unaffected.
*/
__asm__ ("fninit");
else if (envp == FE_PC53_ENV)
/*
* MS _fpreset() does same *except* it sets control word
* to 0x27f (53-bit precison).
* We force calling _fpreset in msvcrt.dll
*/
(*_imp___fpreset)();
else if (envp == FE_DFL_ENV)
/* Use the choice made at app startup */
_fpreset();
else
__asm__ ("fldenv %0;" : : "m" (*envp));
return 0;
}
--- NEW FILE: fesetexceptflag.c ---
#include <fenv.h>
/* 7.6.2.4
The fesetexceptflag function sets the complete status for those
exception flags indicated by the argument excepts, according to the
representation in the object pointed to by flagp. The value of
*flagp shall have been set by a previous call to fegetexceptflag
whose second argument represented at least those exceptions
represented by the argument excepts. This function does not raise
exceptions, but only sets the state of the flags. */
int fesetexceptflag (const fexcept_t * flagp, int excepts)
{
fenv_t _env;
excepts &= FE_ALL_EXCEPT;
__asm__ volatile ("fnstenv %0;" : "=m" (_env));
_env.__status_word &= ~excepts;
_env.__status_word |= (*flagp & excepts);
__asm__ volatile ("fldenv %0;" : : "m" (_env));
return 0;
}
--- NEW FILE: fesetround.c ---
#include <fenv.h>
/* 7.6.3.2
The fesetround function establishes the rounding direction
represented by its argument round. If the argument is not equal
to the value of a rounding direction macro, the rounding direction
is not changed. */
int fesetround (int mode)
{
unsigned short _cw;
if ((mode & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
!= 0)
return -1;
__asm__ volatile ("fnstcw %0;": "=m" (_cw));
_cw &= ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO);
_cw |= mode;
__asm__ volatile ("fldcw %0;" : : "m" (_cw));
return 0;
}
--- NEW FILE: fetestexcept.c ---
#include <fenv.h>
/* 7.6.2.5
The fetestexcept function determines which of a specified subset of
the exception flags are currently set. The excepts argument
specifies the exception flags to be queried.
The fetestexcept function returns the value of the bitwise OR of the
exception macros corresponding to the currently set exceptions
included in excepts. */
int fetestexcept (int excepts)
{
unsigned short _sw;
__asm__ ("fnstsw %%ax" : "=a" (_sw));
return _sw & excepts & FE_ALL_EXCEPT;
}
--- NEW FILE: feupdateenv.c ---
#include <fenv.h>
/* 7.6.4.4
The feupdateenv function saves the currently raised exceptions in
its automatic storage, installs the floating-point environment
represented by the object pointed to by envp, and then raises the
saved exceptions. The argument envp shall point to an object
set by a call to feholdexcept or fegetenv, or equal the macro
FE_DFL_ENV or an implementation-defined environment macro. */
/* FIXME: this works but surely there must be a better way. */
int feupdateenv (const fenv_t * envp)
{
unsigned int _fexcept = fetestexcept (FE_ALL_EXCEPT); /*save excepts */
fesetenv (envp); /* install the env */
feraiseexcept (_fexcept); /* raise the execept */
return 0;
}
--- NEW FILE: fma.S ---
.file "fma.S"
.text
.align 2
.p2align 4,,15
.globl _fma
.def _fma; .scl 2; .type 32; .endef
_fma:
fldl 4(%esp)
fmull 12(%esp)
fldl 20(%esp)
faddp
ret
--- NEW FILE: fmaf.S ---
.file "fmaf.S"
.text
.align 2
.p2align 4,,15
.globl _fmaf
.def _fmaf; .scl 2; .type 32; .endef
_fmaf:
flds 4(%esp)
fmuls 8(%esp)
flds 12(%esp)
faddp
ret
--- NEW FILE: fmal.c ---
long double
fmal ( long double _x, long double _y, long double _z){
return ((_x * _y) + _z);
}
--- NEW FILE: fmax.c ---
#include <math.h>
double
fmax (double _x, double _y)
{
return ( isgreaterequal (_x, _y)|| __isnan (_y) ? _x : _y );
}
--- NEW FILE: fmaxf.c ---
#include <math.h>
float
fmaxf (float _x, float _y)
{
return (( isgreaterequal(_x, _y) || __isnanf (_y)) ? _x : _y );
}
--- NEW FILE: fmaxl.c ---
#include <math.h>
long double
fmaxl (long double _x, long double _y)
{
return (( isgreaterequal(_x, _y) || __isnanl (_y)) ? _x : _y );
}
--- NEW FILE: fmin.c ---
#include <math.h>
double
fmin (double _x, double _y)
{
return ((islessequal(_x, _y) || __isnan (_y)) ? _x : _y );
}
--- NEW FILE: fminf.c ---
#include <math.h>
float
fminf (float _x, float _y)
{
return ((islessequal(_x, _y) || _isnan (_y)) ? _x : _y );
}
--- NEW FILE: fminl.c ---
#include <math.h>
long double
fminl (long double _x, long double _y)
{
return ((islessequal(_x, _y) || __isnanl (_y)) ? _x : _y );
}
--- NEW FILE: fp_consts.c ---
/* Floating point consts needed by STL class mumeric_limits<float>
and numeric_limits<double>. Also used as return values by nan, inf */
#include <math.h>
/*
According to IEEE 754 a QNaN has exponent bits of all 1 values and
initial significand bit of 1. A SNaN has has an exponent of all 1
values and initial significand bit of 0 (with one or more other
significand bits of 1). An Inf has significand of 0 and
exponent of all 1 values. A denormal value has all exponent bits of 0.
The following does _not_ follow those rules, but uses values
equal to those exported from MS C++ runtime lib, msvcprt.dll
for float and double. MSVC however, does not have long doubles.
*/
#define __DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
#define __DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } /* { 0, 0, 0, 0x7ff8 } */
#define __DOUBLE_SNAN_REP { 0, 0, 0, 0xfff0 } /* { 1, 0, 0, 0x7ff0 } */
#define __DOUBLE_DENORM_REP {1, 0, 0, 0}
#define D_NAN_MASK 0x7ff0000000000000LL /* this will mask NaN's and Inf's */
#define __FLOAT_INF_REP { 0, 0x7f80 }
#define __FLOAT_QNAN_REP { 0, 0xffc0 } /* { 0, 0x7fc0 } */
#define __FLOAT_SNAN_REP { 0, 0xff80 } /* { 1, 0x7f80 } */
#define __FLOAT_DENORM_REP {1,0}
#define F_NAN_MASK 0x7f800000
/* This assumes no implicit (hidden) bit in extended mode */
#define __LONG_DOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff }
#define __LONG_DOUBLE_QNAN_REP { 0, 0, 0, 0xc000, 0xffff }
#define __LONG_DOUBLE_SNAN_REP { 0, 0, 0, 0x8000, 0xffff }
#define __LONG_DOUBLE_DENORM_REP {1, 0, 0, 0, 0}
union _ieee_rep
{
unsigned short rep[5];
float float_val;
double double_val;
long double ldouble_val;
} ;
const union _ieee_rep __QNAN = { __DOUBLE_QNAN_REP };
/*
const union _ieee_rep __SNAN = { __DOUBLE_SNAN_REP };
const union _ieee_rep __INF = { __DOUBLE_INF_REP };
const union _ieee_rep __DENORM = { __DOUBLE_DENORM_REP };
*/
/* ISO C99 */
#undef nan
/* FIXME */
double nan (const char * tagp __attribute__((unused)) )
{ return __QNAN.double_val; }
const union _ieee_rep __QNANF = { __FLOAT_QNAN_REP };
/*
const union _ieee_rep __SNANF = { __FLOAT_SNAN_REP };
const union _ieee_rep __INFF = { __FLOAT_INF_REP };
const union _ieee_rep __DENORMF = { __FLOAT_DENORM_REP };
*/
#undef nanf
/* FIXME */
float nanf(const char * tagp __attribute__((unused)) )
{ return __QNANF.float_val;}
const union _ieee_rep __QNANL = { __LONG_DOUBLE_QNAN_REP };
/*
const union _ieee_rep __SNANL = { __LONG_DOUBLE_SNAN_REP };
const union _ieee_rep __INFL = { __LONG_DOUBLE_INF_REP };
const union _ieee_rep __DENORML = { __LONG_DOUBLE_DENORM_REP };
*/
#undef nanl
/* FIXME */
long double nanl (const char * tagp __attribute__((unused)) )
{ return __QNANL.ldouble_val;}
--- NEW FILE: fpclassify.c ---
#include <math.h>
/* 'fxam' sets FPU flags C3,C2,C0 'fstsw' stores:
FP_NAN 001 0x0100
FP_NORMAL 010 0x0400
FP_INFINITE 011 0x0500
FP_ZERO 100 0x4000
FP_SUBNORMAL 110 0x4400
and sets C1 flag (signbit) if neg */
int __fpclassify (double _x){
unsigned short sw;
__asm__ (
"fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (_x)
);
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
}
--- NEW FILE: fpclassifyf.c ---
#include <math.h>
int __fpclassifyf (float _x){
unsigned short sw;
__asm__ (
"fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (_x)
);
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
}
--- NEW FILE: fpclassifyl.c ---
#include <math.h>
int __fpclassifyl (long double _x){
unsigned short sw;
__asm__ (
"fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (_x)
);
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
}
--- NEW FILE: fucom.c ---
int
__fp_unordered_compare (long double x, long double y){
unsigned short retval;
__asm__ (
"fucom %%st(1);"
"fnstsw;"
: "=a" (retval)
: "t" (x), "u" (y)
);
return retval;
}
--- NEW FILE: fwide.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
This is a minimal implementation for environments where
internationalization is not considered important.
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <wchar.h>
int
fwide(stream, mode)
FILE *stream;
int mode;
{
return -1; /* limited to byte orientation */
}
--- NEW FILE: imaxabs.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
This particular implementation requires the matching <inttypes.h>.
*/
#include <inttypes.h>
intmax_t
imaxabs (intmax_t _j)
{ return _j >= 0 ? _j : -_j; }
long long __attribute__ ((alias ("imaxabs"))) llabs (long long);
--- NEW FILE: imaxdiv.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
*/
#include <inttypes.h>
imaxdiv_t
imaxdiv(intmax_t numer, intmax_t denom)
{
imaxdiv_t result;
result.quot = numer / denom;
result.rem = numer % denom;
return result;
}
long long __attribute__ ((alias ("imaxdiv")))
lldiv (long long, long long);
--- NEW FILE: isnan.c ---
#include <math.h>
int
__isnan (double _x)
{
unsigned short _sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (_sw) : "t" (_x));
return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
#undef isnan
int __attribute__ ((alias ("__isnan"))) isnan (double);
--- NEW FILE: isnanf.c ---
#include <math.h>
int
__isnanf (float _x)
{
unsigned short _sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (_sw) : "t" (_x) );
return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
int __attribute__ ((alias ("__isnanf"))) isnanf (float);
--- NEW FILE: isnanl.c ---
#include <math.h>
int
__isnanl (long double _x)
{
unsigned short _sw;
__asm__ ("fxam;"
"fstsw %%ax": "=a" (_sw) : "t" (_x));
return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
== FP_NAN;
}
int __attribute__ ((alias ("__isnanl"))) isnanl (long double);
--- NEW FILE: lltoa.c ---
#include <stdlib.h>
char* lltoa(long long _n, char * _c, int _i)
{ return _i64toa (_n, _c, _i); }
--- NEW FILE: lltow.c ---
#include <stdlib.h>
wchar_t* lltow(long long _n, wchar_t * _w, int _i)
{ return _i64tow (_n, _w, _i); }
--- NEW FILE: log2.c ---
#include <math.h>
double
log2 (double _x)
{
double retval;
__asm__ ("fyl2x;" : "=t" (retval) : "0" (_x), "u" (1.0L) : "st(1)");
return retval;
}
--- NEW FILE: log2f.c ---
#include <math.h>
float
log2f (float _x)
{
float retval;
__asm__ ("fyl2x;" : "=t" (retval) : "0" (_x), "u" (1.0L) : "st(1)");
return retval;
}
--- NEW FILE: log2l.c ---
#include <math.h>
long double
log2l (long double _x)
{
long double retval;
__asm__ ("fyl2x;" : "=t" (retval) : "0" (_x), "u" (1.0L) : "st(1)");
return retval;
}
--- NEW FILE: math_stubs.c ---
#include <math.h>
double copysign (double x, double y) {return _copysign(x, y);}
float copysignf (float x, float y) {return _copysign(x, y);}
double logb (double x) {return _logb(x);}
float logbf (float x) {return _logb( x );}
double nextafter(double x, double y) {return _nextafter(x, y);}
float nextafterf(float x, float y) {return _nextafter(x, y);}
double scalb (double x, long i) {return _scalb (x, i);}
float scalbf (float x, long i) {return _scalb(x, i);}
--- NEW FILE: mbsinit.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <wchar.h>
int
mbsinit(ps)
const mbstate_t *ps;
{
return 1; /* don't have shift states */
}
--- NEW FILE: mingw-fseek.c ---
/*
* Workaround for limitations on win9x where a file contents are
* not zero'd out if you seek past the end and then write.
* Copied from ming local-patch to binutils/bfd/libbfd.c written by
* Mumit Khan <kh...@xr...>
*/
#include <windows.h>
#include <stdio.h>
#include <io.h>
#ifdef __GNUC__
# define INLINE __inline__
#elif defined _MSC_VER
# define INLINE __inline
#else
# define INLINE
#endif
#define ZEROBLOCKSIZE 512
static int __mingw_fseek_called;
/* FIXME: put this in startup code and make os_platform_id global?
Or just get _osver from msvcrt.dll and bitest (_osver & 0x8000)? */
INLINE
static
int
__mingw_is_win9x (void)
{
static DWORD os_platform_id = -1 ;
if (os_platform_id == -1)
{
OSVERSIONINFO os_version_info;
memset (&os_version_info, 0, sizeof (OSVERSIONINFO));
os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
GetVersionEx (&os_version_info);
os_platform_id = os_version_info.dwPlatformId;
}
/* Don't even bother to check for Win32s. */
return os_platform_id == VER_PLATFORM_WIN32_WINDOWS;
}
/* The fseek in Win9x runtime does not zero out the file if seeking past
the end; if you don't want random stuff from your disk included in your
output DLL/executable, use this version instead. On WinNT/Win2k, it
just calls runtime fseek().
CHECK/FIXME: Does this work for both text and binary modes?? */
int
__mingw_fseek (FILE *fp, long offset, int whence)
{
# undef fseek
__mingw_fseek_called = 1;
return fseek (fp, offset, whence);
}
int
__mingw_fwrite (const void *buffer, size_t size, size_t count, FILE *fp)
{
# undef fwrite
if ( __mingw_is_win9x () && __mingw_fseek_called)
{
DWORD actual_length, current_position;
__mingw_fseek_called = 0;
fflush (fp);
actual_length = GetFileSize ((HANDLE) _get_osfhandle (fileno (fp)),
NULL);
current_position = SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
0, 0, FILE_CURRENT);
#ifdef DEBUG
printf ("__mingw_fwrite: current %ld, actual %ld\n",
current_position, actual_length);
#endif /* DEBUG */
if (current_position > actual_length)
{
static char __mingw_zeros[ZEROBLOCKSIZE];
long numleft;
SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
0, 0, FILE_END);
numleft = current_position - actual_length;
#ifdef DEBUG
printf ("__mingw_fwrite: Seeking %ld bytes past end\n", numleft);
#endif /* DEBUG */
while (numleft > 0)
{
DWORD nzeros = (numleft > ZEROBLOCKSIZE)
? ZEROBLOCKSIZE : numleft;
DWORD written;
if (! WriteFile ((HANDLE) _get_osfhandle (fileno (fp)),
__mingw_zeros, nzeros, &written, NULL))
{
/* Best we can hope for, or at least DJ says so. */
SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
0, 0, FILE_BEGIN);
return -1;
}
if (written < nzeros)
{
/* Likewise. */
SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
0, 0, FILE_BEGIN);
return -1;
}
numleft -= written;
}
FlushFileBuffers ((HANDLE) _get_osfhandle (fileno (fp)));
}
}
return fwrite (buffer, size, count, fp);
}
--- NEW FILE: rint.c ---
#include <math.h>
double rint (double x){
double retval;
__asm__ ("frndint;" : "=t" (retval) : "0" (x));
return retval;
}
--- NEW FILE: rintf.c ---
#include <math.h>
float rintf (float x){
float retval;
__asm__ ("frndint;": "=t" (retval) : "0" (x));
return retval;
}
--- NEW FILE: rintl.c ---
#include <math.h>
long double rintl (long double x){
long double retval;
__asm__ ("frndint;": "=t" (retval) : "0" (x));
return retval;
}
--- NEW FILE: round.c ---
#include <fenv.h>
double
round (double x) {
double retval;
unsigned short saved_cw, _cw;
__asm__ (
"fnstcw %0;"
: "=m" (saved_cw)
); /* save control word */
_cw = ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
| (x > 0.0 ? FE_UPWARD : FE_DOWNWARD); /* round away from zero */
__asm__ (
"fldcw %0;"
:
: "m" (_cw)
); /* load the rounding control */
__asm__ (
"frndint;"
: "=t" (retval)
: "0" (x)
); /* do the rounding */
__asm__ (
"fldcw %0;"
:
: "m" (saved_cw)
); /* restore control word */
return retval;
}
--- NEW FILE: roundf.c ---
#include <fenv.h>
float
roundf (float x) {
double retval;
unsigned short saved_cw, _cw;
__asm__ (
"fnstcw %0;"
: "=m" (saved_cw)
); /* save control word */
_cw = ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
| (x > 0.0 ? FE_UPWARD : FE_DOWNWARD); /* round away from zero */
__asm__ (
"fldcw %0;"
:
: "m" (_cw)
); /* load the rounding control */
__asm__ (
"frndint;"
: "=t" (retval)
: "0" (x)
); /* do the rounding */
__asm__ (
"fldcw %0;"
:
: "m" (saved_cw)
); /* restore control word */
return retval;
}
--- NEW FILE: roundl.c ---
#include <fenv.h>
long double
roundl (long double x) {
long double retval;
unsigned short saved_cw, _cw;
__asm__ (
"fnstcw %0;"
: "=m" (saved_cw)
); /* save control word */
_cw = ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
| (x > 0.0 ? FE_UPWARD : FE_DOWNWARD); /* round away from zero */
__asm__ (
"fldcw %0;"
:
: "m" (_cw)
); /* load the rounding control */
__asm__ (
"frndint;"
: "=t" (retval)
: "0" (x)
); /* do the rounding */
__asm__ (
"fldcw %0;"
:
: "m" (saved_cw)
); /* restore control word */
return retval;
}
--- NEW FILE: signbit.c ---
#define __FP_SIGNBIT 0x0200
int __signbit (double x) {
unsigned short sw;
__asm__ ("fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (x) );
return sw & __FP_SIGNBIT;
}
#undef signbit
int __attribute__ ((alias ("__signbit"))) signbit (double);
--- NEW FILE: signbitf.c ---
#define __FP_SIGNBIT 0x0200
int __signbitf (float x) {
unsigned short sw;
__asm__ ("fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (x) );
return sw & __FP_SIGNBIT;
}
int __attribute__ ((alias ("__signbitf"))) signbitf (float);
--- NEW FILE: signbitl.c ---
#define __FP_SIGNBIT 0x0200
int __signbitl (long double x) {
unsigned short sw;
__asm__ ("fxam; fstsw %%ax;"
: "=a" (sw)
: "t" (x) );
return sw & __FP_SIGNBIT;
}
int __attribute__ ((alias ("__signbitl"))) signbitl (long double);
--- NEW FILE: sitest.c ---
/*
sitest -- exercise features of C99 <stdint.h> and <inttypes.h>
This source code has been placed into the PUBLIC DOMAIN by its author.
last edit: 1999/11/05 gw...@ar...
Tries to accommodate pre-C99 versions of <inttypes.h>.
Takes advantage of __Q8_* symbols defined by a particular
implementation of <stdint.h>, but doesn't require them.
NOTE: This is not a thorough validation test of the facilities.
*/
#include <errno.h>
#include <limits.h> /* for CHAR_BIT */
#include <stdio.h>
#include <stddef.h> /* for ptrdiff_t */
[...1488 lines suppressed...]
L"1234567890123456789012345678901234567890"
L"1234567890123456789012345678901234567890"
L"1234567890123456789012345678901234567890"
L"1234567890123456789012345678901234567890"
L"1234567890123456789012345678901234567890",
&wendptr, 0
)
) != UINTMAX_MAX || errno != ERANGE
) {
printf("*** wcstoumax failed -overflow test ***\n");
status = EXIT_FAILURE;
}
}
#endif /* defined(INTMAX_MAX) */
if ( status != 0 )
fprintf(stderr, "sitest failed; see stdout for details\n");
return status;
}
--- NEW FILE: snprintf.c ---
#include <stdarg.h>
#include <stdio.h>
int snprintf(char* buffer, size_t n, const char* format, ...)
{
int retval;
va_list argptr;
va_start( argptr, format );
retval = _vsnprintf( buffer, n, format, argptr );
va_end( argptr );
return retval;
}
--- NEW FILE: snwprintf.c ---
#include <stdarg.h>
#include <wchar.h>
int snwprintf(wchar_t* buffer, size_t n, const wchar_t* format, ...)
{
int retval;
va_list argptr;
va_start( argptr, format );
retval = _vsnwprintf( buffer, n, format, argptr );
va_end( argptr );
return retval;
}
--- NEW FILE: strtof.c ---
#include <stdlib.h>
float strtof( const char *nptr, char **endptr)
{
return (strtod(nptr, endptr));
}
--- NEW FILE: strtoimax.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
This particular implementation requires the matching <inttypes.h>.
It also assumes that character codes for A..Z and a..z are in
contiguous ascending order; this is true for ASCII but not EBCDIC.
*/
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
/* Helper macros */
/* convert digit character to number, in any base */
#define ToNumber(c) (isdigit(c) ? (c) - '0' : \
isupper(c) ? (c) - 'A' + 10 : \
islower(c) ? (c) - 'a' + 10 : \
-1 /* "invalid" flag */ \
)
/* validate converted digit character for specific base */
#define valid(n, b) ((n) >= 0 && (n) < (b))
intmax_t
strtoimax(nptr, endptr, base)
register const char * __restrict__ nptr;
char ** __restrict__ endptr;
register int base;
{
register uintmax_t accum; /* accumulates converted value */
register int n; /* numeral from digit character */
int minus; /* set iff minus sign seen */
int toobig; /* set iff value overflows */
if ( endptr != NULL )
*endptr = (char *)nptr; /* in case no conversion's performed */
if ( base < 0 || base == 1 || base > 36 )
{
errno = EDOM;
return 0; /* unspecified behavior */
}
/* skip initial, possibly empty sequence of white-space characters */
while ( isspace(*nptr) )
++nptr;
/* process subject sequence: */
/* optional sign */
if ( (minus = *nptr == '-') || *nptr == '+' )
++nptr;
if ( base == 0 ) {
if ( *nptr == '0' ) {
if ( nptr[1] == 'X' || nptr[1] == 'x' )
base = 16;
else
base = 8;
}
else
base = 10;
}
/* optional "0x" or "0X" for base 16 */
if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') )
nptr += 2; /* skip past this prefix */
/* check whether there is at least one valid digit */
n = ToNumber(*nptr);
++nptr;
if ( !valid(n, base) )
return 0; /* subject seq. not of expected form */
accum = n;
for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr )
if ( accum > INTMAX_MAX / base + 2 ) /* major wrap-around */
toobig = 1; /* but keep scanning */
else
accum = base * accum + n;
if ( endptr != NULL )
*endptr = (char *)nptr; /* points to first not-valid-digit */
if ( minus )
{
if ( accum > (uintmax_t)INTMAX_MAX + 1 )
toobig = 1;
}
else
if ( accum > (uintmax_t)INTMAX_MAX )
toobig = 1;
if ( toobig )
{
errno = ERANGE;
return minus ? INTMAX_MIN : INTMAX_MAX;
}
else
return (intmax_t)(minus ? -accum : accum);
}
long long __attribute__ ((alias ("strtoimax")))
strtoll (const char* __restrict__ nptr, char ** __restrict__ endptr, int base);
--- NEW FILE: strtoumax.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
This particular implementation requires the matching <inttypes.h>.
It also assumes that character codes for A..Z and a..z are in
contiguous ascending order; this is true for ASCII but not EBCDIC.
*/
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
/* Helper macros */
/* convert digit character to number, in any base */
#define ToNumber(c) (isdigit(c) ? (c) - '0' : \
isupper(c) ? (c) - 'A' + 10 : \
islower(c) ? (c) - 'a' + 10 : \
-1 /* "invalid" flag */ \
)
/* validate converted digit character for specific base */
#define valid(n, b) ((n) >= 0 && (n) < (b))
uintmax_t
strtoumax(nptr, endptr, base)
register const char * __restrict__ nptr;
char ** __restrict__ endptr;
register int base;
{
register uintmax_t accum; /* accumulates converted value */
register uintmax_t next; /* for computing next value of accum */
register int n; /* numeral from digit character */
int minus; /* set iff minus sign seen (yes!) */
int toobig; /* set iff value overflows */
if ( endptr != NULL )
*endptr = (char *)nptr; /* in case no conversion's performed */
if ( base < 0 || base == 1 || base > 36 )
{
errno = EDOM;
return 0; /* unspecified behavior */
}
/* skip initial, possibly empty sequence of white-space characters */
while ( isspace(*nptr) )
++nptr;
/* process subject sequence: */
/* optional sign (yes!) */
if ( (minus = *nptr == '-') || *nptr == '+' )
++nptr;
if ( base == 0 )
{
if ( *nptr == '0' )
{
if ( nptr[1] == 'X' || nptr[1] == 'x' )
base = 16;
else
base = 8;
}
else
base = 10;
}
/* optional "0x" or "0X" for base 16 */
if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') )
nptr += 2; /* skip past this prefix */
/* check whether there is at least one valid digit */
n = ToNumber(*nptr);
++nptr;
if ( !valid(n, base) )
return 0; /* subject seq. not of expected form */
accum = n;
for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr )
if ( accum > UINTMAX_MAX / base + 1 /* major wrap-around */
|| (next = base * accum + n) < accum /* minor wrap-around */
)
toobig = 1; /* but keep scanning */
else
accum = next;
if ( endptr != NULL )
*endptr = (char *)nptr; /* points to first not-valid-digit */
if ( toobig )
{
errno = ERANGE;
return UINTMAX_MAX;
}
else
return minus ? -accum : accum; /* (yes!) */
}
unsigned long long __attribute__ ((alias ("strtoumax")))
strtoull (const char* __restrict__ nptr, char ** __restrict__ endptr, int base);
--- NEW FILE: testwmem.c ---
#include <memory.h>
#include <wchar.h>
#include <stdio.h>
wchar_t fmt1[] = L" 1 2 3 4 5";
wchar_t fmt2[] = L"12345678901234567890123456789012345678901234567890";
void test_wmemchr( void )
{
wchar_t* dest;
wint_t result;
wint_t ch = L'r';
wchar_t str[] = L"lazy";
wchar_t string1[60] = L"The quick brown dog jumps over the lazy fox";
wprintf( L"Wmemchr\n" );
wprintf( L"String to be searched:\n\t\t%s\n", string1 );
wprintf( L"\t\t%s\n\t\t%s\n\n", fmt1, fmt2 );
wprintf( L"Search char:\t%c\n", ch );
dest = wmemchr( string1, ch, sizeof( string1 ) );
result = dest - string1 + 1;
if( dest != NULL )
wprintf( L"Result:\t\t%c found at position %d\n\n", ch, result );
else
wprintf( L"Result:\t\t%c not found\n\n" );
return;
}
void test_wmemset( void )
{/* 1 2
0123456789012345678901234567890 */
wchar_t buffer[] = L"This is a test of the wmemset function";
wprintf( L"Before: %s\n", buffer );
wmemset( buffer+22, L'*', 7 );
wprintf( L"After: %s\n\n", buffer );
return;
}
void test_wmemmove( void )
{
wchar_t string1[60] = L"The quick brown dog jumps over the lazy fox";
wchar_t string2[60] = L"The quick brown fox jumps over the lazy dog";
wprintf( L"Wmemcpy without overlap\n" );
wprintf( L"Source:\t\t%s\n", string1 + 40 );
wprintf( L"Destination:\t%s\n", string1 + 16 );
wmemcpy( string1 + 16, string1 + 40, 3 );
wprintf( L"Result:\t\t%s\n", string1 );
wprintf( L"Length:\t\t%d characters\n\n", wcslen( string1 ) );
wmemcpy( string1 + 16, string2 + 40, 3 );
wprintf( L"Wmemmove with overlap\n" );
wprintf( L"Source:\t\t%s\n", string2 + 4 );
wprintf( L"Destination:\t%s\n", string2 + 10 );
wmemmove( string2 + 10, string2 + 4, 40 );
wprintf( L"Result:\t\t%s\n", string2 );
wprintf( L"Length:\t\t%d characters\n\n", wcslen( string2 ) );
wprintf( L"Wmemcpy with overlap\n" );
wprintf( L"Source:\t\t%s\n", string1 + 4 );
wprintf( L"Destination:\t%s\n", string1 + 10 );
wmemcpy( string1 + 10, string1 + 4, 40 );
wprintf( L"Result:\t\t%s\n", string1 );
wprintf( L"Length:\t\t%d characters\n\n", wcslen( string1 ) );
}
void test_wmemcmp( void )
{
wchar_t first[] = L"12345678901234567890";
wchar_t second[] = L"12345678901234567891";
wint_t result;
wprintf(L"Wmemcmp\n");
wprintf( L"Compare '%.19s' to '%.19s':\n", first, second );
result = wmemcmp( first, second, 19 );
if( result < 0 )
wprintf( L"First is less than second.\n" );
else if( result == 0 )
wprintf( L"First is equal to second.\n" );
else if( result > 0 )
wprintf( L"First is greater than second.\n" );
wprintf( L"\nCompare '%.20s' to '%.20s':\n", first, second );
result = wmemcmp( first, second, 20 );
if( result < 0 )
wprintf( L"First is less than second.\n\n" );
else if( result == 0 )
wprintf( L"First is equal to second.\n\n" );
else if( result > 0 )
wprintf( L"First is greater than second.\n\n" );
}
int main(){
test_wmemset();
test_wmemmove();
test_wmemchr();
test_wmemcmp();
return 0;
}
--- NEW FILE: trunc.c ---
#include <fenv.h>
#include <math.h>
double
trunc (double _x){
double retval;
unsigned short saved_cw;
__asm__ ("fnstcw %0;": "=m" (saved_cw)); /* save FPU control word */
__asm__ ("fldcw %0;"
:
: "m" ((saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD
| FE_TOWARDZERO)) | FE_TOWARDZERO)
);
__asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
__asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
return retval;
}
--- NEW FILE: truncf.c ---
#include <fenv.h>
#include <math.h>
float
truncf (float _x){
float retval;
unsigned short saved_cw;
__asm__ ("fnstcw %0;": "=m" (saved_cw)); /* save FPU control word */
__asm__ ("fldcw %0;"
:
: "m" ((saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD
| FE_TOWARDZERO)) | FE_TOWARDZERO)
);
__asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
__asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
return retval;
}
--- NEW FILE: truncl.c ---
#include <fenv.h>
#include <math.h>
long double
truncl (long double _x){
long double retval;
unsigned short saved_cw;
__asm__ ("fnstcw %0;": "=m" (saved_cw)); /* save FPU control word */
__asm__ ("fldcw %0;"
:
: "m" ((saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD
| FE_TOWARDZERO)) | FE_TOWARDZERO)
);
__asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
__asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
return retval;
}
--- NEW FILE: ulltoa.c ---
#include <stdlib.h>
char* ulltoa(unsigned long long _n, char * _c, int _i)
{ return _ui64toa (_n, _c, _i); }
--- NEW FILE: ulltow.c ---
#include <stdlib.h>
wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
{ return _ui64tow (_n, _w, _i); }
--- NEW FILE: vsnprintf.c ---
#include <stdarg.h>
#include <stdio.h>
int vsnprintf (char* s, size_t n, const char* format, va_list arg)
{ return _vsnprintf ( s, n, format, arg); }
--- NEW FILE: vsnwprintf.c ---
#include <stdarg.h>
#include <wchar.h>
int vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr)
{ return _vsnwprintf( buffer, n, format, argptr );}
--- NEW FILE: wcstof.c ---
#include <wchar.h>
float wcstof( const wchar_t *nptr, wchar_t **endptr)
{
return (wcstod(nptr, endptr));
}
--- NEW FILE: wcstoimax.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
This particular implementation requires the matching <inttypes.h>.
It also assumes that character codes for A..Z and a..z are in
contiguous ascending order; this is true for ASCII but not EBCDIC.
*/
#include <wchar.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
/* convert digit wide character to number, in any base */
#define ToWNumber(c) (iswdigit(c) ? (c) - L'0' : \
iswupper(c) ? (c) - L'A' + 10 : \
iswlower(c) ? (c) - L'a' + 10 : \
-1 /* "invalid" flag */ \
)
/* validate converted digit character for specific base */
#define valid(n, b) ((n) >= 0 && (n) < (b))
intmax_t
wcstoimax(nptr, endptr, base)
register const wchar_t * __restrict__ nptr;
wchar_t ** __restrict__ endptr;
register int base;
{
register uintmax_t accum; /* accumulates converted value */
register int n; /* numeral from digit character */
int minus; /* set iff minus sign seen */
int toobig; /* set iff value overflows */
if ( endptr != NULL )
*endptr = (wchar_t *)nptr; /* in case no conv performed */
if ( base < 0 || base == 1 || base > 36 )
{
errno = EDOM;
return 0; /* unspecified behavior */
}
/* skip initial, possibly empty sequence of white-space w.characters */
while ( iswspace(*nptr) )
++nptr;
/* process subject sequence: */
/* optional sign */
if ( (minus = *nptr == L'-') || *nptr == L'+' )
++nptr;
if ( base == 0 )
{
if ( *nptr == L'0' )
{
if ( nptr[1] == L'X' || nptr[1] == L'x' )
base = 16;
else
base = 8;
}
else
base = 10;
}
/* optional "0x" or "0X" for base 16 */
if ( base == 16 && *nptr == L'0'
&& (nptr[1] == L'X' || nptr[1] == L'x')
)
nptr += 2; /* skip past this prefix */
/* check whether there is at least one valid digit */
n = ToWNumber(*nptr);
++nptr;
if ( !valid(n, base) )
return 0; /* subject seq. not of expected form */
accum = n;
for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
if ( accum > INTMAX_MAX / base + 2 ) /* major wrap-around */
toobig = 1; /* but keep scanning */
else
accum = base * accum + n;
if ( endptr != NULL )
*endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
if ( minus )
{
if ( accum > (uintmax_t)INTMAX_MAX + 1 )
toobig = 1;
}
else
if ( accum > (uintmax_t)INTMAX_MAX )
toobig = 1;
if ( toobig )
{
errno = ERANGE;
return minus ? INTMAX_MIN : INTMAX_MAX;
}
else
return (intmax_t)(minus ? -accum : accum);
}
long long __attribute__ ((alias ("wcstoimax")))
wcstoll (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
--- NEW FILE: wcstoumax.c ---
/*
This source code was extracted from the Q8 package created and
placed in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
This particular implementation requires the matching <inttypes.h>.
It also assumes that character codes for A..Z and a..z are in
contiguous ascending order; this is true for ASCII but not EBCDIC.
*/
#include <wchar.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
/* convert digit wide character to number, in any base */
#define ToWNumber(c) (iswdigit(c) ? (c) - L'0' : \
iswupper(c) ? (c) - L'A' + 10 : \
iswlower(c) ? (c) - L'a' + 10 : \
-1 /* "invalid" flag */ \
)
/* validate converted digit character for specific base */
#define valid(n, b) ((n) >= 0 && (n) < (b))
uintmax_t
wcstoumax(nptr, endptr, base)
register const wchar_t * __restrict__ nptr;
wchar_t ** __restrict__ endptr;
register int base;
{
register uintmax_t accum; /* accumulates converted value */
register uintmax_t next; /* for computing next value of accum */
register int n; /* numeral from digit character */
int minus; /* set iff minus sign seen (yes!) */
int toobig; /* set iff value overflows */
if ( endptr != NULL )
*endptr = (wchar_t *)nptr; /* in case no conv performed */
if ( base < 0 || base == 1 || base > 36 )
{
errno = EDOM;
return 0; /* unspecified behavior */
}
/* skip initial, possibly empty sequence of white-space w.characters */
while ( iswspace(*nptr) )
++nptr;
/* process subject sequence: */
/* optional sign */
if ( (minus = *nptr == L'-') || *nptr == L'+' )
++nptr;
if ( base == 0 )
{
if ( *nptr == L'0' )
{
if ( nptr[1] == L'X' || nptr[1] == L'x' )
base = 16;
else
base = 8;
}
else
base = 10;
}
/* optional "0x" or "0X" for base 16 */
if ( base == 16 && *nptr == L'0'
&& (nptr[1] == L'X' || nptr[1] == L'x')
)
nptr += 2; /* skip past this prefix */
/* check whether there is at least one valid digit */
n = ToWNumber(*nptr);
++nptr;
if ( !valid(n, base) )
return 0; /* subject seq. not of expected form */
accum = n;
for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
if ( accum > UINTMAX_MAX / base + 1 /* major wrap-around */
|| (next = base * accum + n) < accum /* minor wrap-around */
)
toobig = 1; /* but keep scanning */
else
accum = next;
if ( endptr != NULL )
*endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
if ( toobig )
{
errno = ERANGE;
return UINTMAX_MAX;
}
else
return minus ? -accum : accum; /* (yes!) */
}
unsigned long long __attribute__ ((alias ("wcstoumax")))
wcstoull (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
--- NEW FILE: wdirent.c ---
#define _UNICODE 1
#define UNICODE 1
#include "dirent.c"
--- NEW FILE: wmemchr.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <wchar.h>
wchar_t*
wmemchr(s, c, n)
register const wchar_t *s;
register wchar_t c;
register size_t n;
{
if ( s != NULL )
for ( ; n > 0; ++s, --n )
if ( *s == c )
return (wchar_t *)s;
return NULL;
}
--- NEW FILE: wmemcmp.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <wchar.h>
int
wmemcmp(s1, s2, n)
register const wchar_t *s1;
register const wchar_t *s2;
size_t n;
{
if ( n == 0 || s1 == s2 )
return 0; /* even for NULL pointers */
if ( (s1 != NULL) != (s2 != NULL) )
return s2 == NULL ? 1 : -1; /* robust */
for ( ; n > 0; ++s1, ++s2, --n )
if ( *s1 != *s2 )
return *s1 - *s2;
return 0;
}
--- NEW FILE: wmemcpy.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <wchar.h>
wchar_t *
wmemcpy(s1, s2, n)
register wchar_t * __restrict__ s1;
register const wchar_t * __restrict__ s2;
register size_t n;
{
wchar_t *orig_s1 = s1;
if ( s1 == NULL || s2 == NULL || n == 0 )
return orig_s1; /* robust */
for ( ; n > 0; --n )
*s1++ = *s2++;
return orig_s1;
}
--- NEW FILE: wmemmove.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code values within a wchar_t or wint_t,
so long as no other wchar_t codes are used by the program.
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
wchar_t *
wmemmove(s1, s2, n)
register wchar_t *s1;
register const wchar_t *s2;
register size_t n;
{
wchar_t *orig_s1 = s1;
if ( s1 == NULL || s2 == NULL || n == 0 )
return orig_s1; /* robust */
/* XXX -- The following test works only within a flat address space! */
if ( s2 >= s1 )
for ( ; n > 0; --n )
*s1++ = *s2++;
else {
s1 += n;
s2 += n;
for ( ; n > 0; --n )
*--s1 = *--s2;
}
return orig_s1;
}
--- NEW FILE: wmemset.c ---
/* This source code was extracted from the Q8 package created and placed
in the PUBLIC DOMAIN by Doug Gwyn <gw...@ar...>
last edit: 1999/11/05 gw...@ar...
Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
It supports an encoding where all char codes are mapped
to the *same* code ...
[truncated message content] |
|
From: <ea...@us...> - 2002-06-14 15:12:57
|
Update of /cvsroot/mingw/runtime/profile
In directory usw-pr-cvs1:/tmp/cvs-serv23887/profile
Modified Files:
Makefile.in configure configure.in
Log Message:
Merge in mingwex branch from Cygwin
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mingw/runtime/profile/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.in 11 Jun 2001 18:56:56 -0000 1.2
--- Makefile.in 14 Jun 2002 15:12:55 -0000 1.3
***************
*** 50,54 ****
INCLUDES = -I$(srcdir) -I$(srcdir)/../include \
-I$(srcdir)/../../w32api/include \
! -nostdinc -nostdinc++
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
--- 50,55 ----
INCLUDES = -I$(srcdir) -I$(srcdir)/../include \
-I$(srcdir)/../../w32api/include \
! -nostdinc -nostdinc++ \
! -iwithprefixbefore include
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
***************
*** 66,70 ****
LIBGMON_A = @LIBGMON_A@
LIBGMON_OBJS = gmon.o mcount.o profil.o
! CRT0S = gcrt1.o gcrt2.o
LIBS = $(LIBGMON_A)
--- 67,72 ----
LIBGMON_A = @LIBGMON_A@
LIBGMON_OBJS = gmon.o mcount.o profil.o
! CRT0S = @CRT0S@
! ALL_CRT0S = gcrt0.o gcrt1.o gcrt2.o
LIBS = $(LIBGMON_A)
***************
*** 77,80 ****
--- 79,87 ----
$(RANLIB) $@
+ # FIXME: These are really the same, but gcc specs want different names.
+ # The only CRT dependency is atexit.
+ gcrt0.o: gcrt0.c
+ $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $?
+
gcrt1.o: gcrt0.c
$(CC) -U__MSVCRT__ -c -o $@ $(CPPFLAGS) $(CFLAGS) $?
***************
*** 96,115 ****
install: all
! $(mkinstalldirs) $(tooldir)/lib
for i in $(LIBS); do \
! $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
done
for i in $(CRT0S); do \
! $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
done
for sub in . ; do \
! $(mkinstalldirs) $(tooldir)/include/$$sub ; \
for i in $(srcdir)/$$sub/*.h ; do \
! $(INSTALL_DATA) $$i $(tooldir)/include/$$sub/`basename $$i` ; \
done ; \
done
clean:
! -rm -f $(LIBGMON_OBJS) $(CRT0S) $(LIBGMON_A)
distclean:
--- 103,122 ----
install: all
! $(mkinstalldirs) $(inst_libdir)
for i in $(LIBS); do \
! $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
done
for i in $(CRT0S); do \
! $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
done
for sub in . ; do \
! $(mkinstalldirs) $(inst_includedir)/$$sub ; \
for i in $(srcdir)/$$sub/*.h ; do \
! $(INSTALL_DATA) $$i $(inst_includedir)/$$sub/`basename $$i` ; \
done ; \
done
clean:
! -rm -f $(LIBGMON_OBJS) $(ALL_CRT0S) $(LIBGMON_A)
distclean:
Index: configure
===================================================================
RCS file: /cvsroot/mingw/runtime/profile/configure,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** configure 11 Jun 2001 18:56:56 -0000 1.2
--- configure 14 Jun 2002 15:12:55 -0000 1.3
***************
*** 646,649 ****
--- 646,651 ----
+ LIBGMON_A=libgmon.a
+
case "$target_os" in
*mingw32crt*)
***************
*** 651,657 ****
MNO_CYGWIN=
RUNTIME=crtdll
! THREAD_DLL=mingwc
! LIBM_A=libm.a
! LIBGMON_A=libgmon.a
;;
*cygwin*)
--- 653,657 ----
MNO_CYGWIN=
RUNTIME=crtdll
! CRT0S="gcrt1.o gcrt2.o"
;;
*cygwin*)
***************
*** 659,667 ****
MNO_CYGWIN=-mno-cygwin
RUNTIME=msvcrt
! THREAD_DLL=mingwc
# Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
# overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
;;
*)
--- 659,665 ----
MNO_CYGWIN=-mno-cygwin
RUNTIME=msvcrt
! CRT0S=gcrt0.o
# Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
# overwrite Cygwin's one. Likewise for libgmon.a.
;;
*)
***************
*** 670,676 ****
MNO_CYGWIN=
RUNTIME=msvcrt
! THREAD_DLL=mingwm
! LIBM_A=libm.a
! LIBGMON_A=libgmon.a
;;
esac
--- 668,672 ----
MNO_CYGWIN=
RUNTIME=msvcrt
! CRT0S="gcrt1.o gcrt2.o"
;;
esac
***************
*** 682,686 ****
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
--- 678,681 ----
***************
*** 695,699 ****
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:698: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
--- 690,694 ----
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:693: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
***************
*** 917,923 ****
s%@RUNTIME@%$RUNTIME%g
s%@MNO_CYGWIN@%$MNO_CYGWIN%g
- s%@THREAD_DLL@%$THREAD_DLL%g
- s%@LIBM_A@%$LIBM_A%g
s%@LIBGMON_A@%$LIBGMON_A%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
--- 912,917 ----
s%@RUNTIME@%$RUNTIME%g
s%@MNO_CYGWIN@%$MNO_CYGWIN%g
s%@LIBGMON_A@%$LIBGMON_A%g
+ s%@CRT0S@%$CRT0S%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Index: configure.in
===================================================================
RCS file: /cvsroot/mingw/runtime/profile/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** configure.in 11 Jun 2001 18:56:56 -0000 1.2
--- configure.in 14 Jun 2002 15:12:55 -0000 1.3
***************
*** 36,39 ****
--- 36,41 ----
AC_CANONICAL_SYSTEM
+ LIBGMON_A=libgmon.a
+
case "$target_os" in
*mingw32crt*)
***************
*** 41,47 ****
MNO_CYGWIN=
RUNTIME=crtdll
! THREAD_DLL=mingwc
! LIBM_A=libm.a
! LIBGMON_A=libgmon.a
;;
*cygwin*)
--- 43,47 ----
MNO_CYGWIN=
RUNTIME=crtdll
! CRT0S="gcrt1.o gcrt2.o"
;;
*cygwin*)
***************
*** 49,57 ****
MNO_CYGWIN=-mno-cygwin
RUNTIME=msvcrt
! THREAD_DLL=mingwc
# Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
# overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
;;
*)
--- 49,55 ----
MNO_CYGWIN=-mno-cygwin
RUNTIME=msvcrt
! CRT0S=gcrt0.o
# Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
# overwrite Cygwin's one. Likewise for libgmon.a.
;;
*)
***************
*** 60,66 ****
MNO_CYGWIN=
RUNTIME=msvcrt
! THREAD_DLL=mingwm
! LIBM_A=libm.a
! LIBGMON_A=libgmon.a
;;
esac
--- 58,62 ----
MNO_CYGWIN=
RUNTIME=msvcrt
! CRT0S="gcrt1.o gcrt2.o"
;;
esac
***************
*** 69,75 ****
AC_SUBST(RUNTIME)
AC_SUBST(MNO_CYGWIN)
- AC_SUBST(THREAD_DLL)
- AC_SUBST(LIBM_A)
AC_SUBST(LIBGMON_A)
AC_PROG_INSTALL
--- 65,70 ----
AC_SUBST(RUNTIME)
AC_SUBST(MNO_CYGWIN)
AC_SUBST(LIBGMON_A)
+ AC_SUBST(CRT0S)
AC_PROG_INSTALL
|
|
From: <ea...@us...> - 2002-06-14 15:12:57
|
Update of /cvsroot/mingw/runtime/include
In directory usw-pr-cvs1:/tmp/cvs-serv23887/include
Modified Files:
_mingw.h ctype.h dirent.h dos.h fcntl.h float.h math.h
stdarg.h stddef.h stdint.h stdio.h stdlib.h tchar.h time.h
varargs.h wchar.h wctype.h
Added Files:
fenv.h inttypes.h
Log Message:
Merge in mingwex branch from Cygwin
--- NEW FILE: fenv.h ---
#ifndef _FENV_H_
#define _FENV_H_
/* FPU status word exception flags */
#define FE_INVALID 0x01
#define FE_DENORMAL 0x02
#define FE_DIVBYZERO 0x04
#define FE_OVERFLOW 0x08
#define FE_UNDERFLOW 0x10
#define FE_INEXACT 0x20
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
/* FPU control word rounding flags */
#define FE_TONEAREST 0x0000
#define FE_DOWNWARD 0x0400
#define FE_UPWARD 0x0800
#define FE_TOWARDZERO 0x0c00
#ifndef RC_INVOKED
/*
For now, support only for the basic abstraction of flags that are
either set or clear. fexcept_t could be structure that holds more
info about the fp environment.
*/
typedef unsigned short fexcept_t;
/* This 28-byte struct represents the entire floating point
environment as stored by fnstenv or fstenv */
typedef struct
{
unsigned short __control_word;
unsigned short __unused0;
unsigned short __status_word;
unsigned short __unused1;
unsigned short __tag_word;
unsigned short __unused2;
unsigned int __ip_offset; /* instruction pointer offset */
unsigned short __ip_selector;
unsigned short __opcode;
unsigned int __data_offset;
unsigned short __data_selector;
unsigned short __unused3;
} fenv_t;
/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
different fp environments */
/* The default Intel x87 floating point environment (64-bit mantissa) */
#define FE_PC64_ENV ((const fenv_t *)-1)
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
#define FE_PC53_ENV ((const fenv_t *)-2)
/* The FE_DFL_ENV macro is required by standard.
fesetenv will use the environment set at app startup.*/
#define FE_DFL_ENV ((const fenv_t *) 0)
#ifdef __cplusplus
extern "C" {
#endif
/*TODO: Some of these could be inlined */
/* 7.6.2 Exception */
extern int feclearexcept (int);
extern int fegetexceptflag (fexcept_t * flagp, int excepts);
extern int feraiseexcept (int excepts );
extern int fesetexceptflag (const fexcept_t *, int);
extern int fetestexcept (int excepts);
/* 7.6.3 Rounding */
extern int fegetround (void);
extern int fesetround (int mode);
/* 7.6.4 Environment */
extern int fegetenv (fenv_t * envp);
extern int fesetenv (const fenv_t * );
extern int feupdateenv (const fenv_t *);
extern int feholdexcept (fenv_t *);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* ndef _FENV_H */
--- NEW FILE: inttypes.h ---
/* 7.8 Format conversion of integer types <inttypes.h> */
#ifndef _INTTYPES_H_
#define _INTTYPES_H_
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
/* 7.8.1 Macros for format specifiers
*
* MS runtime does not yet understand C9x standard "ll"
* length specifier. It appears to treat "ll" as "l".
* The non-standard I64 length specifier causes warning in GCC,
* but understood by MS runtime functions.
*/
/* fprintf macros for signed types */
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
#define PRId64 "I64d"
#define PRIdLEAST8 "d"
#define PRIdLEAST16 "d"
#define PRIdLEAST32 "d"
#define PRIdLEAST64 "I64d"
#define PRIdFAST8 "d"
#define PRIdFAST16 "d"
#define PRIdFAST32 "d"
#define PRIdFAST64 "I64d"
#define PRIdMAX "I64d"
#define PRIdPTR "d"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
#define PRIi64 "I64i"
#define PRIiLEAST8 "i"
#define PRIiLEAST16 "i"
#define PRIiLEAST32 "i"
#define PRIiLEAST64 "I64i"
#define PRIiFAST8 "i"
#define PRIiFAST16 "i"
#define PRIiFAST32 "i"
#define PRIiFAST64 "I64i"
#define PRIiMAX "I64i"
#define PRIiPTR "i"
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
#define PRIo64 "I64o"
#define PRIoLEAST8 "o"
#define PRIoLEAST16 "o"
#define PRIoLEAST32 "o"
#define PRIoLEAST64 "I64o"
#define PRIoFAST8 "o"
#define PRIoFAST16 "o"
#define PRIoFAST32 "o"
#define PRIoFAST64 "I64o"
#define PRIoMAX "I64o"
#define PRIoPTR "o"
/* fprintf macros for unsigned types */
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
#define PRIu64 "I64u"
#define PRIuLEAST8 "u"
#define PRIuLEAST16 "u"
#define PRIuLEAST32 "u"
#define PRIuLEAST64 "I64u"
#define PRIuFAST8 "u"
#define PRIuFAST16 "u"
#define PRIuFAST32 "u"
#define PRIuFAST64 "I64u"
#define PRIuMAX "I64u"
#define PRIuPTR "u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
#define PRIx64 "I64x"
#define PRIxLEAST8 "x"
#define PRIxLEAST16 "x"
#define PRIxLEAST32 "x"
#define PRIxLEAST64 "I64x"
#define PRIxFAST8 "x"
#define PRIxFAST16 "x"
#define PRIxFAST32 "x"
#define PRIxFAST64 "I64x"
#define PRIxMAX "I64x"
#define PRIxPTR "x"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
#define PRIX64 "I64X"
#define PRIXLEAST8 "X"
#define PRIXLEAST16 "X"
#define PRIXLEAST32 "X"
#define PRIXLEAST64 "I64X"
#define PRIXFAST8 "X"
#define PRIXFAST16 "X"
#define PRIXFAST32 "X"
#define PRIXFAST64 "I64X"
#define PRIXMAX "I64X"
#define PRIXPTR "X"
/*
* fscanf macros for signed int types
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
* no length identifiers
*/
#define SCNd16 "hd"
#define SCNd32 "d"
#define SCNd64 "I64d"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
#define SCNdLEAST64 "I64d"
#define SCNdFAST16 "hd"
#define SCNdFAST32 "d"
#define SCNdFAST64 "I64d"
#define SCNdMAX "I64d"
#define SCNdPTR "d"
#define SCNi16 "hi"
#define SCNi32 "i"
#define SCNi64 "I64i"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
#define SCNiLEAST64 "I64i"
#define SCNiFAST16 "hi"
#define SCNiFAST32 "i"
#define SCNiFAST64 "I64i"
#define SCNiMAX "I64i"
#define SCNiPTR "i"
#define SCNo16 "ho"
#define SCNo32 "o"
#define SCNo64 "I64o"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
#define SCNoLEAST64 "I64o"
#define SCNoFAST16 "ho"
#define SCNoFAST32 "o"
#define SCNoFAST64 "I64o"
#define SCNoMAX "I64o"
#define SCNoPTR "o"
#define SCNx16 "hx"
#define SCNx32 "x"
#define SCNx64 "I64x"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
#define SCNxLEAST64 "I64x"
#define SCNxFAST16 "hx"
#define SCNxFAST32 "x"
#define SCNxFAST64 "I64x"
#define SCNxMAX "I64x"
#define SCNxPTR "x"
/* fscanf macros for unsigned int types */
#define SCNu16 "hu"
#define SCNu32 "u"
#define SCNu64 "I64u"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
#define SCNuLEAST64 "I64u"
#define SCNuFAST16 "hu"
#define SCNuFAST32 "u"
#define SCNuFAST64 "I64u"
#define SCNuMAX "I64u"
#define SCNuPTR "u"
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/*
* no length modifier for char types prior to C9x
* MS runtime scanf appears to treat "hh" as "h"
*/
/* signed char */
#define SCNd8 "hhd"
#define SCNdLEAST8 "hhd"
#define SCNdFAST8 "hhd"
#define SCNi8 "hhi"
#define SCNiLEAST8 "hhi"
#define SCNiFAST8 "hhi"
#define SCNo8 "hho"
#define SCNoLEAST8 "hho"
#define SCNoFAST8 "hho"
#define SCNx8 "hhx"
#define SCNxLEAST8 "hhx"
#define SCNxFAST8 "hhx"
/* unsigned char */
#define SCNu8 "hhu"
#define SCNuLEAST8 "hhu"
#define SCNuFAST8 "hhu"
#endif /* __STDC_VERSION__ >= 199901 */
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
extern __inline__ intmax_t imaxabs (intmax_t j)
{return (j >= 0 ? j : -j);}
imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
/* 7.8.2 Conversion functions for greatest-width integer types */
intmax_t strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
uintmax_t strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base);
intmax_t wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
int base);
uintmax_t wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr,
int base);
#ifdef __cplusplus
}
#endif
#endif /* ndef _INTTYPES_H */
Index: _mingw.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/_mingw.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** _mingw.h 20 May 2002 19:16:45 -0000 1.6
--- _mingw.h 14 Jun 2002 15:12:54 -0000 1.7
***************
*** 49,55 ****
#else /* __GNUC__ */
# ifdef __declspec
! /* note the extern at the end. This is needed to work around GCC's
limitations in handling dllimport attribute. */
! # define __MINGW_IMPORT __attribute__((dllimport)) extern
# define __DECLSPEC_SUPPORTED
# else
--- 49,55 ----
#else /* __GNUC__ */
# ifdef __declspec
! /* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
! # define __MINGW_IMPORT extern __attribute__((dllimport))
# define __DECLSPEC_SUPPORTED
# else
***************
*** 61,67 ****
#endif /* __GNUC__ */
! #define __MINGW32_VERSION 1.4
! #define __MINGW32_MAJOR_VERSION 1
! #define __MINGW32_MINOR_VERSION 4
#endif /* __MINGW_H */
--- 61,67 ----
#endif /* __GNUC__ */
! #define __MINGW32_VERSION 2.0
! #define __MINGW32_MAJOR_VERSION 2
! #define __MINGW32_MINOR_VERSION 0
#endif /* __MINGW_H */
Index: ctype.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/ctype.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ctype.h 29 Nov 2001 04:26:33 -0000 1.4
--- ctype.h 14 Jun 2002 15:12:54 -0000 1.5
***************
*** 96,115 ****
/* Also defined in stdlib.h */
#ifndef MB_CUR_MAX
# 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 */
#endif /* MB_CUR_MAX */
__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
/*
--- 96,140 ----
/* 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 */
/*
Index: dirent.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/dirent.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dirent.h 29 Nov 2001 04:26:33 -0000 1.3
--- dirent.h 14 Jun 2002 15:12:54 -0000 1.4
***************
*** 51,54 ****
--- 51,55 ----
* 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
***************
*** 71,75 ****
* positive = 0 based index of next entry
*/
! short dd_stat;
/* given path for dir with search pattern (struct is extended) */
--- 72,76 ----
* positive = 0 based index of next entry
*/
! int dd_stat;
/* given path for dir with search pattern (struct is extended) */
***************
*** 77,81 ****
} DIR;
-
DIR* opendir (const char*);
struct dirent* readdir (DIR*);
--- 78,81 ----
***************
*** 84,87 ****
--- 84,138 ----
long telldir (DIR*);
void 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; /* File name. */
+ /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
+ };
+
+ /*
+ * 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* _wopendir (const wchar_t*);
+ struct _wdirent* _wreaddir (_WDIR*);
+ int _wclosedir (_WDIR*);
+ void _wrewinddir (_WDIR*);
+ long _wtelldir (_WDIR*);
+ void _wseekdir (_WDIR*, long);
+
#ifdef __cplusplus
Index: dos.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/dos.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dos.h 29 Nov 2001 04:26:33 -0000 1.3
--- dos.h 14 Jun 2002 15:12:54 -0000 1.4
***************
*** 49,65 ****
#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 */
--- 49,65 ----
#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 */
Index: fcntl.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/fcntl.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fcntl.h 29 Nov 2001 04:26:33 -0000 1.3
--- fcntl.h 14 Jun 2002 15:12:54 -0000 1.4
***************
*** 94,103 ****
#ifdef __MSVCRT__
! extern unsigned int* __imp__fmode;
! #define _fmode (*__imp__fmode)
#else
/* CRTDLL */
! extern unsigned int* __imp__fmode_dll;
! #define _fmode (*__imp__fmode_dll)
#endif
--- 94,103 ----
#ifdef __MSVCRT__
! extern unsigned int* _imp___fmode;
! #define _fmode (*_imp___fmode)
#else
/* CRTDLL */
! extern unsigned int* _imp___fmode_dll;
! #define _fmode (*_imp___fmode_dll)
#endif
Index: float.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/float.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** float.h 2 Dec 2001 09:14:06 -0000 1.7
--- float.h 14 Jun 2002 15:12:54 -0000 1.8
***************
*** 7,15 ****
* point controller.
*
! * NOTE: GCC provides float.h, and it is probably more accurate than this,
! * but it doesn't include the non-standard stuff for accessing the
! * fp controller. (TODO: Move those bits elsewhere?) Thus it is
! * probably not a good idea to use the GCC supplied version instead
! * of this header.
*
* This file is part of the Mingw32 package.
--- 7,14 ----
* point controller.
*
! * NOTE: GCC provides float.h, but it doesn't include the non-standard
! * stuff for accessing the fp controller. We include_next the
! * GCC-supplied header and just define the MS-specific extensions
! * here.
*
* This file is part of the Mingw32 package.
***************
*** 34,110 ****
*/
! #ifndef _FLOAT_H_
! #define _FLOAT_H_
/* All the headers include this file. */
#include <_mingw.h>
! #define FLT_ROUNDS 1
! #define FLT_GUARD 1
! #define FLT_NORMALIZE 1
!
! /*
! * The characteristics of float.
! */
!
! /* The radix for floating point representation. */
! #define FLT_RADIX 2
!
! /* Decimal digits of precision. */
! #define FLT_DIG 6
!
! /* Smallest number such that 1+x != 1 */
! #define FLT_EPSILON 1.19209290e-07F
!
! /* The number of base FLT_RADIX digits in the mantissa. */
! #define FLT_MANT_DIG 24
!
! /* The maximum floating point number. */
! #define FLT_MAX 3.40282347e+38F
!
! /* Maximum n such that FLT_RADIX^n - 1 is representable. */
! #define FLT_MAX_EXP 128
!
! /* Maximum n such that 10^n is representable. */
! #define FLT_MAX_10_EXP 38
!
! /* Minimum normalized floating-point number. */
! #define FLT_MIN 1.17549435e-38F
!
! /* Minimum n such that FLT_RADIX^n is a normalized number. */
! #define FLT_MIN_EXP (-125)
!
! /* Minimum n such that 10^n is a normalized number. */
! #define FLT_MIN_10_EXP (-37)
!
!
! /*
! * The characteristics of double.
! */
! #define DBL_DIG 15
! #define DBL_EPSILON 1.1102230246251568e-16
! #define DBL_MANT_DIG 53
! #define DBL_MAX 1.7976931348623157e+308
! #define DBL_MAX_EXP 1024
! #define DBL_MAX_10_EXP 308
! #define DBL_MIN 2.2250738585072014e-308
! #define DBL_MIN_EXP (-1021)
! #define DBL_MIN_10_EXP (-307)
!
!
! /*
! * The characteristics of long double.
! * NOTE: long double is the same as double.
! */
! #define LDBL_DIG 15
! #define LDBL_EPSILON 1.1102230246251568e-16L
! #define LDBL_MANT_DIG 53
! #define LDBL_MAX 1.7976931348623157e+308L
! #define LDBL_MAX_EXP 1024
! #define LDBL_MAX_10_EXP 308
! #define LDBL_MIN 2.2250738585072014e-308L
! #define LDBL_MIN_EXP (-1021)
! #define LDBL_MIN_10_EXP (-307)
!
/*
--- 33,43 ----
*/
! #ifndef _MINGW_FLOAT_H_
! #define _MINGW_FLOAT_H_
/* All the headers include this file. */
#include <_mingw.h>
! #include_next<float.h>
/*
***************
*** 192,196 ****
#define _status87 _statusfp
! void _fpreset (void); /* Reset the FPU */
void fpreset (void);
--- 125,139 ----
#define _status87 _statusfp
!
! /*
! MSVCRT.dll _fpreset initializes the control register to 0x27f,
! the status register to zero and the tag word to 0FFFFh.
! This differs from asm instruction finit/fninit which set control
! word to 0x37f (64 bit mantissa precison rather than 53 bit).
! By default, the mingw version of _fpreset sets fp control as
! per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
! building your application.
! */
! void _fpreset (void);
void fpreset (void);
***************
*** 200,204 ****
/*
! * IEEE recommended functions
*/
--- 143,148 ----
/*
! * IEEE recommended functions. MS puts them in float.h
! * but they really belong in math.h.
*/
Index: math.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/math.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** math.h 9 Apr 2002 21:06:38 -0000 1.7
--- math.h 14 Jun 2002 15:12:54 -0000 1.8
***************
*** 65,68 ****
--- 65,69 ----
#ifndef __MINGW_FPCLASS_DEFINED
#define __MINGW_FPCLASS_DEFINED 1
+ /* IEEE 754 classication */
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
***************
*** 98,107 ****
#ifdef __MSVCRT__
! extern double* __imp__HUGE;
! #define HUGE_VAL (*__imp__HUGE)
#else
/* CRTDLL */
! extern double* __imp__HUGE_dll;
! #define HUGE_VAL (*__imp__HUGE_dll)
#endif
--- 99,108 ----
#ifdef __MSVCRT__
! extern double* _imp___HUGE;
! #define HUGE_VAL (*_imp___HUGE)
#else
/* CRTDLL */
! extern double* _imp___HUGE_dll;
! #define HUGE_VAL (*_imp___HUGE_dll)
#endif
***************
*** 152,156 ****
double fmod (double, double);
-
#ifndef __STRICT_ANSI__
--- 153,156 ----
***************
*** 191,200 ****
/* END FLOAT.H COPY */
! #ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions. These reside in
! * liboldnames.a. Provided for extra portability.
*/
double cabs (struct _complex);
double hypot (double, double);
--- 191,203 ----
/* END FLOAT.H COPY */
! #if !defined (_NO_OLDNAMES) \
! || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
/*
* Non-underscored versions of non-ANSI functions. These reside in
! * liboldnames.a. They are now also ISO C99 standand names.
! * Provided for extra portability.
*/
+
double cabs (struct _complex);
double hypot (double, double);
***************
*** 213,218 ****
--- 216,484 ----
}
#endif
+ #endif /* Not RC_INVOKED */
+
+
+ #ifndef __NO_ISOCEXT
+ #ifndef RC_INVOKED
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+ #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined __STRICT_ANSI__
+
+ #define INFINITY HUGE_VAL
+ #define NAN (0.0F/0.0F)
+
+ /*
+ Return values for fpclassify.
+ These are based on Intel x87 fpu condition codes
+ in the high byte of status word and differ from
+ the return values for MS IEEE 754 extension _fpclass()
+ */
+ #define FP_NAN 0x0100
+ #define FP_NORMAL 0x0400
+ #define FP_INFINITE (FP_NAN | FP_NORMAL)
+ #define FP_ZERO 0x4000
+ #define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
+ /* 0x0200 is signbit mask */
+
+
+ /* Return a NaN */
+ double nan(const char *tagp);
+ float nanf(const char *tagp);
+ long double nanl(const char *tagp);
+
+ #ifndef __STRICT_ANSI__
+ #define nan() nan("")
+ #define nanf() nanf("")
+ #define nanl() nanl("")
+ #endif
+
+ /*
+ We can't inline float or double, because we want to ensure truncation
+ to semantic type before classification.
+ (A normal long double value might become subnormal when
+ converted to double, and zero when converted to float.)
+ */
+
+ extern int __fpclassifyf (float);
+ extern int __fpclassify (double);
+
+ extern __inline__ int __fpclassifyl (long double x){
+ unsigned short sw;
+ __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
+ return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
+ }
+
+ #define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
+ : sizeof (x) == sizeof (double) ? __fpclassify (x) \
+ : __fpclassifyl (x))
+
+ /* We don't need to worry about trucation here:
+ A NaN stays a NaN. */
+ extern __inline__ int __isnan (double _x)
+ {
+ unsigned short sw;
+ __asm__ ("fxam;"
+ "fstsw %%ax": "=a" (sw) : "t" (_x));
+ return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
+ == FP_NAN;
+ }
+
+ extern __inline__ int __isnanf (float _x)
+ {
+ unsigned short sw;
+ __asm__ ("fxam;"
+ "fstsw %%ax": "=a" (sw) : "t" (_x));
+ return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
+ == FP_NAN;
+ }
+
+ extern __inline__ int __isnanl (long double _x)
+ {
+ unsigned short sw;
+ __asm__ ("fxam;"
+ "fstsw %%ax": "=a" (sw) : "t" (_x));
+ return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
+ == FP_NAN;
+ }
+
+ #define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \
+ : sizeof (x) == sizeof (double) ? __isnan (x) \
+ : __isnanl (x))
+
+ #define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
+ #define isinf(x) (fpclassify(x) == FP_INFINITE)
+ #define isnormal(x) (fpclassify(x) == FP_NORMAL)
+
+
+ extern __inline__ int __signbit (double x) {
+ unsigned short stw;
+ __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
+ return stw & 0x0200;
+ }
+
+ extern __inline__ int __signbitf (float x) {
+ unsigned short stw;
+ __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
+ return stw & 0x0200;
+ }
+ extern __inline__ int __signbitl (long double x) {
+ unsigned short stw;
+ __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
+ return stw & 0x0200;
+ }
+
+
+ #define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
+ : sizeof (x) == sizeof (double) ? __signbit (x) \
+ : __signbitl (x))
+
+ /*
+ * With these functions, comparisons involving quiet NaNs set the FP
+ * condition code to "unordered". The IEEE floating-point spec
+ * dictates that the result of floating-point comparisons should be
+ * false whenever a NaN is involved, with the exception of the !=,
+ * which always returns true: yes, (NaN != NaN) is true).
+ */
+
+ #if __GNUC__ >= 3
+
+ #define isgreater(x, y) __builtin_isgreater(x, y)
+ #define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+ #define isless(x, y) __builtin_isless(x, y)
+ #define islessequal(x, y) __builtin_islessequal(x, y)
+ #define islessgreater(x, y) __builtin_islessgreater(x, y)
+ #define isunordered(x, y) __builtin_isunordered(x, y)
+
+ #else
+ /* helper */
+ extern __inline__ int
+ __fp_unordered_compare (long double x, long double y){
+ unsigned short retval;
+ __asm__ ("fucom %%st(1);"
+ "fnstsw;": "=a" (retval) : "t" (x), "u" (y));
+ return retval;
+ }
+
+ #define isgreater(x, y) ((__fp_unordered_compare(x, y) \
+ & 0x4500) == 0)
+ #define isless(x, y) ((__fp_unordered_compare (y, x) \
+ & 0x4500) == 0)
+ #define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
+ & FP_INFINITE) == 0)
+ #define islessequal(x, y) ((__fp_unordered_compare(y, x) \
+ & FP_INFINITE) == 0)
+ #define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
+ & FP_SUBNORMAL) == 0)
+ #define isunordered(x, y) ((__fp_unordered_compare(x, y) \
+ & 0x4500) == 0x4500)
+
+ #endif
+
+ /* round, using fpu control word settings */
+ extern __inline__ double rint (double x)
+ {
+ double retval;
+ __asm__ ("frndint;": "=t" (retval) : "0" (x));
+ return retval;
+ }
+
+ extern __inline__ float rintf (float x)
+ {
+ float retval;
+ __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
+ return retval;
+ }
+
+ extern __inline__ long double rintl (long double x)
+ {
+ long double retval;
+ __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
+ return retval;
+ }
+
+ /* round away from zero, regardless of fpu control word settings */
+ extern double round (double);
+ extern float roundf (float);
+ extern long double roundl (long double);
+
+
+ /* round towards zero, regardless of fpu control word settings */
+ extern double trunc (double);
+ extern float truncf (float);
+ extern long double truncl (long double);
+
+
+ /* fmax and fmin.
+ NaN arguments are treated as missing data: if one argument is a NaN
+ and the other numeric, then these functions choose the numeric
+ value. */
+
+ extern double fmax (double, double);
+ extern float fmaxf (float, float);
+ extern long double fmaxl (long double, long double);
+
+ extern double fmin (double, double);
+ extern float fminf (float, float);
+ extern long double fminl (long double, long double);
+
+ /* return x * y + z as a ternary op */
+ extern double fma (double, double, double);
+ extern float fmaf (float, float, float);
+ extern long double fmal (long double, long double, long double);
+
+ /* x > y ? (x - y) : 0.0 */
+ extern double fdim (double, double);
+ extern float fdimf (float, float);
+ extern long double fdiml (long double, long double);
+
+ /* one lonely transcendental */
+ extern double log2 (double _x);
+ extern float log2f (float _x);
+ extern long double log2l (long double _x);
+ #endif /* __STDC_VERSION__ >= 199901L */
+
+
+ /* The underscored versions for double are in MSVCRT.dll.
+ The stubs for float and double versions are in libmingwex.a */
+ double copysign (double, double);
+ float copysignf (float, float);
+ long double copysignl (long double, long double);
+
+ double logb (double);
+ float logbf (float);
+ double nextafter (double, double);
+ float nextafterf (float, float);
+ double scalb (double, long);
+ float scalbf (float, long);
+
+ #if !defined (__STRICT_ANSI__) /* inline using non-ANSI functions */
+ extern __inline__ double copysign (double x, double y)
+ { return _copysign(x, y); }
+ extern __inline__ float copysignf (float x, float y)
+ { return _copysign(x, y); }
+ extern __inline__ double logb (double x)
+ { return _logb(x); }
+ extern __inline__ float logbf (float x)
+ { return _logb(x); }
+ extern __inline__ double nextafter(double x, double y)
+ { return _nextafter(x, y); }
+ extern __inline__ float nextafterf(float x, float y)
+ { return _nextafter(x, y); }
+ extern __inline__ double scalb (double x, long i)
+ { return _scalb (x, i); }
+ extern __inline__ float scalbf (float x, long i)
+ { return _scalb(x, i); }
+ #endif /* (__STRICT_ANSI__) */
+
+ #ifdef __cplusplus
+ }
+ #endif
#endif /* Not RC_INVOKED */
+
+ #endif /* __NO_ISOCEXT */
#endif /* Not _MATH_H_ */
Index: stdarg.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/stdarg.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** stdarg.h 29 Nov 2001 04:26:33 -0000 1.4
--- stdarg.h 14 Jun 2002 15:12:54 -0000 1.5
***************
*** 1,112 ****
/*
! * stdarg.h
! *
! * Provides facilities for stepping through a list of function arguments of
! * an unknown number and type.
! *
! * NOTE: Gcc should provide stdarg.h, and I believe their version will work
! * with crtdll. If necessary I think you can replace this with the GCC
! * stdarg.h.
! *
! * Note that the type used in va_arg is supposed to match the actual type
! * *after default promotions*. Thus, va_arg (..., short) is not valid.
! *
! * This file is part of the Mingw32 package.
! *
! * Contributors:
! * Created by Colin Peters <co...@bi...>
! *
! * 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.
! *
! * $Revision$
! * $Author$
! * $Date$
! *
! */
!
! #ifndef _STDARG_H_
! #define _STDARG_H_
!
! /* All the headers include this file. */
! #include <_mingw.h>
!
! /*
! * Don't do any of this stuff for the resource compiler.
*/
#ifndef RC_INVOKED
!
! /*
! * I was told that Win NT likes this.
! */
! #ifndef _VA_LIST_DEFINED
! #define _VA_LIST_DEFINED
! #endif
!
! #ifndef _VA_LIST
! #define _VA_LIST
! #if defined __GNUC__ && __GNUC__ >= 3
! typedef __builtin_va_list va_list;
! #else
! typedef char* va_list;
! #endif
! #endif
!
! /*
! * Amount of space required in an argument list (ie. the stack) for an
! * argument of type t.
! */
! #define __va_argsiz(t) \
! (((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
!
!
! /*
! * Start variable argument list processing by setting AP to point to the
! * argument after pN.
! */
! #ifdef __GNUC__
! /*
! * In GNU the stack is not necessarily arranged very neatly in order to
! * pack shorts and such into a smaller argument list. Fortunately a
! * neatly arranged version is available through the use of __builtin_next_arg.
! */
! #define va_start(ap, pN) \
! ((ap) = ((va_list) __builtin_next_arg(pN)))
! #else
! /*
! * For a simple minded compiler this should work (it works in GNU too for
! * vararg lists that don't follow shorts and such).
! */
! #define va_start(ap, pN) \
! ((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
#endif
-
-
- /*
- * End processing of variable argument list. In this case we do nothing.
- */
- #define va_end(ap) ((void)0)
-
-
- /*
- * Increment ap to the next argument in the list while returing a
- * pointer to what ap pointed to first, which is of type t.
- *
- * We cast to void* and then to t* because this avoids a warning about
- * increasing the alignment requirement.
- */
-
- #define va_arg(ap, t) \
- (((ap) = (ap) + __va_argsiz(t)), \
- *((t*) (void*) ((ap) - __va_argsiz(t))))
-
- #endif /* Not RC_INVOKED */
-
- #endif /* not _STDARG_H_ */
--- 1,7 ----
/*
! * This is just an RC_INVOKED guard for the real stdarg.h
! * fixincluded in gcc system dir. One day we will delete this file.
*/
#ifndef RC_INVOKED
! #include_next<stdarg.h>
#endif
Index: stddef.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/stddef.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** stddef.h 29 Nov 2001 04:26:33 -0000 1.2
--- stddef.h 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 1,373 ****
/*
! * stddef.h
! *
! * Standard type definitions provided by the C library.
! *
! * NOTE: This is typically supplied by GCC, but there's a small gotcha -
! * GCC's version doesn't guard typedefs via RC_INVOKED. This is
! * GCC's version, with the guard macro. Since we install this in
! * the tool include directory, it gets picked up before GCC's
! * internal include directory, and we're safe.
! *
! * This file is part of the Mingw32 package.
! *
! * Contributors:
! * Created by Colin Peters <co...@bi...>
! *
! * 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.
! *
*/
-
- #if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
- && !defined(__STDDEF_H__)) \
- || defined(__need_wchar_t) || defined(__need_size_t) \
- || defined(__need_ptrdiff_t) || defined(__need_NULL) \
- || defined(__need_wint_t)
-
- /* Any one of these symbols __need_* means that GNU libc
- wants us just to define one data type. So don't define
- the symbols that indicate this file's entire job has been done. */
- #if (!defined(__need_wchar_t) && !defined(__need_size_t) \
- && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
- && !defined(__need_wint_t))
- #define _STDDEF_H
- #define _STDDEF_H_
- /* sn...@ne... says the NeXT needs this. */
- #define _ANSI_STDDEF_H
- /* Irix 5.1 needs this. */
- #define __STDDEF_H__
- #endif
-
#ifndef RC_INVOKED
!
! #ifndef __sys_stdtypes_h
! /* This avoids lossage on SunOS but only if stdtypes.h comes first.
! There's no way to win with the other order! Sun lossage. */
!
! /* On 4.3bsd-net2, make sure ansi.h is included, so we have
! one less case to deal with in the following. */
! #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
! #include <machine/ansi.h>
! #endif
!
! /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
! defined if the corresponding type is *not* defined.
! FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */
! #if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
! #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
! #define _SIZE_T
! #endif
! #if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
! #define _PTRDIFF_T
! #endif
! /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
! instead of _WCHAR_T_. */
! #if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
! #ifndef _BSD_WCHAR_T_
! #define _WCHAR_T
! #endif
! #endif
! /* Undef _FOO_T_ if we are supposed to define foo_t. */
! #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
! #undef _PTRDIFF_T_
! #undef _BSD_PTRDIFF_T_
! #endif
! #if defined (__need_size_t) || defined (_STDDEF_H_)
! #undef _SIZE_T_
! #undef _BSD_SIZE_T_
! #endif
! #if defined (__need_wchar_t) || defined (_STDDEF_H_)
! #undef _WCHAR_T_
! #undef _BSD_WCHAR_T_
! #endif
! #endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
!
! /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
! Just ignore it. */
! #if defined (__sequent__) && defined (_PTRDIFF_T_)
! #undef _PTRDIFF_T_
! #endif
!
! /* On VxWorks, <type/vxTypesBase.h> may have defined macros like
! _TYPE_size_t which will typedef size_t. fixincludes patched the
! vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
! not defined, and so that defining this macro defines _GCC_SIZE_T.
! If we find that the macros are still defined at this point, we must
! invoke them so that the type is defined as expected. */
! #if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
! _TYPE_ptrdiff_t;
! #undef _TYPE_ptrdiff_t
! #endif
! #if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
! _TYPE_size_t;
! #undef _TYPE_size_t
! #endif
! #if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
! _TYPE_wchar_t;
! #undef _TYPE_wchar_t
! #endif
!
! /* In case nobody has defined these types, but we aren't running under
! GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
! __WCHAR_TYPE__ have reasonable values. This can happen if the
! parts of GCC is compiled by an older compiler, that actually
! include gstddef.h, such as collect2. */
!
! /* Signed type of difference of two pointers. */
!
! /* Define this type if we are doing the whole job,
! or if we want this type in particular. */
! #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
! #ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
! #ifndef _T_PTRDIFF_
! #ifndef _T_PTRDIFF
! #ifndef __PTRDIFF_T
! #ifndef _PTRDIFF_T_
! #ifndef _BSD_PTRDIFF_T_
! #ifndef ___int_ptrdiff_t_h
! #ifndef _GCC_PTRDIFF_T
! #define _PTRDIFF_T
! #define _T_PTRDIFF_
! #define _T_PTRDIFF
! #define __PTRDIFF_T
! #define _PTRDIFF_T_
! #define _BSD_PTRDIFF_T_
! #define ___int_ptrdiff_t_h
! #define _GCC_PTRDIFF_T
! #ifndef __PTRDIFF_TYPE__
! #define __PTRDIFF_TYPE__ long int
! #endif
! typedef __PTRDIFF_TYPE__ ptrdiff_t;
! #endif /* _GCC_PTRDIFF_T */
! #endif /* ___int_ptrdiff_t_h */
! #endif /* _BSD_PTRDIFF_T_ */
! #endif /* _PTRDIFF_T_ */
! #endif /* __PTRDIFF_T */
! #endif /* _T_PTRDIFF */
! #endif /* _T_PTRDIFF_ */
! #endif /* _PTRDIFF_T */
!
! /* If this symbol has done its job, get rid of it. */
! #undef __need_ptrdiff_t
!
! #endif /* _STDDEF_H or __need_ptrdiff_t. */
!
! /* Unsigned type of `sizeof' something. */
!
! /* Define this type if we are doing the whole job,
! or if we want this type in particular. */
! #if defined (_STDDEF_H) || defined (__need_size_t)
! #ifndef __size_t__ /* BeOS */
! #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
! #ifndef _SYS_SIZE_T_H
! #ifndef _T_SIZE_
! #ifndef _T_SIZE
! #ifndef __SIZE_T
! #ifndef _SIZE_T_
! #ifndef _BSD_SIZE_T_
! #ifndef _SIZE_T_DEFINED_
! #ifndef _SIZE_T_DEFINED
! #ifndef ___int_size_t_h
! #ifndef _GCC_SIZE_T
! #ifndef _SIZET_
! #ifndef __size_t
! #define __size_t__ /* BeOS */
! #define _SIZE_T
! #define _SYS_SIZE_T_H
! #define _T_SIZE_
! #define _T_SIZE
! #define __SIZE_T
! #define _SIZE_T_
! #define _BSD_SIZE_T_
! #define _SIZE_T_DEFINED_
! #define _SIZE_T_DEFINED
! #define ___int_size_t_h
! #define _GCC_SIZE_T
! #define _SIZET_
! #define __size_t
! #ifndef __SIZE_TYPE__
! #define __SIZE_TYPE__ long unsigned int
! #endif
! #if !(defined (__GNUG__) && defined (size_t))
! typedef __SIZE_TYPE__ size_t;
! #ifdef __BEOS__
! typedef long ssize_t;
! #endif /* __BEOS__ */
! #endif /* !(defined (__GNUG__) && defined (size_t)) */
! #endif /* __size_t */
! #endif /* _SIZET_ */
! #endif /* _GCC_SIZE_T */
! #endif /* ___int_size_t_h */
! #endif /* _SIZE_T_DEFINED */
! #endif /* _SIZE_T_DEFINED_ */
! #endif /* _BSD_SIZE_T_ */
! #endif /* _SIZE_T_ */
! #endif /* __SIZE_T */
! #endif /* _T_SIZE */
! #endif /* _T_SIZE_ */
! #endif /* _SYS_SIZE_T_H */
! #endif /* _SIZE_T */
! #endif /* __size_t__ */
! #undef __need_size_t
! #endif /* _STDDEF_H or __need_size_t. */
!
! /* Wide character type.
! Locale-writers should change this as necessary to
! be big enough to hold unique values not between 0 and 127,
! and not (wchar_t) -1, for each defined multibyte character. */
!
! /* Define this type if we are doing the whole job,
! or if we want this type in particular. */
! #if defined (_STDDEF_H) || defined (__need_wchar_t)
! #ifndef __wchar_t__ /* BeOS */
! #ifndef _WCHAR_T
! #ifndef _T_WCHAR_
! #ifndef _T_WCHAR
! #ifndef __WCHAR_T
! #ifndef _WCHAR_T_
! #ifndef _BSD_WCHAR_T_
! #ifndef _WCHAR_T_DEFINED_
! #ifndef _WCHAR_T_DEFINED
! #ifndef _WCHAR_T_H
! #ifndef ___int_wchar_t_h
! #ifndef __INT_WCHAR_T_H
! #ifndef _GCC_WCHAR_T
! #define __wchar_t__ /* BeOS */
! #define _WCHAR_T
! #define _T_WCHAR_
! #define _T_WCHAR
! #define __WCHAR_T
! #define _WCHAR_T_
! #define _BSD_WCHAR_T_
! #define _WCHAR_T_DEFINED_
! #define _WCHAR_T_DEFINED
! #define _WCHAR_T_H
! #define ___int_wchar_t_h
! #define __INT_WCHAR_T_H
! #define _GCC_WCHAR_T
!
! /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
! instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
! symbols in the _FOO_T_ family, stays defined even after its
! corresponding type is defined). If we define wchar_t, then we
! must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
! we undef _WCHAR_T_, then we must also define rune_t, since
! headers like runetype.h assume that if machine/ansi.h is included,
! and _BSD_WCHAR_T_ is not defined, then rune_t is available.
! machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
! the same type." */
! #ifdef _BSD_WCHAR_T_
! #undef _BSD_WCHAR_T_
! #ifdef _BSD_RUNE_T_
! #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
! typedef _BSD_RUNE_T_ rune_t;
! #endif
! #endif
! #endif
!
! #ifndef __WCHAR_TYPE__
! #ifdef __BEOS__
! #define __WCHAR_TYPE__ unsigned char
! #else
! #define __WCHAR_TYPE__ int
! #endif
! #endif
! #ifndef __cplusplus
! typedef __WCHAR_TYPE__ wchar_t;
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif
! #endif /* __wchar_t__ */
! #undef __need_wchar_t
! #endif /* _STDDEF_H or __need_wchar_t. */
!
! #if defined (_STDDEF_H) || defined (__need_wint_t)
! #ifndef _WINT_T
! #define _WINT_T
!
! #ifndef __WINT_TYPE__
! #define __WINT_TYPE__ unsigned int
! #endif
! typedef __WINT_TYPE__ wint_t;
! #endif
! #undef __need_wint_t
! #endif
!
! /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
! are already defined. */
! /* BSD/OS 3.1 requires the MACHINE_ANSI_H check here. FreeBSD 2.x apparently
! does not, even though there is a check for MACHINE_ANSI_H above. */
! #if defined(_ANSI_H_) || (defined(__bsdi__) && defined(_MACHINE_ANSI_H_))
! /* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
! are probably typos and should be removed before 2.8 is released. */
! #ifdef _GCC_PTRDIFF_T_
! #undef _PTRDIFF_T_
! #undef _BSD_PTRDIFF_T_
! #endif
! #ifdef _GCC_SIZE_T_
! #undef _SIZE_T_
! #undef _BSD_SIZE_T_
! #endif
! #ifdef _GCC_WCHAR_T_
! #undef _WCHAR_T_
! #undef _BSD_WCHAR_T_
! #endif
! /* The following ones are the real ones. */
! #ifdef _GCC_PTRDIFF_T
! #undef _PTRDIFF_T_
! #undef _BSD_PTRDIFF_T_
! #endif
! #ifdef _GCC_SIZE_T
! #undef _SIZE_T_
! #undef _BSD_SIZE_T_
! #endif
! #ifdef _GCC_WCHAR_T
! #undef _WCHAR_T_
! #undef _BSD_WCHAR_T_
#endif
- #endif /* _ANSI_H_ || ( __bsdi__ && _MACHINE_ANSI_H_ ) */
-
- #endif /* __sys_stdtypes_h */
-
- #endif /* RC_INVOKED */
-
- /* A null pointer constant. */
-
- #if defined (_STDDEF_H) || defined (__need_NULL)
- #undef NULL /* in case <stdio.h> has defined it. */
- #ifdef __GNUG__
- #define NULL __null
- #else /* G++ */
- #define NULL ((void *)0)
- #endif /* G++ */
- #endif /* NULL not defined and <stddef.h> or need NULL. */
- #undef __need_NULL
-
- #ifdef _STDDEF_H
-
- /* Offset of member MEMBER in a struct of type TYPE. */
-
- #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
- #endif /* _STDDEF_H was defined this time */
-
- #endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
- || __need_XXX was not defined before */
--- 1,7 ----
/*
! * This is just an RC_INVOKED guard for the real stddef.h
! * fixincluded in gcc system dir. One day we will delete this file.
*/
#ifndef RC_INVOKED
! #include_next<stddef.h>
#endif
Index: stdint.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/stdint.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** stdint.h 29 Nov 2001 04:26:33 -0000 1.2
--- stdint.h 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 20,23 ****
--- 20,26 ----
#ifndef _STDINT_H
#define _STDINT_H
+ #define __need_wint_t
+ #define __need_wchar_t
+ #include <stddef.h>
/* 7.18.1.1 Exact-width integer types */
***************
*** 139,147 ****
/*
! * wint_t is unsigned int in __MINGW32__,
! * but unsigned short in MS runtime
*/
#define WINT_MIN 0
! #define WINT_MAX UINT32_MAX
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
--- 142,149 ----
/*
! * wint_t is unsigned short for compatibility with MS runtime
*/
#define WINT_MIN 0
! #define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
***************
*** 182,184 ****
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
! #endif
\ No newline at end of file
--- 184,186 ----
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
! #endif
Index: stdio.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/stdio.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** stdio.h 9 Apr 2002 21:06:38 -0000 1.7
--- stdio.h 14 Jun 2002 15:12:54 -0000 1.8
***************
*** 35,44 ****
#include <_mingw.h>
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
- #ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */
--- 35,46 ----
#include <_mingw.h>
+ #ifndef RC_INVOKED
#define __need_size_t
#define __need_NULL
#define __need_wchar_t
#define __need_wint_t
#include <stddef.h>
+ #define __need___va_list
+ #include <stdarg.h>
#endif /* Not RC_INVOKED */
***************
*** 123,139 ****
#ifndef RC_INVOKED
! /*
! * I used to include stdarg.h at this point, in order to allow for the
! * functions later on in the file which use va_list. That conflicts with
! * using stdio.h and varargs.h in the same file, so I do the typedef myself.
! */
! #ifndef _VA_LIST
! #define _VA_LIST
! #if defined __GNUC__ && __GNUC__ >= 3
! typedef __builtin_va_list va_list;
#else
! typedef char* va_list;
! #endif
#endif
/*
* The structure underlying the FILE type.
--- 125,134 ----
#ifndef RC_INVOKED
! #ifdef __GNUC__
! #define __VALIST __gnuc_va_list
#else
! #define __VALIST char*
#endif
+
/*
* The structure underlying the FILE type.
***************
*** 164,170 ****
#ifndef __DECLSPEC_SUPPORTED
! extern FILE (*__imp__iob)[]; /* A pointer to an array of FILE */
! #define _iob (*__imp__iob) /* An array of FILE */
#else /* __DECLSPEC_SUPPORTED */
--- 159,165 ----
#ifndef __DECLSPEC_SUPPORTED
! extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
! #define _iob (*_imp___iob) /* An array of FILE */
#else /* __DECLSPEC_SUPPORTED */
***************
*** 212,220 ****
int sprintf (char*, const char*, ...);
int _snprintf (char*, size_t, const char*, ...);
! int vfprintf (FILE*, const char*, va_list);
! int vprintf (const char*, va_list);
! int vsprintf (char*, const char*, va_list);
! int _vsnprintf (char*, size_t, const char*, va_list);
/*
--- 207,221 ----
int sprintf (char*, const char*, ...);
int _snprintf (char*, size_t, const char*, ...);
! int vfprintf (FILE*, const char*, __VALIST);
! int vprintf (const char*, __VALIST);
! int vsprintf (char*, const char*, __VALIST);
! int _vsnprintf (char*, size_t, const char*, __VALIST);
+ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
+ int snprintf(char* s, size_t n, const char* format, ...);
+ extern __inline__ int vsnprintf (char* s, size_t n, const char* format,
+ __VALIST arg)
+ { return _vsnprintf ( s, n, format, arg); }
+ #endif
/*
***************
*** 256,259 ****
--- 257,272 ----
void rewind (FILE*);
+ #ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
+ /*
+ * Workaround for limitations on win9x where a file contents are
+ * not zero'd out if you seek past the end and then write.
+ */
+
+ int __mingw_fseek (FILE *, long, int);
+ int __mingw_fwrite (const void*, size_t, size_t, FILE*);
+ #define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
+ #define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
+ #endif /* __USE_MINGW_FSEEK */
+
/*
* An opaque data type used for storing file positions... The contents of
***************
*** 322,329 ****
int swprintf (wchar_t*, const wchar_t*, ...);
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
! int vfwprintf (FILE*, const wchar_t*, va_list);
! int vwprintf (const wchar_t*, va_list);
! int vswprintf (wchar_t*, const wchar_t*, va_list);
! int _vsnwprintf (wchar_t*, size_t, const wchar_t*, va_list);
int fwscanf (FILE*, const wchar_t*, ...);
int wscanf (const wchar_t*, ...);
--- 335,342 ----
int swprintf (wchar_t*, const wchar_t*, ...);
int _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
! int vfwprintf (FILE*, const wchar_t*, __VALIST);
! int vwprintf (const wchar_t*, __VALIST);
! int vswprintf (wchar_t*, const wchar_t*, __VALIST);
! int _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
int fwscanf (FILE*, const wchar_t*, ...);
int wscanf (const wchar_t*, ...);
***************
*** 351,354 ****
--- 364,375 ----
FILE* _wpopen (const wchar_t*, const wchar_t*);
#endif /* __MSVCRT__ */
+
+ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
+ int snwprintf(wchar_t* s, size_t n, const wchar_t* format, ...);
+ extern __inline__ int
+ vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
+ { return _vsnwprintf ( s, n, format, arg);}
+ #endif
+
#define _WSTDIO_DEFINED
#endif /* _WSTDIO_DEFINED */
Index: stdlib.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/stdlib.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** stdlib.h 16 Jan 2002 08:48:08 -0000 1.9
--- stdlib.h 14 Jun 2002 15:12:54 -0000 1.10
***************
*** 102,109 ****
#ifndef __DECLSPEC_SUPPORTED
! extern int* __imp___argc_dll;
! extern char*** __imp___argv_dll;
! #define __argc (*__imp___argc_dll)
! #define __argv (*__imp___argv_dll)
#else /* __DECLSPEC_SUPPORTED */
--- 102,109 ----
#ifndef __DECLSPEC_SUPPORTED
! extern int* _imp____argc_dll;
! extern char*** _imp____argv_dll;
! #define __argc (*_imp____argc_dll)
! #define __argv (*_imp____argv_dll)
#else /* __DECLSPEC_SUPPORTED */
***************
*** 122,135 ****
*/
#ifndef MB_CUR_MAX
# 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 */
! #endif /* MB_CUR_MAX */
/*
* MS likes to declare errno in stdlib.h as well.
--- 122,146 ----
*/
+ /* 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 */
/*
* MS likes to declare errno in stdlib.h as well.
***************
*** 157,162 ****
#else /* ! __MSVCRT__ */
# ifndef __DECLSPEC_SUPPORTED
! extern char *** __imp__environ_dll;
! # define _environ (*__imp__environ_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char ** _environ_dll;
--- 168,173 ----
#else /* ! __MSVCRT__ */
# ifndef __DECLSPEC_SUPPORTED
! extern char *** _imp___environ_dll;
! # define _environ (*_imp___environ_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char ** _environ_dll;
***************
*** 171,176 ****
#ifndef __DECLSPEC_SUPPORTED
! extern int* __imp__sys_nerr;
! # define sys_nerr (*__imp__sys_nerr)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr;
--- 182,187 ----
#ifndef __DECLSPEC_SUPPORTED
! extern int* _imp___sys_nerr;
! # define sys_nerr (*_imp___sys_nerr)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr;
***************
*** 185,190 ****
#ifndef __DECLSPEC_SUPPORTED
! extern int* __imp__sys_nerr_dll;
! # define sys_nerr (*__imp__sys_nerr_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr_dll;
--- 196,201 ----
#ifndef __DECLSPEC_SUPPORTED
! extern int* _imp___sys_nerr_dll;
! # define sys_nerr (*_imp___sys_nerr_dll)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT int _sys_nerr_dll;
***************
*** 195,200 ****
#ifndef __DECLSPEC_SUPPORTED
! extern char*** __imp__sys_errlist;
! #define sys_errlist (*__imp__sys_errlist)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _sys_errlist[];
--- 206,211 ----
#ifndef __DECLSPEC_SUPPORTED
! extern char*** _imp__sys_errlist;
! #define sys_errlist (*_imp___sys_errlist)
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _sys_errlist[];
***************
*** 263,267 ****
# ifndef __DECLSPEC_SUPPORTED
extern char** __imp__pgmptr_dll;
! # define _pgmptr (*__imp__pgmptr_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _pgmptr_dll;
--- 274,278 ----
# ifndef __DECLSPEC_SUPPORTED
extern char** __imp__pgmptr_dll;
! # define _pgmptr (*_imp___pgmptr_dll)
# else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT char* _pgmptr_dll;
***************
*** 286,295 ****
double strtod (const char*, char**);
! double wcstod (const wchar_t*, wchar_t**);
! long strtol (const char*, char**, int);
! long wcstol (const wchar_t*, wchar_t**, int);
unsigned long strtoul (const char*, char**, int);
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
size_t wcstombs (char*, const wchar_t*, size_t);
--- 297,320 ----
double strtod (const char*, char**);
! #if !defined __NO_ISOCEXT /* extern stubs in static libmingwex.a */
! extern __inline__ float strtof (const char *nptr, char **endptr)
! { return (strtod (nptr, endptr));}
! #endif /* __NO_ISOCEXT */
+ long strtol (const char*, char**, int);
unsigned long strtoul (const char*, char**, int);
+
+ #ifndef _WSTDLIB_DEFINED
+ /* also declared in wchar.h */
+ double wcstod (const wchar_t*, wchar_t**);
+ #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
+ extern __inline__ float wcstof( const wchar_t *nptr, wchar_t **endptr)
+ { return (wcstod(nptr, endptr)); }
+ #endif /* __NO_ISOCEXT */
+
+ long wcstol (const wchar_t*, wchar_t**, int);
unsigned long wcstoul (const wchar_t*, wchar_t**, int);
+ #define _WSTDLIB_DEFINED
+ #endif
size_t wcstombs (char*, const wchar_t*, size_t);
***************
*** 337,341 ****
ldiv_t ldiv (long, long);
-
#ifndef __STRICT_ANSI__
--- 362,365 ----
***************
*** 349,353 ****
void _exit (int) _ATTRIB_NORETURN;
!
/* _onexit is MS extension. Use atexit for portability. */
typedef int (* _onexit_t)(void);
--- 373,382 ----
void _exit (int) _ATTRIB_NORETURN;
! #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
! /* C99 function name */
! void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */
! extern __inline__ void _Exit(int status)
! { _exit(status); }
! #endif
/* _onexit is MS extension. Use atexit for portability. */
typedef int (* _onexit_t)(void);
***************
*** 406,409 ****
--- 435,481 ----
#endif /* Not __STRICT_ANSI__ */
+
+ /* C99 names */
+
+ #if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
+
+ typedef struct { long long quot, rem; } lldiv_t;
+
+ lldiv_t lldiv (long long, long long);
+
+ extern __inline__ long long llabs(long long _j)
+ {return (_j >= 0 ? _j : -_j);}
+
+ long long strtoll (const char* __restrict__, char** __restrict, int);
+ unsigned long long strtoull (const char* __restrict__, char** __restrict__, int);
+
+ #if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
+ long long atoll (const char *);
+
+ #if !defined (__STRICT_ANSI__)
+ long long wtoll(const wchar_t *);
+ char* lltoa(long long, char *, int);
+ char* ulltoa(unsigned long long , char *, int);
+ wchar_t* lltow(long long, wchar_t *, int);
+ wchar_t* ulltow(unsigned long long, wchar_t *, int);
+
+ /* inline using non-ansi functions */
+ extern __inline__ long long atoll (const char * _c)
+ { return _atoi64 (_c); }
+ extern __inline__ char* lltoa(long long _n, char * _c, int _i)
+ { return _i64toa (_n, _c, _i); }
+ extern __inline__ char* ulltoa(unsigned long long _n, char * _c, int _i)
+ { return _ui64toa (_n, _c, _i); }
+ extern __inline__ long long wtoll(const wchar_t * _w)
+ { return _wtoi64 (_w); }
+ extern __inline__ wchar_t* lltow(long long _n, wchar_t * _w, int _i)
+ { return _i64tow (_n, _w, _i); }
+ extern __inline__ wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
+ { return _ui64tow (_n, _w, _i); }
+ #endif /* (__STRICT_ANSI__) */
+
+ #endif /* __MSVCRT__ */
+
+ #endif /* !__NO_ISOCEXT */
/*
Index: tchar.h
===================================================================
RCS file: /cvsroot/mingw/runtime/include/tchar.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tchar.h 28 May 2002 13:06:47 -0000 1.6
--- tchar.h 14 Jun 2002 15:12:54 -0000 1.7
***************
*** 208,211 ****
--- 208,220 ----
#endif /* __MSVCRT__ */
+ /* dirent structures and functions */
+ #define _tdirent _wdirent
+ #define _TDIR _WDIR
+ #define _topendir _wopendir
+ #define _tclosedir _wclosedir
+ #define _treaddir _wreaddir
+ #define _trewinddir _wrewinddir
+ #define _ttelldir _wtelldir
+ #define _tseekdir _wseekdir
#else /* Not ...
[truncated message content] |
|
From: <ea...@us...> - 2002-06-14 15:12:57
|
Update of /cvsroot/mingw/runtime
In directory usw-pr-cvs1:/tmp/cvs-serv23887
Modified Files:
ChangeLog Makefile.in configure configure.in crt1.c crtdll.def
dllcrt1.c moldname-crtdll.def moldname-msvcrt.def
moldname.def.in msvcrt.def msvcrt20.def msvcrt40.def
Added Files:
CRT_fp10.c CRT_fp8.c
Removed Files:
dirent.c
Log Message:
Merge in mingwex branch from Cygwin
--- NEW FILE: CRT_fp10.c ---
/*
* CRT_FP10.c
*
* This defines _fpreset as asm ("fnint"). Calls to _fpreset
* will set default floating point precesion to 64-bit mantissa
* at app startup.
*
* Linking in CRT_FP10.o before libmingw.a will override the definition
* set in CRT_FP8.o.
*/
/* Override library _fpreset() with asm fninit */
void _fpreset (void)
{ __asm__ ( "fninit" ) ;}
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
--- NEW FILE: CRT_fp8.c ---
/*
* CRT_FP8.c
*
* This forces calls of _fpreset to the MSVCRT function
* exported from dll. Effectively it make default
* precison same as apps built with MSVC (53-bit mantissa).
*
* To change to 64-bit mantissa, link in CRT_FP10.o before libmingw.a.
*/
/* Link against the _fpreset visible in import lib */
extern void (*_imp___fpreset)(void) ;
void _fpreset (void)
{ (*_imp___fpreset)(); }
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/runtime/ChangeLog,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** ChangeLog 28 May 2002 13:06:46 -0000 1.28
--- ChangeLog 14 Jun 2002 15:12:54 -0000 1.29
***************
*** 1,2 ****
--- 1,387 ----
+ 2002-06-13 Danny Smith <dan...@us...>
+
+ * include/_mingw.h: Increment version to 2.0.
+ * Makefile.in: Ditto.
+
+ Merge in mingwex branch.
+
+ 2002-06-11 Danny Smith <dan...@us...>
+ * include/math.h (fdim, fdimf, fdiml): Add prototypes.
+ * mingwex/fdim.c: New file.
+ * mingwex/fdimf.c: New file.
+ * mingwex/fdiml.c: New file.
+ * mingwex/Makefile.in (DISTFILES): Add fdim.c, fdimf.c,
+ fdiml.c.
+ (MATHOBJS):Add fdim.o, fdimf.o. fdiml.o.
+
+ 2002-05-23 Danny Smith <dan...@us...>
+ * mingwex/Makefile.in (DISTFILES): Add truncf.c, truncl.c.
+
+ 2002-05-22 Danny Smith <dan...@us...>
+ * mingwex/isnanl.c: New file.
+
+ 2002-05-21 Danny Smith <dan...@us...>
+ * include/stdint.h: Include stddef.h to get
+ wchar_t and wint_t.
+ (WINT_MAX): Define to ((wint_t)-1).
+
+ 2002-05-21 Danny Smith <dan...@us...>
+ * include/wctype.h: Replace 'inline' with '__inline__'.
+ * include/inttypes.h: Likewise.
+
+ 2002-05-16 Danny Smith <dan...@us...>
+ * include/_mingw.h (__MINGW_IMPORT): Put extern at start
+ to avoid warnings. Thanks to: Oscar Fuentes <of...@wa...>.
+
+ 2002-05-16 Danny Smith <dan...@us...>
+ * mingwex/snprintf.c: Split out vsnprintf to....
+ * mingwex/vsnprintf.c: New file.
+ * mingwex/snwprintf.c: Split out vsnwprintf to...
+ * mingwex/vsnwprintf.c: New file.
+ * mingwex/Makefile.in: Adjust DISTFILES and STDIO_STUB_OBJS.
+
+ 2002-05-15 Pascal Obry <ob...@gn...>
+ * include/dirent.h (DIR): Change dd_stat type to int.
+ (_WDIR): Likewise.
+
+ 2002-05-07 Danny Smith <dan...@us...>
+ * include/stdio.h (vsnprintf): Change inline to __inline__;
+ (vsnwprintf): Likewise.
+ * include/wchar.h (vsnwprintf): Likewise.
+ (wcstof): Likewise.
+ (fwide): Likewise.
+ (mbsinit): Likewise.
+
+ 2002-04-29 Danny Smith <dan...@us...>
+ Change FP default precison from 53 to 64-bit mantissa.
+ * Makefile.in (CRT0S): Add CRT_fp8.o.
+ (MINGW_OBJS): Replace CRT_fp8.o with CRT_fp10.o.
+ * include/float.h: Replace standard float.h defines with
+ #include_next<float.h> to use GCC's defines. Adjust comments
+ to reflect change.
+
+ 2002-04-26 Danny Smith <dan...@us...>
+ * include/dos.h: Change prefix "__imp_" to "_imp__" for
+ __GNUC__ without __DECLSPEC_SUPPORTED.
+ * include/fnctl.h: Likewise.
+ * include/math.h: Likewise.
+ * include/stdio.h: Likewise.
+ * include/stdlib.h: Likewise.
+ * include/time.h: Likewise.
+ * include/wctype.h: Likewise.
+ * include/ctype.h: Likewise.
+
+ 2002-04-26 Danny Smith <dan...@us...>
+ Add atexit support for dlls.
+ * crt1.c (atexit): Force thunk to _imp__atexit.
+ (_onexit): Force thunk to _imp___onexit.
+ * dllcrt1.c (DllMainCRTStartup): Initialise private atexit
+ table on DLL_PROCESS_ATTACH, clean it up on DLL_PROCESS_DETACH.
+ (__dll_exit): New function to run atexit-registered functions
+ and flush output buffers on DLL_PROCESS_DETACH or failed
+ DLL_PROCESS_ATTACH.
+ (atexit): Force use of private atexit table via _dllonexit,
+ (_onexit): New function. Force use of private atexit table via
+ _dllonexit,
+ * mscvrt.def (atexit, _onexit): Add DATA keyword so that only
+ _imp_<_symbol> is visible in import lib.
+ * mscvrt20.def: Likewise.
+ * mscvrt40.def: Likewise.
+ * crtdll.def: Likewise.
+
+ 2002-04-26 Danny Smith <dan...@us...>
+ * include/fenv.h: Change header guard macro to _FENV_H_.
+ (fenv_t, fexcept_t): Move into block protected by
+ #ifndef RC_INVOKED.
+ Cleanup some whitespace.
+ * include/inttypes.h: Change header guard macro to
+ _INTTYPES_H_.
+
+ 2002-04-26 Danny Smith <dan...@us...>
+ * include/math.h (copysignl): Declare.
+ * mingwex/Makefile.in (DISTFILES): Add copysignl.S.
+ (MATHOBJS):Add copysignl.o.
+
+ 2002-04-24 Danny Smith <dan...@us...>
+ * include/math.h (__signbitl, __isnanl): Declare.
+
+ 2002-04-24 Danny Smith <dan...@us...>
+ * include/math.h (nanl, __fpcassifyl, fminl, fmaxl, rintl,
+ roundl, truncl, fmal, log2l): Declare.
+ Protect C99 declarations with _STDC_VERSION__ >= 199901L)
+ || !defined __STRICT_ANSI__.
+ * mingwex/fmax.c (fmax): Call __isnan, not _isnan.
+ * mingwex/fmin.c (fmin): Likewise.
+ * mingwex/fmaxf.c (fmaxf): Call __isnanf, not _isnan.
+ * mingwex/fminf.c (fminf): Likewise.
+ * mingwex/fmaxl.c: New file.
+ * mingwex/fminl.c: New file.
+ * mingwex/fpclassify.c (__fpclassifyf): Split out to ...
+ * mingwex/fpclassifyf.c: New file.
+ * mingwex/fpclassifyl.c: New file.
+ * mingwex/rint.c (rintf): Split out to...
+ * mingwex/rintf.c: New file.
+ * mingwex/rintl.c: New file.
+ * mingwex/round.c (roundf): Split out to...
+ * mingwex/roundf.c: New file.
+ * mingwex/roundl.c: New file.
+ * mingwex/trunc.c (truncf): Split out to...
+ * mingwex/truncf.c: New file.
+ * mingwex/truncl.c: New file.
+ * mingwex/signbit.c (signbitf): Split out to...
+ * mingwex/signbitf.c: New file.
+ * mingwex/signbitl.c: New file.
+ * mingwex/fmal.c: New file.
+ * mingwex/copysignl.S: New file.
+ * mingwex/log2l.c: New file.
+ * mingwex/fp_consts.c: Add nanl definition.
+ Comment out unused constants.
+ * mingwex/Makefile.in (DISTFILES): Add fmaxl.c, fminl.c,
+ fpclassifyf.c, fpclassifyl.c, rintf.c, rintl.c, roundf.c,
+ roundl.c, truncf.c truncl.c, signbitf.c signbitl.c,
+ fmal.c, log2l.c
+ (MATHOBJS): Add fmaxl.o, fminl.o, fpclassifyf.o,
+ fpclassifyl.o, rintf.o, rintl.o, roundf.o, roundl.o,
+ truncf.o truncl.o, signbitf.o signbitl.o, fmal.o,
+ log2l.o.
+ * mingwex/snwprintf.c (snwprintf, vsnwprintf): Correct typo.
+
+ 2002-04-23 Danny Smith <dan...@us...>
+ Make wide char versions of opendir and friends.
+ * include/dirent.h (_wdirent, _WDIR): Define wide versions of
+ struct dirent, DIR.
+ (_wopendir,_wreaddir,_wclosedir,_wrewinddir,_wtelldir,
+ _wseekdir): Add prototypes for wide versions of corresponding
+ standard functions.
+ * include/tchar.h; Add _UNICODE mappings for dirent.h
+ structures and functions.
+ * mingwex/dirent.c: Make _UNICODE neutral.
+ * mingwex/wdirent.c: New file to define _UNICODE before
+ including dirent.c.
+ * mingwex/Makefile.in (DISTFILES): Add wdirent.c.
+ (POSIX_OBJS): Add wdirent.o.
+ (wdirent.o): Specify dependency on dirent.c as well as
+ wdirent.c.
+ * samples/dirent/wtest.c: New file, wide version of test.c.
+
+ 2002-04-17 Danny Smith <dan...@us...>
+ * Makefile.in (INCLUDES): Add "-iwithprefixbefore include" to
+ ensure gcc include dir is searched despite -nostdinc.
+ * profile/Makefile.in (INCLUDES): Likewise.
+ * mingwex/Makefile.in (INCLUDES): Likewise.
+ * include/stdarg.h: Replace with stub that just guards the
+ real gcc system header with #ifndef RC_INVOKED
+ * include/varargs.h: Likewise.
+ * include/stddef.h: Likewise.
+ * include/stdio.h: Include stdarg.h after defining
+ __need___va_list.
+ (__VALIST): Define as __gnuc_va_list if __GNUC__, else char*.
+ Replace va_list with __VALIST throughout.
+
+ 2002-04-17 Danny Smith <dan...@us...>
+ * crt1.c: Revert changes of 2002-04-16. Use _fpreset again.
+ * msvcrt.def (_fpreset): Mark as DATA so that only
+ _imp___fpreset is exported.
+ * msvcrt20.def (_fpreset): Likewise.
+ * msvcrt40.def (_fpreset): Likewise.
+ * crtdll.def (_fpreset): Likewise.
+ * CRT_fp10.c (_fpreset): Overide library _fpreset with one
+ that calls fninit.
+ (fpreset): Add alias.
+ (__CRT_PC): Delete definition. _fpreset does it now.
+ * CRT_fp8.c (_fpreset): Force use of library _imp___fpreset.
+ (fpreset): Add alias.
+ (__CRT_PC): Delete definition.
+ * moldname.def.in: Comment out fpreset.
+ * moldname-msvcrt.def: Regenerate.
+ * moldname-crtdll.def: Regenerate.
+ * include/fenv.h (FE_DFL_ENV): Define as (fenv_t*)0.
+ * mingwex/fesetenv.c (FE_DFL_ENV): Use it to set environment
+ with the _fpreset determined by startup CRT_fp object.
+
+ 2002-04-16 Danny Smith <dan...@us...>
+ * CRT_fp8.c: New file.
+ * CRT_fp10.c: New file.
+ * crt1.c (__CRT_PC) Declare.
+ (__CRT_fesetenv): New static function, using _CRT_PC.
+ (__mingw_CRTStartup):Use __CRT_fesetenv instead of _fpreset.
+ (_gnu_exception_handler): Likewise.
+ * Makefile.in (CRT0S): Add CRT_fp10.o.
+ (MINGW_OBJS): Add CRT_fp8.o.
+ (SRCDIST_FILES): Add CRT_fp8.c, CRT_fp10.c.
+ Add CRT_fp8.o, CRT_fp10.o dependancies.
+ * include/float.h (_fpreset): Expand comment.
+ * include/fenv.h (FE_PC64_ENV): New define for Intel x87
+ (extended precison) environmemt.
+ (FE_PC53_ENV): New define for MSVCRT default environmemt.
+ (FE_DFL_ENV): Define as FE_PC53_ENV.
+ * mingwex/fesetenv.c: Use FE_PC53_ENV, FE_PC64_ENV to determine
+ precision control for default environment.
+
+ * include/math.h: Fix long comment line.
+ * profile/configure.in (CRT0S): Set to both gcrt1.o and gcrt2.o
+ for mingw.
+ * profile/configure: Regenerate.
+
+ 2002-04-12 Danny Smith <dan...@us...>
+ * mingwex/Makefile.in (DISTFILES): Add suffix to wcstof.c.
+
+ 2002-04-10 Danny Smith <dan...@us...>
+ * mingwex/mingw-fseek.c: New file, based on Mumit Khan
+ mingw-local patch to binutils.
+ Sun Nov 7 04:27:07 1999 Mumit Khan <kh...@xr...>
+ (__mingw_fseek): New function to work around Win9x f/lseek bug.
+ (__mingw_fwrite): Likewise.
+ (__mingw_is_win9x): New helper function.
+ * include/stdio.h (__USE_MINGW_FSEEK): New define,guarding...
+ (__mingw_fseek): New prototype and define to replace fseek.
+ (__mingw_fwrite): New prototype and define to replace fwrite.
+ * mingwex/Makefile.in: Add mingw-fseek.o to libmingwex.a.
+ * moldname-crtdll.def: Remove CR from end of line.
+ * moldname-msvcrt.def: Ditto.
+
+ 2002-04-09 Danny Smith <dan...@us...>
+ * profile/configure.in (CRT0S): Configure name of gcrt?.o
+ based on target, building gcrt0.o for cygwin -mno-cygwin.
+ * profile/configure: Regenerate.
+ * profile/Makefile.in (CRT0S): Use name from configure.
+ (gcrt0.o): New rule.
+ (ALL_CRT0S): New define, used to cleanup all gcrt?.o's.
+
+ 2002-04-04 Danny Smith <dan...@us...>
+ * include/math.h (_controlfp, _control87, _clearfp, _statusfp, _fpreset,
+ _fpecode): Remove prototypes copied from float.h.
+ (nan, nanf): Move into block protected against RC_INVOKED
+ and __cplusplus.
+ * include/stdlib.h (_Exit): Change from static inline to
+ extern inline.
+ * mingwex/_Exit.c : New file.
+ * mingwex/Makefile.in: Add _Exit.o to libmingwex.a.
+
+ 2002-04-04 Danny Smith <dan...@us...>
+ Add libgmon.a and libmingwex.a for cygwin -mno-cygwin.
+ * configure.in (SUBDIRS): Add profile and mingwex to cygwin target.
+ (configdirs): Likewise.
+ (LIBGMON_A): Define for cygwin target as well.
+ * configure: Regenerate.
+ * profile/configure.in (THREAD_DLL): Remove define.
+ (LIBM_A): Remove define.
+ (LIBGMON_A): Define for cygwin target as well.
+ * profile/configure: Regenerate.
+ * profile/makefile.in (install): Install to inst_libdir and
+ inst_includedir.
+ * mingwex/makefile.in (CFLAGS): Move -fomit-frame-pointer to...
+ (OPTFLAGS): New define.
+ (ALL_CFLAGS): Add $(OPTFLAGS).
+ (ALL_CXXFLAGS): Same.
+ (.c.o:): Remove ALL_CXXFLAGS.
+
+ 2002-03-29 Danny Smith <dan...@us...>
+ * include/stdint.h: Add missing newline at eof.
+ * include/stdio.h (snprintf): Add prototype.
+ (vsnprintf): Add prototype and inline definition.
+ (snwprintf): Add prototype.
+ (vsnwprintf): Add prototype and inline definition.
+ * include/wchar.h (snwprintf): Add prototype.
+ (vsnwprintf): Add prototype and inline definition.
+ * mingwex/Makefile.in: Add snprintf.o, snwprintf.o
+ to libmingwex.a.
+ * mingwex/snprintf.c: New file.
+ * mingwex/snwprintf.c: New file.
+
+ 2002-03-22 Danny Smith <dan...@us...>
+ * configure.in: Add mingwex as SUBDIRS and configdirs.
+ * configure: Regenerate.
+ * Makefile.in (MINGW_OBJS): Remove dirent.o.
+ (SRC_DIST_FILES): Remove dirent.c.
+ * dirent.c: Remove.
+ * include/stdlib.h (_Exit): Add static inline
+ function.
+ (struct lldiv_t): Define.
+ (lldiv): Add prototype.
+ (llabs): Add extern inline function.
+ (strtoll,strtoull): Add prototypes.
+ (wcstol, wcstoul, wcstod): Group together.
+ (strtof, wcstof): Add extern inline definitions.
+ (atoll,lltoa,ulltoa, wtoll, lltow ulltow): Add prototypes
+ and extern inline definitions.
+ * include/wchar.h (fwide, wcstoll,wcstoull, wmemchr
+ wmemcmp, wmemcpy, wmemmove, wmemset. mbsinit): Add
+ prototypes.
+ (wcstol, wcstoul,wcstod): Copy prototypes from stdlib.h.
+ (wcstof): Add extern inline definition.
+ * include/math.h (nan, nanf): Add prototypes.
+ (NAN, INFINITE): Define constants.
+ (fpclassify, isnan ,signbit): Add macros and supporting float
+ and double functions.
+ (isfinite, isinf, isnormal): Add macros.
+ (isgreater, isless, isgreaterequal, islessequal,islessgreater):
+ Add macros.
+ (rint, rintf, round, roundf, trunc. truncf, fmax, fmaxf,
+ fmin, fminf, fma, fmaf, log2, log2f): Add prototypes.
+ (copysign, logb, nextafter, scalb): Add prototypes and
+ inline stubs for underscored versions in msvcrt.dll.
+ * include/inttypes.h: New file.
+ * include/fenv.h: New file
+
+ Add new mingwex subdir and files.
+ * mingwex: New directory.
+ * mingwex/Makefile.in: New file.
+ * mingwex/configure.in: New file.
+ * mingwex/configure: Generate.
+ * mingwex/dirent.c: Moved here from parent dir.
+ * mingwex/atoll.c: New file.
+ * mingwex/feclearexcept.c: New file.
+ * mingwex/fegetenv.c: New file.
+ * mingwex/fegetexceptflag.c: New file.
+ * mingwex/fegetround.c: New file.
+ * mingwex/feholdexcept.c: New file.
+ * mingwex/feraiseexcept.c: New file.
+ * mingwex/fesetenv.c: New file.
+ * mingwex/fesetexceptflag.c: New file.
+ * mingwex/fesetround.o: New file.
+ * mingwex/fetestexcept.c: New file.
+ * mingwex/feupdateenv.c: New file.
+ * mingwex/fma.S: New file.
+ * mingwex/fmaf.S: New file.
+ * mingwex/fmax.c: New file.
+ * mingwex/fmaxf.c: New file.
+ * mingwex/fmin.c: New file.
+ * mingwex/fminf.c: New file.
+ * mingwex/fp_consts.c: New file.
+ * mingwex/fpclassify.c: New file.
+ * mingwex/fucom.c: New file.
+ * mingwex/fwide.c: New file.
+ * mingwex/imaxabs.c: New file.
+ * mingwex/imaxdiv.c: New file.
+ * mingwex/isnan.c: New file.
+ * mingwex/isnanf.c: New file.
+ * mingwex/lltoa.c: New file.
+ * mingwex/lltow.c: New file.
+ * mingwex/log2.c: New file.
+ * mingwex/log2f.c: New file.
+ * mingwex/math_stubs.c: New file.
+ * mingwex/mbsinit.c: New file.
+ * mingwex/rint.c: New file.
+ * mingwex/round.c: New file.
+ * mingwex/signbit.c: New file.
+ * mingwex/sitest.c: New file.
+ * mingwex/strtof.c: New file.
+ * mingwex/strtoimax.c: New file.
+ * mingwex/strtoumax.c: New file.
+ * mingwex/testwmem.c: New file.
+ * mingwex/trunc.c: New file.
+ * mingwex/ulltoa.c: New file.
+ * mingwex/ulltow.c: New file.
+ * mingwex/wcstof.c: New file.
+ * mingwex/wcstoimax.c: New file.
+ * mingwex/wcstoumax.c: New file.
+ * mingwex/wmemchr.c: New file.
+ * mingwex/wmemcmp.c: New file.
+ * mingwex/wmemcpy.c: New file.
+ * mingwex/wmemmove.c: New file.
+ * mingwex/wmemset.c: New file.
+ * mingwex/wtoll.c: New file.
+
2002-04-20 Danny Smith <dan...@us...>
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mingw/runtime/Makefile.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Makefile.in 20 May 2002 19:16:45 -0000 1.8
--- Makefile.in 14 Jun 2002 15:12:54 -0000 1.9
***************
*** 19,23 ****
PACKAGE = mingw-runtime
! VERSION = 1.4
CYGRELEASE = 1
--- 19,23 ----
PACKAGE = mingw-runtime
! VERSION = 2.0
CYGRELEASE = 1
***************
*** 97,101 ****
INCLUDES = -I$(srcdir)/include -I$(srcdir)/../w32api/include \
-I$(srcdir)/../include \
! -nostdinc -nostdinc++
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
--- 97,102 ----
INCLUDES = -I$(srcdir)/include -I$(srcdir)/../w32api/include \
-I$(srcdir)/../include \
! -nostdinc -nostdinc++ \
! -iwithprefixbefore include
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
***************
*** 146,152 ****
TARFILEEXT="$(TARFILEEXT)"
! CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o
! MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dirent.o dllmain.o gccmain.o \
! main.o crtst.o mthr_stub.o
MOLD_OBJS = ctype_old.o string_old.o
--- 147,154 ----
TARFILEEXT="$(TARFILEEXT)"
! CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o \
! CRT_fp8.o CRT_fp10.o
! MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
! main.o crtst.o mthr_stub.o CRT_fp10.o
MOLD_OBJS = ctype_old.o string_old.o
***************
*** 158,165 ****
SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
Makefile.in README TODO config.guess config.sub configure configure.in \
! crt1.c crtdll.def crtmt.c crtst.c ctype_old.c dirent.c dllcrt1.c dllmain.c \
gccmain.c init.c install-sh jamfile main.c mkinstalldirs moldname-crtdll.def \
moldname-msvcrt.def moldname.def moldname.def.in msvcrt.def msvcrt20.def \
! msvcrt40.def mthr.c mthr_init.c mthr_stub.c readme.txt string_old.c
all_dlls_host = @all_dlls_host@
--- 160,168 ----
SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
Makefile.in README TODO config.guess config.sub configure configure.in \
! crt1.c crtdll.def crtmt.c crtst.c ctype_old.c dllcrt1.c dllmain.c \
gccmain.c init.c install-sh jamfile main.c mkinstalldirs moldname-crtdll.def \
moldname-msvcrt.def moldname.def moldname.def.in msvcrt.def msvcrt20.def \
! msvcrt40.def mthr.c mthr_init.c mthr_stub.c readme.txt string_old.c \
! CRT_fp8.c CRT_fp10.c
all_dlls_host = @all_dlls_host@
***************
*** 380,388 ****
dllcrt1.o: $(srcdir)/dllcrt1.c
dllcrt2.o: $(srcdir)/dllcrt1.c
- dirent.o: $(srcdir)/dirent.c
dllmain.o: $(srcdir)/dllmain.c
main.o: $(srcdir)/main.c
oldnames.o: $(srcdir)/oldnames.c
string_old.o: $(srcdir)/string_old.c
Makefile: Makefile.in config.status configure
--- 383,393 ----
dllcrt1.o: $(srcdir)/dllcrt1.c
dllcrt2.o: $(srcdir)/dllcrt1.c
dllmain.o: $(srcdir)/dllmain.c
main.o: $(srcdir)/main.c
oldnames.o: $(srcdir)/oldnames.c
string_old.o: $(srcdir)/string_old.c
+ CRT_fp8.o: $(srcdir)/CRT_fp8.c
+ CRT_fp10.o: $(srcdir)/CRT_fp10.c
+
Makefile: Makefile.in config.status configure
Index: configure
===================================================================
RCS file: /cvsroot/mingw/runtime/configure,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** configure 4 Jun 2001 23:26:01 -0000 1.1.1.1
--- configure 14 Jun 2002 15:12:54 -0000 1.2
***************
*** 1660,1677 ****
program_prefix=${target_alias}-
!
! configdirs=""
! SUBDIRS=""
HEADER_SUBDIR=""
case "$target_os" in
*cygwin*)
MNO_CYGWIN=-mno-cygwin
- configdirs="$configdirs"
- # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
LIBM_A=
- LIBGMON_A=
# Install mingw headers in mingw subdirectory.
HEADER_SUBDIR="mingw"
--- 1660,1673 ----
program_prefix=${target_alias}-
! SUBDIRS="profile mingwex"
! configdirs="profile mingwex"
HEADER_SUBDIR=""
+ LIBGMON_A=libgmon.a
+
case "$target_os" in
*cygwin*)
MNO_CYGWIN=-mno-cygwin
LIBM_A=
# Install mingw headers in mingw subdirectory.
HEADER_SUBDIR="mingw"
***************
*** 1681,1687 ****
MNO_CYGWIN=
LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- SUBDIRS="profile"
- configdirs="$configdirs profile"
;;
esac
--- 1677,1680 ----
***************
*** 1720,1724 ****
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1723: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
--- 1713,1717 ----
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
! echo "configure:1716: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
Index: configure.in
===================================================================
RCS file: /cvsroot/mingw/runtime/configure.in,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** configure.in 4 Jun 2001 23:26:01 -0000 1.1.1.1
--- configure.in 14 Jun 2002 15:12:54 -0000 1.2
***************
*** 89,106 ****
AC_CANONICAL_SYSTEM
!
! configdirs=""
! SUBDIRS=""
HEADER_SUBDIR=""
case "$target_os" in
*cygwin*)
MNO_CYGWIN=-mno-cygwin
- configdirs="$configdirs"
- # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
LIBM_A=
- LIBGMON_A=
# Install mingw headers in mingw subdirectory.
HEADER_SUBDIR="mingw"
--- 89,102 ----
AC_CANONICAL_SYSTEM
! SUBDIRS="profile mingwex"
! configdirs="profile mingwex"
HEADER_SUBDIR=""
+ LIBGMON_A=libgmon.a
+
case "$target_os" in
*cygwin*)
MNO_CYGWIN=-mno-cygwin
LIBM_A=
# Install mingw headers in mingw subdirectory.
HEADER_SUBDIR="mingw"
***************
*** 110,116 ****
MNO_CYGWIN=
LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- SUBDIRS="profile"
- configdirs="$configdirs profile"
;;
esac
--- 106,109 ----
Index: crt1.c
===================================================================
RCS file: /cvsroot/mingw/runtime/crt1.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** crt1.c 5 Jun 2001 00:26:30 -0000 1.2
--- crt1.c 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 233,234 ****
--- 233,251 ----
}
+ /*
+ * 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);
+ }
Index: crtdll.def
===================================================================
RCS file: /cvsroot/mingw/runtime/crtdll.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** crtdll.def 5 Jun 2001 00:26:30 -0000 1.2
--- crtdll.def 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 286,290 ****
_fpclass
_fpieee_flt
! _fpreset
_fputchar
_fputwchar
--- 286,290 ----
_fpclass
_fpieee_flt
! _fpreset DATA
_fputchar
_fputwchar
***************
*** 415,419 ****
_msize
_nextafter
! _onexit
_open
_open_osfhandle
--- 415,419 ----
_msize
_nextafter
! _onexit DATA
_open
_open_osfhandle
***************
*** 521,525 ****
atan
atan2
! atexit
atof
atoi
--- 521,525 ----
atan
atan2
! atexit DATA
atof
atoi
Index: dllcrt1.c
===================================================================
RCS file: /cvsroot/mingw/runtime/dllcrt1.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dllcrt1.c 5 Jun 2001 00:26:30 -0000 1.2
--- dllcrt1.c 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 26,33 ****
*
*/
!
#include <stdio.h>
#include <io.h>
#include <process.h>
#include <windows.h>
--- 26,34 ----
*
*/
! #include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <process.h>
+ #include <errno.h>
#include <windows.h>
***************
*** 41,46 ****
--- 42,59 ----
#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);
+
BOOL WINAPI
DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
***************
*** 50,89 ****
if (dwReason == DLL_PROCESS_ATTACH)
{
#ifdef __GNUC__
! /* From libgcc.a, calls global class constructors. */
__main ();
#endif
! }
/*
! * Call the user-supplied DllMain subroutine
* 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);
! #ifdef __GNUC__
! if (dwReason == DLL_PROCESS_DETACH)
{
! /* From libgcc.a, calls global class destructors. */
! __do_global_dtors ();
! }
#endif
return bRet;
}
/*
! * For the moment a dummy atexit. Atexit causes problems in DLLs, especially
! * if they are dynamically loaded. For now atexit inside a DLL does nothing.
! * NOTE: We need this even if the DLL author never calls atexit because
! * the global constructor function __do_global_ctors called from __main
! * will attempt to register __do_global_dtors using atexit.
! * Thanks to Andrey A. Smirnov for pointing this one out.
*/
int
! atexit (void (*pfn) ())
{
! return 0;
}
--- 63,196 ----
if (dwReason == DLL_PROCESS_ATTACH)
{
+ /* 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;
+
+ #ifdef DEBUG
+ printf ("%s: DLL_PROCESS_ATTACH (%d)\n", __FUNCTION__);
+ #endif
+
+
#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.
*/
+
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));
+ }
Index: moldname-crtdll.def
===================================================================
RCS file: /cvsroot/mingw/runtime/moldname-crtdll.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** moldname-crtdll.def 9 Apr 2002 21:06:38 -0000 1.2
--- moldname-crtdll.def 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 55,59 ****
filelength
fileno
! fpreset
fputchar
fputwchar
--- 55,60 ----
filelength
fileno
! ; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
! ; fpreset
fputchar
fputwchar
Index: moldname-msvcrt.def
===================================================================
RCS file: /cvsroot/mingw/runtime/moldname-msvcrt.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** moldname-msvcrt.def 9 Apr 2002 21:06:38 -0000 1.2
--- moldname-msvcrt.def 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 55,59 ****
filelength
fileno
! fpreset
fputchar
fputwchar
--- 55,60 ----
filelength
fileno
! ; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
! ; fpreset
fputchar
fputwchar
Index: moldname.def.in
===================================================================
RCS file: /cvsroot/mingw/runtime/moldname.def.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** moldname.def.in 9 Apr 2002 21:06:38 -0000 1.2
--- moldname.def.in 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 55,59 ****
filelength
fileno
! fpreset
fputchar
fputwchar
--- 55,60 ----
filelength
fileno
! ; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
! ; fpreset
fputchar
fputwchar
Index: msvcrt.def
===================================================================
RCS file: /cvsroot/mingw/runtime/msvcrt.def,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** msvcrt.def 11 Jan 2002 21:53:48 -0000 1.4
--- msvcrt.def 14 Jun 2002 15:12:54 -0000 1.5
***************
*** 211,215 ****
_fpclass
_fpieee_flt
! _fpreset
_fputchar
_fputwchar
--- 211,215 ----
_fpclass
_fpieee_flt
! _fpreset DATA
_fputchar
_fputwchar
***************
*** 366,370 ****
_msize
_nextafter
! _onexit
_open
_open_osfhandle
--- 366,370 ----
_msize
_nextafter
! _onexit DATA
_open
_open_osfhandle
***************
*** 547,551 ****
atan
atan2
! atexit
atof
atoi
--- 547,551 ----
atan
atan2
! atexit DATA
atof
atoi
Index: msvcrt20.def
===================================================================
RCS file: /cvsroot/mingw/runtime/msvcrt20.def,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** msvcrt20.def 5 Jun 2001 00:26:30 -0000 1.2
--- msvcrt20.def 14 Jun 2002 15:12:54 -0000 1.3
***************
*** 182,186 ****
_fpclass
_fpieee_flt
! _fpreset
_fputchar
_fputwchar
--- 182,186 ----
_fpclass
_fpieee_flt
! _fpreset DATA
_fputchar
_fputwchar
***************
*** 330,334 ****
_mtunlock
_nextafter
! _onexit
_open
_open_osfhandle
--- 330,334 ----
_mtunlock
_nextafter
! _onexit DATA
_open
_open_osfhandle
***************
*** 529,533 ****
atan
atan2
! atexit
atof
atoi
--- 529,533 ----
atan
atan2
! atexit DATA
atof
atoi
Index: msvcrt40.def
===================================================================
RCS file: /cvsroot/mingw/runtime/msvcrt40.def,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** msvcrt40.def 4 Jun 2001 23:26:02 -0000 1.1.1.1
--- msvcrt40.def 14 Jun 2002 15:12:54 -0000 1.2
***************
*** 164,168 ****
_fpclass
_fpieee_flt
! _fpreset
_fputchar
_fputwchar
--- 164,168 ----
_fpclass
_fpieee_flt
! _fpreset DATA
_fputchar
_fputwchar
***************
*** 313,317 ****
_mtunlock
_nextafter
! _onexit
_open
_open_osfhandle
--- 313,317 ----
_mtunlock
_nextafter
! _onexit DATA
_open
_open_osfhandle
***************
*** 486,490 ****
atan
atan2
! atexit
atof
atoi
--- 486,490 ----
atan
atan2
! atexit DATA
atof
atoi
--- dirent.c DELETED ---
|
|
From: <ea...@us...> - 2002-06-14 15:07:50
|
Update of /cvsroot/mingw/runtime/mingwex In directory usw-pr-cvs1:/tmp/cvs-serv22230/mingwex Log Message: Directory /cvsroot/mingw/runtime/mingwex added to the repository |
|
From: <ea...@us...> - 2002-06-14 13:52:16
|
Update of /cvsroot/mingw/w32api
In directory usw-pr-cvs1:/tmp/cvs-serv27284
Modified Files:
ChangeLog Makefile.in
Added Files:
README.w32api
Removed Files:
README
Log Message:
* include/w32api.h: Change to version 2.0 to reflect the change
in the license.
* README: Renamed.
* README.w32api: Renamed from README. Modified license to remove
the restriction of notifying the author based on the fact that the
author is unreachable at the notified address.
* Makefile.in (VERSION): Change to 2.0.
--- NEW FILE: README.w32api ---
Free headers and libraries for the Win32 API
Originally written by Anders Norlander
Last known and not working email: <ano...@he...>
Now maintained by MinGW Developers
Send bug reports and questions to Min...@li...
URL: http://www.mingw.org
* License 2.0
You are free to use, modify and copy this package as long as this
README.w32api file is included unmodified with any distribution, source or
binary, of this package. No restrictions are imposed on any package or
product using or incorporating this package. You are free to license your
package as you see fit.
You may not restrict others freedoms as set forth in the above paragraph.
You may distribute this library as part of another package or as a
modified package if and only if you do *not* restrict others freedoms as
set forth in the above paragraph as it concerns this pakcage. You do have
the right to restrict uses of any package using this package.
This package is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* What is it?
This is a free set of headers and import libraries for the Win32
API. The library differs from the GNU Windows32 library in that I
have tried to use a file structure that mirrors Microsoft's. I
don't like having *all* definitions in one single header as in the
GNU Windows32 library, I want a clean separation between different
parts of the API.
Daniel Guerrero Miralles contributed the DirectX 6.1 import
libraries and DirectX GUID definitions.
See the files NOTES and TODO for what needs to be done.
* Size does matter
Since the WIN32 API is severely bloated (as most MS products seem to
be) the headers are designed to be as compact as possible, while
still being readable, in order to minimize parsing time.
The convention is to omit parameter names for function prototypes,
no excessive white space. Struct/union members are indented with tab
characters to make them readable. Comment only when necessary.
If you are contributing a patch please follow the above mentioned
convention. Make sure your editor does not convert tabs to spaces.
* What do I need to use it?
The library is intended for use with egcs 1.1 or later but it is
possible to use with some other tools as well (although it is not
very useful). LCC-Win32, MSVC and Borland C++ 5.01 or higher may
work as well. The import libraries are for GNU tools only.
The library requires egcs 1.1 or later, since the `#pragma pack'
feature is used. Mumit Khan provides egcs patches and binaries for
win32 at `http://www.xraylith.wisc.edu/~khan/software/gnu-win32/'.
If you are going to use C++ COM objects, you will need a version of
egcs that recognizes the `comobject' attribute and then define
HAVE_COMOBJECT when compiling your program. Antonio Mendes de
Oliveira Neto has a prebuilt version at
`http://li.facens.br/EGCS-WIN32/english/index.html'. Note that this
is very experimental. If you want to use COM objects in C++ but with
C interfaces you must define CINTERFACE.
Objective-C programs cannot use COM functionality because of
conflicts between the interface define and the Objective-C
@interface directive. There is also a conflict between the windows
Obj-C BOOL types. To avoid this conflict you should use WINBOOL in
all places where you would use BOOL in a C/C++ windows program. If
you include any windows headers *after* `windows.h' you must use the
method outlined below:
/* non-windows includes */
#include <objc/objc.h>
...
/* windows specific headers */
#include <windows.h>
#define BOOL WINBOOL
#include <commctrl.h>
...
#undef BOOL
...
/* include other headers */
Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/w32api/ChangeLog,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** ChangeLog 14 Jun 2002 12:36:55 -0000 1.95
--- ChangeLog 14 Jun 2002 13:52:13 -0000 1.96
***************
*** 1,4 ****
--- 1,14 ----
2002-06-14 Earnie Boyd <ea...@us...>
+ * include/w32api.h: Change to version 2.0 to reflect the change
+ in the license.
+ * README: Renamed.
+ * README.w32api: Renamed from README. Modified license to remove
+ the restriction of notifying the author based on the fact that the
+ author is unreachable at the notified address.
+ * Makefile.in (VERSION): Change to 2.0.
+
+ 2002-06-14 Earnie Boyd <ea...@us...>
+
* include/wingdi.h (GetEnhMetaFileBits): Correct typo.
* Makefile.in (bindist): Correct the MinGW distribution.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mingw/w32api/Makefile.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Makefile.in 14 Jun 2002 12:36:55 -0000 1.10
--- Makefile.in 14 Jun 2002 13:52:13 -0000 1.11
***************
*** 67,75 ****
PACKAGE = w32api
! VERSION = 1.5
CYGRELEASE = 1
DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
! install-sh README ChangeLog TODO CONTRIBUTIONS
all: lib
--- 67,75 ----
PACKAGE = w32api
! VERSION = 2.0
CYGRELEASE = 1
DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
! install-sh README.w32api ChangeLog TODO CONTRIBUTIONS
all: lib
--- README DELETED ---
|
|
From: <ea...@us...> - 2002-06-14 13:52:16
|
Update of /cvsroot/mingw/w32api/include In directory usw-pr-cvs1:/tmp/cvs-serv27284/include Modified Files: w32api.h Log Message: * include/w32api.h: Change to version 2.0 to reflect the change in the license. * README: Renamed. * README.w32api: Renamed from README. Modified license to remove the restriction of notifying the author based on the fact that the author is unreachable at the notified address. * Makefile.in (VERSION): Change to 2.0. Index: w32api.h =================================================================== RCS file: /cvsroot/mingw/w32api/include/w32api.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** w32api.h 28 May 2002 13:25:21 -0000 1.7 --- w32api.h 14 Jun 2002 13:52:14 -0000 1.8 *************** *** 5,11 **** #endif ! #define __W32API_VERSION 1.5 ! #define __W32API_MAJOR_VERSION 1 ! #define __W32API_MINOR_VERSION 5 #endif /* ndef _W32API_H_ */ --- 5,11 ---- #endif ! #define __W32API_VERSION 2.0 ! #define __W32API_MAJOR_VERSION 2 ! #define __W32API_MINOR_VERSION 0 #endif /* ndef _W32API_H_ */ |
|
From: <ea...@us...> - 2002-06-14 12:36:58
|
Update of /cvsroot/mingw/w32api
In directory usw-pr-cvs1:/tmp/cvs-serv3867
Modified Files:
ChangeLog Makefile.in
Log Message:
* Makefile.in (bindist): Correct the MinGW distribution.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/mingw/w32api/ChangeLog,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** ChangeLog 14 Jun 2002 11:44:47 -0000 1.94
--- ChangeLog 14 Jun 2002 12:36:55 -0000 1.95
***************
*** 2,5 ****
--- 2,6 ----
* include/wingdi.h (GetEnhMetaFileBits): Correct typo.
+ * Makefile.in (bindist): Correct the MinGW distribution.
2002-06-13 Earnie Boyd <ea...@us...>
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mingw/w32api/Makefile.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Makefile.in 28 May 2002 13:25:21 -0000 1.9
--- Makefile.in 14 Jun 2002 12:36:55 -0000 1.10
***************
*** 101,104 ****
--- 101,110 ----
endif
+ ifneq (,$(findstring mingw, $(target_alias)))
+ dist_prefix=
+ else
+ dist_prefix=/$(conf_prefix)
+ endif
+
ifneq (,$(findstring cygwin, $(target_alias)))
TARFLAGS = j
***************
*** 125,129 ****
mkdir $(distdir)
chmod 755 $(distdir)
! $(MAKE) install prefix=../$(distdir)/$(conf_prefix) exec_prefix=../$(distdir)/$(conf_prefix)
rm -f $(distdir)$(TARFILEEXT)
cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) *
--- 131,135 ----
mkdir $(distdir)
chmod 755 $(distdir)
! $(MAKE) install prefix=../$(distdir)$(dist_prefix) exec_prefix=../$(distdir)$(dist_prefix)
rm -f $(distdir)$(TARFILEEXT)
cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) *
|
|
From: <ea...@us...> - 2002-06-14 11:44:50
|
Update of /cvsroot/mingw/w32api/lib In directory usw-pr-cvs1:/tmp/cvs-serv23843/lib Modified Files: kernel32.def test.c thunk32.def Log Message: Merge changes from Cygwin CVS Index: kernel32.def =================================================================== RCS file: /cvsroot/mingw/w32api/lib/kernel32.def,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kernel32.def 19 Jun 2001 07:15:28 -0000 1.2 --- kernel32.def 14 Jun 2002 11:44:47 -0000 1.3 *************** *** 41,44 **** --- 41,45 ---- ConvertDefaultLocale@4 ConvertThreadToFiber@4 + ConvertToGlobalHandle@4 CopyFileA@12 CopyFileW@12 Index: test.c =================================================================== RCS file: /cvsroot/mingw/w32api/lib/test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test.c 9 Apr 2002 21:17:17 -0000 1.6 --- test.c 14 Jun 2002 11:44:47 -0000 1.7 *************** *** 67,70 **** --- 67,71 ---- #ifndef __OBJC__ /* problems with BOOL */ #include <ole2.h> + #include <comcat.h> #include <shlobj.h> #include <intshcut.h> Index: thunk32.def =================================================================== RCS file: /cvsroot/mingw/w32api/lib/thunk32.def,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** thunk32.def 5 Jun 2001 01:36:46 -0000 1.1.1.1 --- thunk32.def 14 Jun 2002 11:44:47 -0000 1.2 *************** *** 1,3 **** ! LIBRARY THUNK32.DLL EXPORTS Callback12@12 --- 1,3 ---- ! LIBRARY KERNEL32.dll EXPORTS Callback12@12 |
Update of /cvsroot/mingw/w32api/include
In directory usw-pr-cvs1:/tmp/cvs-serv23843/include
Modified Files:
mapi.h ntdef.h richedit.h windef.h windows.h wingdi.h winnt.h
winuser.h
Added Files:
comcat.h
Removed Files:
excpt.h
Log Message:
Merge changes from Cygwin CVS
--- NEW FILE: comcat.h ---
#ifndef _COMCAT_H
#define _COMCAT_H
#if __GNUC__ >=3
#pragma GCC system_header
#endif
#include <windows.h>
#include <ole2.h>
#ifndef _RC_INVOKED
#ifdef __cplusplus
extern "C"{
#endif
EXTERN_C const IID IID_IEnumGUID;
typedef interface IEnumGUID *LPENUMGUID;
#undef INTERFACE
#define INTERFACE IEnumGUID
DECLARE_INTERFACE_(IEnumGUID,IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(Next)(THIS_ ULONG,GUID*,ULONG*) PURE;
STDMETHOD(Skip)(THIS_ ULONG) PURE;
STDMETHOD(Reset)(THIS) PURE;
STDMETHOD(Clone)(THIS_ LPENUMGUID*) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IEnumGUID_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IEnumGUID_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IEnumGUID_Release(p) (p)->lpVtbl->Release(p)
#define IEnumGUID_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
#define IEnumGUID_Skip(p,a) (p)->lpVtbl->Skip(p,a)
#define IEnumGUID_Reset(p) (p)->lpVtbl->Reset(p)
#define IEnumGUID_Clone(p,a) (p)->lpVtbl->Clone(p,a)
#endif
typedef GUID CATID;
typedef REFGUID REFCATID;
#define CATID_NULL GUID_NULL
#define IsEqualCATID(a, b) IsEqualGUID(a, b)
typedef struct tagCATEGORYINFO {
CATID catid; /* category identifier for component */
LCID lcid; /* locale identifier */
OLECHAR szDescription[128]; /* description of the category */
} CATEGORYINFO, *LPCATEGORYINFO;
EXTERN_C const CATID CATID_Insertable;
EXTERN_C const CATID CATID_Control;
EXTERN_C const CATID CATID_Programmable;
EXTERN_C const CATID CATID_IsShortcut;
EXTERN_C const CATID CATID_NeverShowExt;
EXTERN_C const CATID CATID_DocObject;
EXTERN_C const CATID CATID_Printable;
EXTERN_C const CATID CATID_RequiresDataPathHost;
EXTERN_C const CATID CATID_PersistsToMoniker;
EXTERN_C const CATID CATID_PersistsToStorage;
EXTERN_C const CATID CATID_PersistsToStreamInit;
EXTERN_C const CATID CATID_PersistsToStream;
EXTERN_C const CATID CATID_PersistsToMemory;
EXTERN_C const CATID CATID_PersistsToFile;
EXTERN_C const CATID CATID_PersistsToPropertyBag;
EXTERN_C const CATID CATID_InternetAware;
EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;
#define IEnumCATID IEnumGUID
#define LPENUMCATID LPENUMGUID
#define IID_IEnumCATID IID_IEnumGUID
#define IEnumCLSID IEnumGUID
#define LPENUMCLSID LPENUMGUID
#define IID_IEnumCLSID IID_IEnumGUID
EXTERN_C const IID IID_ICatInformation;
typedef interface ICatInformation *LPCATINFORMATION;
EXTERN_C const IID IID_ICatRegister;
typedef interface ICatRegister *LPCATREGISTER;
EXTERN_C const IID IID_IEnumCATEGORYINFO;
typedef interface IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;
#define INTERFACE ICatInformation
DECLARE_INTERFACE_(ICatInformation,IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(EnumCategories)(THIS_ LCID,LPENUMCATEGORYINFO*) PURE;
STDMETHOD(GetCategoryDesc)(THIS_ REFCATID,LCID,PWCHAR*) PURE;
STDMETHOD(EnumClassesOfCategories)(THIS_ ULONG,CATID*,ULONG,CATID*,LPENUMCLSID*) PURE;
STDMETHOD(IsClassOfCategories)(THIS_ REFCLSID,ULONG,CATID*,ULONG,CATID*) PURE;
STDMETHOD(EnumImplCategoriesOfClass)(THIS_ REFCLSID,LPENUMCATID*) PURE;
STDMETHOD(EnumReqCategoriesOfClass)(THIS_ REFCLSID,LPENUMCATID*) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define ICatInformation_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ICatInformation_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ICatInformation_Release(p) (p)->lpVtbl->Release(p)
#define ICatInformation_EnumCategories(p,a,b) (p)->lpVtbl->EnumCategories(p,a,b)
#define ICatInformation_GetCategoryDesc(p,a,b,c) (p)->lpVtbl->GetCategoryDesc(p,a,b,c)
#define ICatInformation_EnumClassesOfCategories(p,a,b,c,d,e) (p)->lpVtbl->EnumClassesOfCategories(p,a,b,c,d,e)
#define ICatInformation_IsClassOfCategories(p,a,b,c,d,e) (p)->lpVtbl->IsClassOfCategories(p,a,b,c,d,e)
#define ICatInformation_EnumImplCategoriesOfClass(p,a,b) (p)->lpVtbl->EnumImplCategoriesOfClass(p,a,b)
#define ICatInformation_EnumReqCategoriesOfClass(p,a,b) (p)->lpVtbl->EnumReqCategoriesOfClass(p,a,b)
#endif
#define INTERFACE ICatRegister
DECLARE_INTERFACE_(ICatRegister,IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(RegisterCategories)(THIS_ ULONG,CATEGORYINFO*) PURE;
STDMETHOD(UnRegisterCategories)(THIS_ ULONG,CATID*) PURE;
STDMETHOD(RegisterClassImplCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
STDMETHOD(UnRegisterClassImplCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
STDMETHOD(RegisterClassReqCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
STDMETHOD(UnRegisterClassReqCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define ICatRegister_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define ICatRegister_AddRef(p) (p)->lpVtbl->AddRef(p)
#define ICatRegister_Release(p) (p)->lpVtbl->Release(p)
#define ICatRegister_RegisterCategories(p,a,b) (p)->lpVtbl->RegisterCategories(p,a,b)
#define ICatRegister_UnRegisterCategories(p,a,b) (p)->lpVtbl->UnRegisterCategories(p,a,b)
#define ICatRegister_RegisterClassImplCategories(p,a,b,c) (p)->lpVtbl->RegisterClassImplCategories(p,a,b,c)
#define ICatRegister_UnRegisterClassImplCategories(p,a,b,c) (p)->lpVtbl->UnRegisterClassImplCategories(p,a,b,c)
#define ICatRegister_RegisterClassReqCategories(p,a,b,c) (p)->lpVtbl->RegisterClassReqCategories(p,a,b,c)
#define ICatRegister_UnRegisterClassReqCategories(p,a,b,c) (p)->lpVtbl->UnRegisterClassReqCategories(p,a,b,c)
#endif
EXTERN_C const IID IID_IEnumCATEGORYINFO;
#undef INTERFACE
#define INTERFACE IEnumCATEGORYINFO
DECLARE_INTERFACE_(IEnumCATEGORYINFO,IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(Next)(THIS_ ULONG,CATEGORYINFO*,ULONG*) PURE;
STDMETHOD(Skip)(THIS_ ULONG) PURE;
STDMETHOD(Reset)(THIS) PURE;
STDMETHOD(Clone)(THIS_ LPENUMCATEGORYINFO*) PURE;
};
#undef INTERFACE
#ifdef COBJMACROS
#define IEnumCATEGORYINFO_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IEnumCATEGORYINFO_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IEnumCATEGORYINFO_Release(p) (p)->lpVtbl->Release(p)
#define IEnumCATEGORYINFO_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
#define IEnumCATEGORYINFO_Skip(p,a) (p)->lpVtbl->Skip(p,a)
#define IEnumCATEGORYINFO_Reset(p) (p)->lpVtbl->Reset(p)
#define IEnumCATEGORYINFO_Clone(p,a) (p)->lpVtbl->Clone(p,a)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _RC_INVOKED */
#endif
Index: mapi.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/mapi.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mapi.h 9 Apr 2002 22:09:39 -0000 1.1
--- mapi.h 14 Jun 2002 11:44:47 -0000 1.2
***************
*** 73,78 ****
ULONG ulReserved;
ULONG ulRecipClass;
! LPTSTR lpszName;
! LPTSTR lpszAddress;
ULONG ulEIDSize;
LPVOID lpEntryID;
--- 73,78 ----
ULONG ulReserved;
ULONG ulRecipClass;
! LPSTR lpszName;
! LPSTR lpszAddress;
ULONG ulEIDSize;
LPVOID lpEntryID;
***************
*** 82,87 ****
ULONG flFlags;
ULONG nPosition;
! LPTSTR lpszPathName;
! LPTSTR lpszFileName;
LPVOID lpFileType;
} MapiFileDesc, *lpMapiFileDesc;
--- 82,87 ----
ULONG flFlags;
ULONG nPosition;
! LPSTR lpszPathName;
! LPSTR lpszFileName;
LPVOID lpFileType;
} MapiFileDesc, *lpMapiFileDesc;
***************
*** 95,103 ****
typedef struct {
ULONG ulReserved;
! LPTSTR lpszSubject;
! LPTSTR lpszNoteText;
! LPTSTR lpszMessageType;
! LPTSTR lpszDateReceived;
! LPTSTR lpszConversationID;
FLAGS flFlags;
lpMapiRecipDesc lpOriginator;
--- 95,103 ----
typedef struct {
ULONG ulReserved;
! LPSTR lpszSubject;
! LPSTR lpszNoteText;
! LPSTR lpszMessageType;
! LPSTR lpszDateReceived;
! LPSTR lpszConversationID;
FLAGS flFlags;
lpMapiRecipDesc lpOriginator;
***************
*** 108,120 ****
} MapiMessage, *lpMapiMessage;
! ULONG PASCAL MAPILogon (ULONG,LPTSTR,LPTSTR,FLAGS,ULONG,LPLHANDLE);
ULONG PASCAL MAPISendMail (LHANDLE,ULONG,lpMapiMessage,FLAGS,ULONG);
! ULONG PASCAL MAPISendDocuments (ULONG,LPTSTR,LPTSTR,LPTSTR,ULONG);
! ULONG PASCAL MAPIReadMail (LHANDLE,ULONG,LPTSTR,FLAGS,ULONG,
lpMapiMessage*);
! ULONG PASCAL MAPIFindNext (LHANDLE,ULONG,LPTSTR,LPTSTR,FLAGS,ULONG,LPTSTR);
! ULONG PASCAL MAPIResolveName (LHANDLE,ULONG,LPTSTR,FLAGS,ULONG,
lpMapiRecipDesc*);
! ULONG PASCAL MAPIAddress (LHANDLE,ULONG,LPTSTR,ULONG,LPTSTR,ULONG,
lpMapiRecipDesc,FLAGS,ULONG,LPULONG,
lpMapiRecipDesc*);
--- 108,120 ----
} MapiMessage, *lpMapiMessage;
! ULONG PASCAL MAPILogon (ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPLHANDLE);
ULONG PASCAL MAPISendMail (LHANDLE,ULONG,lpMapiMessage,FLAGS,ULONG);
! ULONG PASCAL MAPISendDocuments (ULONG,LPSTR,LPSTR,LPSTR,ULONG);
! ULONG PASCAL MAPIReadMail (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
lpMapiMessage*);
! ULONG PASCAL MAPIFindNext (LHANDLE,ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPSTR);
! ULONG PASCAL MAPIResolveName (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
lpMapiRecipDesc*);
! ULONG PASCAL MAPIAddress (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,ULONG,
lpMapiRecipDesc,FLAGS,ULONG,LPULONG,
lpMapiRecipDesc*);
***************
*** 122,127 ****
ULONG PASCAL MAPIDetails (LHANDLE,ULONG,lpMapiRecipDesc,FLAGS,ULONG);
ULONG PASCAL MAPISaveMail (LHANDLE,ULONG,lpMapiMessage lpszMessage,
! FLAGS,ULONG,LPTSTR);
! ULONG PASCAL MAPIDeleteMail (LHANDLE lpSession,ULONG,LPTSTR,FLAGS,ULONG);
ULONG PASCAL MAPILogoff (LHANDLE,ULONG,FLAGS,ULONG);
/* Netscape extensions. */
--- 122,127 ----
ULONG PASCAL MAPIDetails (LHANDLE,ULONG,lpMapiRecipDesc,FLAGS,ULONG);
ULONG PASCAL MAPISaveMail (LHANDLE,ULONG,lpMapiMessage lpszMessage,
! FLAGS,ULONG,LPSTR);
! ULONG PASCAL MAPIDeleteMail (LHANDLE lpSession,ULONG,LPSTR,FLAGS,ULONG);
ULONG PASCAL MAPILogoff (LHANDLE,ULONG,FLAGS,ULONG);
/* Netscape extensions. */
***************
*** 130,146 ****
/* Handles for use with GetProcAddress */
! typedef ULONG (PASCAL * LPMAPILOGON) (ULONG,LPTSTR,LPTSTR,FLAGS,ULONG,
LPLHANDLE);
typedef ULONG (PASCAL * LPMAPISENDMAIL) (LHANDLE,ULONG,lpMapiMessage,
FLAGS,ULONG);
! typedef ULONG (PASCAL * LPMAPISENDDOCUMENTS) (ULONG,LPTSTR,LPTSTR,
! LPTSTR,ULONG);
! typedef ULONG (PASCAL * LPMAPIREADMAIL) (LHANDLE,ULONG,LPTSTR,FLAGS,
ULONG,lpMapiMessage*);
! typedef ULONG (PASCAL * LPMAPIFINDNEXT) (LHANDLE,ULONG,LPTSTR,LPTSTR,
! FLAGS,ULONG,LPTSTR);
! typedef ULONG (PASCAL * LPMAPIRESOLVENAME) (LHANDLE,ULONG,LPTSTR,FLAGS,
ULONG,lpMapiRecipDesc*);
! typedef ULONG (PASCAL * LPMAPIADDRESS) (LHANDLE,ULONG,LPTSTR,ULONG,LPTSTR,
ULONG,lpMapiRecipDesc,FLAGS,ULONG,
LPULONG,lpMapiRecipDesc*);
--- 130,146 ----
/* Handles for use with GetProcAddress */
! typedef ULONG (PASCAL * LPMAPILOGON) (ULONG,LPSTR,LPSTR,FLAGS,ULONG,
LPLHANDLE);
typedef ULONG (PASCAL * LPMAPISENDMAIL) (LHANDLE,ULONG,lpMapiMessage,
FLAGS,ULONG);
! typedef ULONG (PASCAL * LPMAPISENDDOCUMENTS) (ULONG,LPSTR,LPSTR,
! LPSTR,ULONG);
! typedef ULONG (PASCAL * LPMAPIREADMAIL) (LHANDLE,ULONG,LPSTR,FLAGS,
ULONG,lpMapiMessage*);
! typedef ULONG (PASCAL * LPMAPIFINDNEXT) (LHANDLE,ULONG,LPSTR,LPSTR,
! FLAGS,ULONG,LPSTR);
! typedef ULONG (PASCAL * LPMAPIRESOLVENAME) (LHANDLE,ULONG,LPSTR,FLAGS,
ULONG,lpMapiRecipDesc*);
! typedef ULONG (PASCAL * LPMAPIADDRESS) (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,
ULONG,lpMapiRecipDesc,FLAGS,ULONG,
LPULONG,lpMapiRecipDesc*);
***************
*** 149,155 ****
FLAGS,ULONG);
typedef ULONG (PASCAL * LPMAPISAVEMAIL) (LHANDLE,ULONG,lpMapiMessage,
! FLAGS,ULONG,LPTSTR);
typedef ULONG (PASCAL * LPMAPIDELETEMAIL) (LHANDLE lpSession,ULONG,
! LPTSTR, FLAGS,ULONG);
typedef ULONG (PASCAL * LPMAPILOGOFF)(LHANDLE,ULONG,FLAGS,ULONG);
--- 149,155 ----
FLAGS,ULONG);
typedef ULONG (PASCAL * LPMAPISAVEMAIL) (LHANDLE,ULONG,lpMapiMessage,
! FLAGS,ULONG,LPSTR);
typedef ULONG (PASCAL * LPMAPIDELETEMAIL) (LHANDLE lpSession,ULONG,
! LPSTR, FLAGS,ULONG);
typedef ULONG (PASCAL * LPMAPILOGOFF)(LHANDLE,ULONG,FLAGS,ULONG);
Index: ntdef.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/ntdef.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ntdef.h 9 Apr 2002 21:17:17 -0000 1.2
--- ntdef.h 14 Jun 2002 11:44:47 -0000 1.3
***************
*** 38,41 ****
--- 38,45 ----
} STRING, *PSTRING;
#endif
+ typedef STRING ANSI_STRING;
+ typedef PSTRING PANSI_STRING;
+ typedef STRING OEM_STRING;
+ typedef PSTRING POEM_STRING;
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
typedef enum _SECTION_INHERIT {
Index: richedit.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/richedit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** richedit.h 9 Apr 2002 21:17:17 -0000 1.3
--- richedit.h 14 Jun 2002 11:44:47 -0000 1.4
***************
*** 140,144 ****
--- 140,147 ----
#define EM_GETREDONAME (WM_USER+87)
#define EM_STOPGROUPTYPING (WM_USER+88)
+ #define EM_SETTEXTMODE (WM_USER+89)
+ #define EM_GETTEXTMODE (WM_USER+90)
#define EM_AUTOURLDETECT (WM_USER+91)
+ #define EM_GETTEXTEX (WM_USER+94)
#define EM_GETTEXTLENGTHEX (WM_USER+95)
#define EM_SHOWSCROLLBAR (WM_USER+96)
***************
*** 195,198 ****
--- 198,209 ----
#define SCF_ALL 4
#define SCF_USEUIRULES 8
+ #define TM_PLAINTEXT 1
+ #define TM_RICHTEXT 2
+ #define TM_SINGLELEVELUNDO 4
+ #define TM_MULTILEVELUNDO 8
+ #define TM_SINGLECODEPAGE 16
+ #define TM_MULTICODEPAGE 32
+ #define GT_DEFAULT 0
+ #define GT_USECRLF 1
#define yHeightCharPtsMost 1638
#define lDefaultTab 720
***************
*** 381,384 ****
--- 392,402 ----
LPSTR szPunctuation;
} PUNCTUATION;
+ typedef struct _gettextex {
+ DWORD cb;
+ DWORD flags;
+ UINT codepage;
+ LPCSTR lpDefaultChar;
+ LPBOOL lpUsedDefaultChar;
+ } GETTEXTEX;
typedef LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
/* Defines for EM_SETTYPOGRAPHYOPTIONS */
Index: windef.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/windef.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** windef.h 21 May 2002 16:07:06 -0000 1.5
--- windef.h 14 Jun 2002 11:44:47 -0000 1.6
***************
*** 185,188 ****
--- 185,201 ----
#endif
+ /* FIXME: This will make some code compile. The programs will most
+ likely crash when an exception is raised, but at least they will
+ compile. */
+ #if defined (__GNUC__) && defined (__SEH_NOOP)
+ #define __try
+ #define __except(x) if (0) /* don't execute handler */
+ #define __finally
+
+ #define _try __try
+ #define _except __except
+ #define _finally __finally
+ #endif
+
typedef unsigned long DWORD;
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
Index: windows.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/windows.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** windows.h 21 May 2002 16:07:06 -0000 1.5
--- windows.h 14 Jun 2002 11:44:47 -0000 1.6
***************
*** 49,53 ****
#include <wincon.h>
#include <basetyps.h>
- #include <excpt.h>
#include <winbase.h>
#ifndef _WINGDI_H
--- 49,52 ----
***************
*** 105,108 ****
--- 104,112 ----
#endif /* (_WIN32_WINNT >= 0x0400) */
#endif
+ #if !defined (__OBJC__)
+ #if __GNUC__ >= 3 /* what about Watcom? */
+ #include <ole2.h>
+ #endif
+ #endif /* __OBJC__ */
#endif /* WIN32_LEAN_AND_MEAN */
Index: wingdi.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/wingdi.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** wingdi.h 9 Apr 2002 21:17:17 -0000 1.7
--- wingdi.h 14 Jun 2002 11:44:47 -0000 1.8
***************
*** 2519,2522 ****
--- 2519,2523 ----
HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR);
HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR);
+ UINT WINAPI GetEnhMetaFileBits(HENHMETAFILE,UINT,LPBYTE);
UINT WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE,UINT,LPSTR);
UINT WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE,UINT,LPWSTR);
Index: winnt.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winnt.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** winnt.h 21 May 2002 16:07:06 -0000 1.23
--- winnt.h 14 Jun 2002 11:44:47 -0000 1.24
***************
*** 1140,1154 ****
BYTE AceFlags;
WORD AceSize;
! } ACE_HEADER;
typedef struct _ACCESS_ALLOWED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
! } ACCESS_ALLOWED_ACE;
typedef struct _ACCESS_DENIED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
! } ACCESS_DENIED_ACE;
typedef struct _SYSTEM_AUDIT_ACE {
ACE_HEADER Header;
--- 1140,1154 ----
BYTE AceFlags;
WORD AceSize;
! } ACE_HEADER, *PACE_HEADER;
typedef struct _ACCESS_ALLOWED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
! } ACCESS_ALLOWED_ACE, *PACCESS_ALLOWED_ACE;
typedef struct _ACCESS_DENIED_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
! } ACCESS_DENIED_ACE, *PACCESS_DENIED_ACE;
typedef struct _SYSTEM_AUDIT_ACE {
ACE_HEADER Header;
Index: winuser.h
===================================================================
RCS file: /cvsroot/mingw/w32api/include/winuser.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** winuser.h 9 Apr 2002 21:17:17 -0000 1.15
--- winuser.h 14 Jun 2002 11:44:47 -0000 1.16
***************
*** 2387,2390 ****
--- 2387,2396 ----
DWORD dwFlags;
} TOGGLEKEYS;
+ typedef struct tagMOUSEHOOKSTRUCT {
+ POINT pt;
+ HWND hwnd;
+ UINT wHitTestCode;
+ DWORD dwExtraInfo;
+ } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
typedef struct tagTRACKMOUSEEVENT {
DWORD cbSize;
--- excpt.h DELETED ---
|
|
From: <ea...@us...> - 2002-06-14 11:44:50
|
Update of /cvsroot/mingw/w32api In directory usw-pr-cvs1:/tmp/cvs-serv23843 Modified Files: ChangeLog Log Message: Merge changes from Cygwin CVS Index: ChangeLog =================================================================== RCS file: /cvsroot/mingw/w32api/ChangeLog,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** ChangeLog 28 May 2002 13:25:21 -0000 1.93 --- ChangeLog 14 Jun 2002 11:44:47 -0000 1.94 *************** *** 1,6 **** --- 1,67 ---- + 2002-06-14 Earnie Boyd <ea...@us...> + + * include/wingdi.h (GetEnhMetaFileBits): Correct typo. + + 2002-06-13 Earnie Boyd <ea...@us...> + + * include/winuser.h (MOUSEHOOKSTRUCT): Define structure. + * include/wingdi.h (GetEnhMetaFileBits): Define prototype. + + 2002-06-13 Danny Smith <dan...@us...> + + * lib/test.c: #include comcat.h. + + 2002-06-13 John K. Hohm <jh...@ac...> + + * include/comcat.h: New file. + + 2002-06-09 Gunnar Degnbol <gde...@us...> + + * include/richedit.h (EM_*, TM_*, GT_*): Add new defines. + (GETTEXTEX): Add structure definition. + + 2002-06-08 Danny Smith <dan...@us...> + + * include/windows.h (ole2.h): #include if !__OBJC__ and + __GNUC__ >=3 and !WIN32_LEAN_AND_MEAN. + + 2002-06-07 Gunnar Degnbol <gde...@us...> + + * include/mapi.h: Change LPTSTR to LPSTR throughout. + + 2002-06-05 Danny Smith <dan...@us...> + + * include/winnt.h (PACE_HEADER, PACCESS_ALLOWED_ACE, + PACCESS_DENIED_ACE): Add typedefs. + + 2002-06-03 Danny Smith <dan...@us...> + + * lib/thunk32.def (LIBRARY): Change to KERNEL32.dll. + + 2002-06-03 Steven Edwards <Ste...@ya...> + + * lib/kernel32.def (ConvertToGlobalHandle): Add stub. + + 2002-06-01 Danny Smith <dan...@us...> + + * include/windef.h: Fix typo in last change. + + 2002-06-01 Danny Smith <dan...@us...> + + * include/windef.h: Add no-op __try, __except, __finally + defines from ... + * include/excpt.h: Remove file. + * include/windows.h: Don't include excpt.h. + + 2002-05-30 Christopher January <ch...@at...> + + * include/ntdef.h (ANSI_STRING, PANSI_STRING, OEM_STRING, POEM_STRING): + Add missing typedefs. + 2002-05-28 Earnie Boyd <ea...@us...> * include/w32api.h: Increment version to 1.5 * Makefile.in: Ditto. + 2002-05-27 René Møller Fonseca <fo...@us...> |
|
From: <ea...@us...> - 2002-06-13 22:06:56
|
Update of /cvsroot/mingw/msys/rt/src/winsup/utils
In directory usw-pr-cvs1:/tmp/cvs-serv21712
Modified Files:
ChangeLog.MSYS strace.cc
Log Message:
* strace.cc: Correct the string searched to MsYs.
Index: ChangeLog.MSYS
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/utils/ChangeLog.MSYS,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ChangeLog.MSYS 14 Oct 2001 14:57:53 -0000 1.1
--- ChangeLog.MSYS 13 Jun 2002 22:06:54 -0000 1.2
***************
*** 1,2 ****
--- 1,6 ----
+ 2002.06.13 Earnie Boyd <ea...@us...>
+
+ * strace.cc: Correct the string searched to MsYs.
+
2001.09.22 Earnie Boyd <Ea...@SF...>
Index: strace.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/utils/strace.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** strace.cc 22 Sep 2001 17:43:45 -0000 1.2
--- strace.cc 13 Jun 2002 22:06:54 -0000 1.3
***************
*** 346,350 ****
int len;
int special;
! char alen[3 + 8 + 1];
DWORD nbytes;
child_list *child = get_child (id);
--- 346,350 ----
int len;
int special;
! char alen[4 + 8 + 1];
DWORD nbytes;
child_list *child = get_child (id);
***************
*** 365,371 ****
#endif
! if (strncmp (alen, "cYg", 3))
return;
! len = (int) strtoul (alen + 3, NULL, 16);
if (!len)
return;
--- 365,371 ----
#endif
! if (strncmp (alen, "MsYs", 4))
return;
! len = (int) strtoul (alen + 4, NULL, 16);
if (!len)
return;
|
|
From: <ea...@us...> - 2002-06-13 22:02:21
|
Update of /cvsroot/mingw/msys/rt/src/newlib/libc/stdlib
In directory usw-pr-cvs1:/tmp/cvs-serv19899/libc/stdlib
Modified Files:
mallocr.c
Log Message:
* libc/stdlib/mallocr.c: Merge changes from official newlib.
Index: mallocr.c
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/newlib/libc/stdlib/mallocr.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mallocr.c 15 Oct 2001 22:22:32 -0000 1.3
--- mallocr.c 13 Jun 2002 22:02:17 -0000 1.4
***************
*** 305,309 ****
#define MALLOC_UNLOCK __malloc_unlock(reent_ptr)
! #if defined(__CYGWIN__) || defined(__MSYS__)
# undef _WIN32
# undef WIN32
--- 305,309 ----
#define MALLOC_UNLOCK __malloc_unlock(reent_ptr)
! #ifdef __CYGWIN__
# undef _WIN32
# undef WIN32
***************
*** 2129,2132 ****
--- 2129,2133 ----
INTERNAL_SIZE_T front_misalign; /* unusable bytes at front of sbrked space */
INTERNAL_SIZE_T correction; /* bytes for 2nd sbrk call */
+ int correction_failed = 0; /* whether we should relax the assertion */
char* new_brk; /* return of 2nd sbrk call */
INTERNAL_SIZE_T top_size; /* new size of top chunk */
***************
*** 2153,2161 ****
if (brk == (char*)(MORECORE_FAILURE) ||
(brk < old_end && old_top != initial_top))
! return;
sbrked_mem += sbrk_size;
! if (brk == old_end) /* can just add bytes to current top */
{
top_size = sbrk_size + old_top_size;
--- 2154,2164 ----
if (brk == (char*)(MORECORE_FAILURE) ||
(brk < old_end && old_top != initial_top))
! return;
sbrked_mem += sbrk_size;
! if (brk == old_end /* can just add bytes to current top, unless
! previous correction failed */
! && ((POINTER_UINT)old_end & (pagesz - 1)) == 0)
{
top_size = sbrk_size + old_top_size;
***************
*** 2184,2188 ****
/* Allocate correction */
new_brk = (char*)(MORECORE (correction));
! if (new_brk == (char*)(MORECORE_FAILURE)) return;
sbrked_mem += correction;
--- 2187,2196 ----
/* Allocate correction */
new_brk = (char*)(MORECORE (correction));
! if (new_brk == (char*)(MORECORE_FAILURE))
! {
! correction = 0;
! correction_failed = 1;
! new_brk = brk;
! }
sbrked_mem += correction;
***************
*** 2229,2233 ****
/* We always land on a page boundary */
! assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0);
}
--- 2237,2242 ----
/* We always land on a page boundary */
! assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0
! || correction_failed);
}
***************
*** 3204,3208 ****
#endif /* DEFINE_CALLOC */
! #if defined(DEFINE_CFREE) && !defined(__CYGWIN__) && !defined(__MSYS__)
/*
--- 3213,3217 ----
#endif /* DEFINE_CALLOC */
! #if defined(DEFINE_CFREE) && !(defined(__CYGWIN__)||defined(__MSYS__))
/*
***************
*** 3463,3466 ****
--- 3472,3476 ----
#ifdef INTERNAL_NEWLIB
+ _REENT_SMALL_CHECK_INIT(_stderr_r (reent_ptr));
fp = _stderr_r(reent_ptr);
#define fprintf fiprintf
|
|
From: <ea...@us...> - 2002-06-13 22:02:21
|
Update of /cvsroot/mingw/msys/rt/src/newlib In directory usw-pr-cvs1:/tmp/cvs-serv19899 Modified Files: ChangeLog.MSYS Log Message: * libc/stdlib/mallocr.c: Merge changes from official newlib. Index: ChangeLog.MSYS =================================================================== RCS file: /cvsroot/mingw/msys/rt/src/newlib/ChangeLog.MSYS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog.MSYS 14 Oct 2001 14:57:52 -0000 1.1 --- ChangeLog.MSYS 13 Jun 2002 22:02:16 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + 2002.06.13 Earnie Boyd <ea...@us...> + + * libc/stdlib/mallocr.c: Merge changes from official newlib. + 2001.09.21 Earnie Boyd <ea...@SF...> |
|
From: <ea...@us...> - 2002-06-13 21:54:25
|
Update of /cvsroot/mingw/msys/rt/src/winsup/cygwin
In directory usw-pr-cvs1:/tmp/cvs-serv16748
Modified Files:
ChangeLog.MSYS Makefile.in dcrt0.cc environ.cc exec.cc
malloc.cc passwd.cc path.cc path.h poll.cc registry.cc
select.cc shared.cc spawn.cc syscalls.cc winsup.h
Added Files:
msys_symlink.cc msys_symlink.h
Log Message:
* msys_symlink.cc: New file.
* msys_symlink.h: Ditto.
* Makefile.in (DLL_OFILES) Add msys_symlink.o
* dcrt0.cc (quoted): Add some debugging output.
Increment pointers instead of strcpy pointer + 1.
* environ.cc (winenv): Use more intelligible variable names.
Use new operator instead of malloc for memory management.
* exec.cc: Debugging output throughout.
* passwd.cc (read_etc_passwd): Remove unused code.
* path.cc: Define NO_SYMLINK
(symlink): Use msys_symlink.
Use new operator instead of alloca.
(hash_path_name): Use new operator instead of alloca.
(QuotedRelativePath): Remove.
(cygwin_conv_to_win32_path): Use new operator instead of malloc.
Remove meaningless code from retpathcpy and retpathcat.
Add check for NULL pointer and NULL value for path.
Filter debugging output to DEBUGGING.
(cwdstuff::get): Use new operator instead of malloc.
* path.h (msys_symlink): Define prototype.
* poll.cc (poll); Use new operator instead of alloca.
* select.cc (allocfd_set): Ditto.
* syscalls.cc (check_posix_perm): Ditto.
* registry.cc (reg_key::regkey): Remove unused code.
* shared.cc (shared_name): Add another parameter to small_printf to
make the name unique based on dll location.
(shared_info::heap_chunk_size): Make 6 MB the default instead of 4 MB.
* spawn.cc (spawn_guts): Add debugging output.
Convert envblock to Win32 paths.
Use new operator instead of malloc.
(_spawnve): Add debugging output.
(spawnl): Ditto.
(spawnle): Ditto.
(spawnlp): Ditto.
(spawnlpe): Ditto.
(spawnv): Ditto.
(spawnvp): Ditto.
(spawnvpe): Ditto.
* winsup.h (HMMMcnt): Remove.
(HMMM) Use __LINE__ instead of HMMMcnt.
--- NEW FILE: msys_symlink.cc ---
/* msys_symlink.c
* Copyright (C) 2002, Earnie Boyd
* This file is a part of MSYS.
* ***************************************************************************/
#include "msys_symlink.h"
extern "C"
int
msys_symlink (const char * topath, const char * frompath)
{
char wtopath[MAX_PATH] = "\0";
char wfrompath[MAX_PATH] = "\0";
char *w_topath = wtopath;
char *w_frompath = wfrompath;
struct stat *sb_frompath = new struct stat;
struct stat *sb_topath = new struct stat;
int existing_destination;
int destination_isdir;
int src_isdir;
HANDLE dH;
struct _WIN32_FIND_DATAA *dHfile = new struct _WIN32_FIND_DATAA;
BOOL findfiles;
BOOL frompath_needs_slash;
BOOL topath_needs_slash;
char fromfile[MAX_PATH];
char tofile[MAX_PATH];
/*
* FIXME: Use relavent switches.
* FIXME: remove this comment.
x.dereference = DEREF_NEVER;
x.preserve_owner_and_group = 1;
x.preserve_chmod_bits = 1;
x.preserve_timestamps = 1;
x.require_preserve = 1;
x.recursive = 1;
x.copy_as_regular = 0;
x.umask_kill = ~ (mode_t) 0;
x.xstat = lstat;
*/
debug_printf("msys_symlink (%s, %s)", frompath, topath);
frompath_needs_slash = FALSE;
topath_needs_slash = FALSE;
if (stat (frompath, sb_frompath))
{
debug_printf("Failed stat");
return 1;
}
if (stat (topath, sb_topath))
{
if (errno == ENOENT)
{
existing_destination = 0;
debug_printf("no existing destination");
}
else
{
debug_printf("error: %d", errno);
return 1;
}
}
else
{
existing_destination = 1;
debug_printf("existing destination");
}
src_isdir = S_ISDIR(sb_frompath->st_mode);
destination_isdir = S_ISDIR(sb_topath->st_mode) | src_isdir;
{
char *tptr;
if (*(tptr = strchr (frompath, '\0') -1) != '/')
frompath_needs_slash = TRUE;
else
*tptr = '\0';
if (*(tptr = strchr (topath, '\0') -1) != '/')
topath_needs_slash - TRUE;
else
*tptr = '\0';
}
cygwin_conv_to_win32_path (frompath, w_frompath);
debug_printf("w_frompath: %s", w_frompath);
cygwin_conv_to_win32_path (topath, w_topath);
debug_printf("w_topath: %s", w_topath);
if (destination_isdir)
{
if (!existing_destination)
{
if (!CreateDirectoryEx(w_frompath, w_topath, NULL))
{
debug_printf("CreateDirectoryEx(%s, %s, 0) failed", w_frompath, w_topath);
return 1;
}
}
else
{
set_errno(EEXIST);
return 1;
}
{
char findpath[MAX_PATH+2];
strcpy(findpath, w_frompath);
strcat(findpath, "/*");
dH = FindFirstFile(findpath, dHfile);
debug_printf("dHfile(1): %s", dHfile->cFileName);
findfiles = FindNextFile (dH, dHfile);
debug_printf("dHfile(2): %s", dHfile->cFileName);
findfiles = FindNextFile (dH, dHfile);
debug_printf("dHfile(3): %s", dHfile->cFileName);
}
while (findfiles)
{
strcpy(fromfile, w_frompath);
if (frompath_needs_slash)
strcat(fromfile, "/");
strcat(fromfile, dHfile->cFileName);
strcpy(tofile, w_topath);
//if (topath_needs_slash)
strcat(tofile, "/");
strcat(tofile, dHfile->cFileName);
if (msys_symlink (tofile, fromfile))
return 1;
findfiles = FindNextFile (dH, dHfile);
debug_printf("dHfile(4): %s", dHfile->cFileName);
}
if (GetLastError() != ERROR_NO_MORE_FILES)
return 1;
}
else
{
if (!CopyFile (w_frompath, w_topath, FALSE))
return 1;
}
return 0;
}
--- NEW FILE: msys_symlink.h ---
/* msys_symlink.h
* Copyright (C) 2002, Earnie Boyd
* This file is a part of MSYS.
* ***************************************************************************/
#include <w32api.h>
#include <windows.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/strace.h>
#include <sys/cygwin.h>
#include "cygerrno.h"
Index: ChangeLog.MSYS
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/ChangeLog.MSYS,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ChangeLog.MSYS 13 May 2002 13:46:19 -0000 1.16
--- ChangeLog.MSYS 13 Jun 2002 21:54:21 -0000 1.17
***************
*** 1,2 ****
--- 1,45 ----
+ 2002-06-13 Earnie Boyd <ea...@us...>
+
+ * msys_symlink.cc: New file.
+ * msys_symlink.h: Ditto.
+ * Makefile.in (DLL_OFILES) Add msys_symlink.o
+ * dcrt0.cc (quoted): Add some debugging output.
+ Increment pointers instead of strcpy pointer + 1.
+ * environ.cc (winenv): Use more intelligible variable names.
+ Use new operator instead of malloc for memory management.
+ * exec.cc: Debugging output throughout.
+ * passwd.cc (read_etc_passwd): Remove unused code.
+ * path.cc: Define NO_SYMLINK
+ (symlink): Use msys_symlink.
+ Use new operator instead of alloca.
+ (hash_path_name): Use new operator instead of alloca.
+ (QuotedRelativePath): Remove.
+ (cygwin_conv_to_win32_path): Use new operator instead of malloc.
+ Remove meaningless code from retpathcpy and retpathcat.
+ Add check for NULL pointer and NULL value for path.
+ Filter debugging output to DEBUGGING.
+ (cwdstuff::get): Use new operator instead of malloc.
+ * path.h (msys_symlink): Define prototype.
+ * poll.cc (poll); Use new operator instead of alloca.
+ * select.cc (allocfd_set): Ditto.
+ * syscalls.cc (check_posix_perm): Ditto.
+ * registry.cc (reg_key::regkey): Remove unused code.
+ * shared.cc (shared_name): Add another parameter to small_printf to
+ make the name unique based on dll location.
+ (shared_info::heap_chunk_size): Make 6 MB the default instead of 4 MB.
+ * spawn.cc (spawn_guts): Add debugging output.
+ Convert envblock to Win32 paths.
+ Use new operator instead of malloc.
+ (_spawnve): Add debugging output.
+ (spawnl): Ditto.
+ (spawnle): Ditto.
+ (spawnlp): Ditto.
+ (spawnlpe): Ditto.
+ (spawnv): Ditto.
+ (spawnvp): Ditto.
+ (spawnvpe): Ditto.
+ * winsup.h (HMMMcnt): Remove.
+ (HMMM) Use __LINE__ instead of HMMMcnt.
+
2002-05-13 Earnie Boyd <ea...@us...>
Index: Makefile.in
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.in 15 Oct 2001 22:22:32 -0000 1.2
--- Makefile.in 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 122,126 ****
fhandler_termios.o fhandler_tty.o fhandler_windows.o fhandler_zero.o \
fork.o glob.o grp.o heap.o init.o ioctl.o localtime.o malloc.o \
! miscfuncs.o mmap.o msys.o \
net.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o \
pthread.o regexp.o regerror.o regsub.o registry.o resource.o scandir.o \
--- 122,126 ----
fhandler_termios.o fhandler_tty.o fhandler_windows.o fhandler_zero.o \
fork.o glob.o grp.o heap.o init.o ioctl.o localtime.o malloc.o \
! miscfuncs.o mmap.o msys.o msys_symlink.o\
net.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o \
pthread.o regexp.o regerror.o regsub.o registry.o resource.o scandir.o \
Index: dcrt0.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/dcrt0.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dcrt0.cc 15 Oct 2001 22:22:32 -0000 1.4
--- dcrt0.cc 13 Jun 2002 21:54:21 -0000 1.5
***************
*** 36,39 ****
--- 36,40 ----
#include "dll_init.h"
#include "host_dependent.h"
+ #include "sys/strace.h"
#define MAX_AT_FILE_LEVEL 10
***************
*** 319,328 ****
char quote = *cmd;
if (!winshell)
{
char *p;
! strcpy (cmd, cmd + 1);
if ((p = strchr (cmd, quote)) != NULL)
! strcpy (p, p + 1);
else
p = strchr (cmd, '\0');
--- 320,330 ----
char quote = *cmd;
+ debug_printf("(%s, %d)", cmd, winshell);
if (!winshell)
{
char *p;
! cmd++;
if ((p = strchr (cmd, quote)) != NULL)
! p++;
else
p = strchr (cmd, '\0');
Index: environ.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/environ.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** environ.cc 24 Apr 2002 12:47:53 -0000 1.5
--- environ.cc 13 Jun 2002 21:54:21 -0000 1.6
***************
*** 770,813 ****
winenv (const char * const *envp, int keep_posix)
{
! int len, n, tl;
const char * const *srcp;
const char **dstp;
bool saw_forced_winenv[FORCED_WINENV_SIZE] = {0};
! char *p;
debug_printf ("envp %p, keep_posix %d", envp, keep_posix);
! tl = 0;
! for (n = 0; envp[n]; n++)
continue;
! const char *newenvp[n + 1 + FORCED_WINENV_SIZE];
for (srcp = envp, dstp = newenvp; *srcp; srcp++, dstp++)
{
! len = strcspn (*srcp, "=");
win_env *conv;
! if (keep_posix || !(conv = getwinenv (*srcp, *srcp + len + 1)))
*dstp = *srcp;
else
{
! p = (char *) alloca (strlen (conv->native) + 1);
! strcpy (p, conv->native);
! *dstp = p;
}
! tl += strlen (*dstp) + 1;
if ((*dstp)[0] == '!' && isdrive ((*dstp) + 1) && (*dstp)[3] == '=')
{
! p = (char *) alloca (strlen (*dstp) + 1);
! strcpy (p, *dstp);
! *p = '=';
! *dstp = p;
}
for (int i = 0; forced_winenv_vars[i]; i++)
if (!saw_forced_winenv[i])
! saw_forced_winenv[i] = strncasematch (forced_winenv_vars[i], *srcp, len);
}
--- 770,813 ----
winenv (const char * const *envp, int keep_posix)
{
! int srcplen, envc, envblocklen;
const char * const *srcp;
const char **dstp;
bool saw_forced_winenv[FORCED_WINENV_SIZE] = {0};
! char *tptr;
debug_printf ("envp %p, keep_posix %d", envp, keep_posix);
! envblocklen = 0;
! for (envc = 0; envp[envc]; envc++)
continue;
! const char *newenvp[envc + 1 + FORCED_WINENV_SIZE];
for (srcp = envp, dstp = newenvp; *srcp; srcp++, dstp++)
{
! srcplen = strcspn (*srcp, "=");
win_env *conv;
! if (keep_posix || !(conv = getwinenv (*srcp, *srcp + srcplen + 1)))
*dstp = *srcp;
else
{
! tptr = new char [strlen (conv->native) + 1];
! strcpy (tptr, conv->native);
! *dstp = tptr;
}
! envblocklen += strlen (*dstp) + 1;
if ((*dstp)[0] == '!' && isdrive ((*dstp) + 1) && (*dstp)[3] == '=')
{
! tptr = new char [strlen (*dstp) + 1];
! strcpy (tptr, *dstp);
! *tptr = '=';
! *dstp = tptr;
}
for (int i = 0; forced_winenv_vars[i]; i++)
if (!saw_forced_winenv[i])
! saw_forced_winenv[i] = strncasematch (forced_winenv_vars[i], *srcp, srcplen);
}
***************
*** 815,828 ****
if (!saw_forced_winenv[i])
{
! len = strlen (forced_winenv_vars[i]);
! p = (char *) alloca (len + MAX_PATH + 1);
! strcpy (p, forced_winenv_vars[i]);
! strcat (p, "=");
! if (!GetEnvironmentVariable (forced_winenv_vars[i], p + len + 1, MAX_PATH))
debug_printf ("warning: %s not present in environment", *srcp);
else
{
! *dstp++ = p;
! tl += strlen (p) + 1;
}
}
--- 815,828 ----
if (!saw_forced_winenv[i])
{
! srcplen = strlen (forced_winenv_vars[i]);
! tptr = new char [srcplen + MAX_PATH + 1];
! strcpy (tptr, forced_winenv_vars[i]);
! strcat (tptr, "=");
! if (!GetEnvironmentVariable (forced_winenv_vars[i], tptr + srcplen + 1, MAX_PATH))
debug_printf ("warning: %s not present in environment", *srcp);
else
{
! *dstp++ = tptr;
! envblocklen += strlen (tptr) + 1;
}
}
***************
*** 831,835 ****
int envlen = dstp - newenvp;
! debug_printf ("env count %d, bytes %d", envlen, tl);
/* Windows programs expect the environment block to be sorted. */
--- 831,835 ----
int envlen = dstp - newenvp;
! debug_printf ("env count %d, bytes %d", envlen, envblocklen);
/* Windows programs expect the environment block to be sorted. */
***************
*** 838,847 ****
/* Create an environment block suitable for passing to CreateProcess. */
char *ptr, *envblock;
! envblock = (char *) malloc (tl + 2);
for (srcp = newenvp, ptr = envblock; *srcp; srcp++)
{
! len = strlen (*srcp);
! memcpy (ptr, *srcp, len + 1);
! ptr += len + 1;
}
*ptr = '\0'; /* Two null bytes at the end */
--- 838,847 ----
/* Create an environment block suitable for passing to CreateProcess. */
char *ptr, *envblock;
! envblock = new char [envblocklen + 2 + (MAX_PATH * 256)];
for (srcp = newenvp, ptr = envblock; *srcp; srcp++)
{
! srcplen = strlen(*srcp);
! memcpy (ptr, *srcp, srcplen + 1);
! ptr += srcplen + 1;
}
*ptr = '\0'; /* Two null bytes at the end */
Index: exec.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/exec.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** exec.cc 15 Oct 2001 22:22:32 -0000 1.2
--- exec.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 32,37 ****
--- 32,45 ----
static char *const empty_env[] = { 0 };
MALLOC_CHECK;
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
if (!envp)
envp = empty_env;
+ #if DEBUGGING
+ for (int i=0;envp[i];i++)
+ debug_printf("envp[%d] = %s", i, envp[i]);
+ #endif
return _spawnve (NULL, _P_OVERLAY, path, argv, envp);
}
***************
*** 49,53 ****
--- 57,66 ----
i = 1;
do
+ {
argv[i] = va_arg (args, const char *);
+ #if DEBUGGING
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
+ }
while (argv[i++] != NULL);
va_end (args);
***************
*** 61,64 ****
--- 74,81 ----
{
MALLOC_CHECK;
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return _execve (path, (char * const *) argv, cur_environ ());
}
***************
*** 71,74 ****
--- 88,95 ----
const char *const envp[])
{
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
_spawnve (hToken, _P_OVERLAY, path, argv, envp);
return -1;
***************
*** 88,92 ****
--- 109,118 ----
do
+ {
argv[i] = va_arg (args, const char *);
+ #if DEBUGGING
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
+ }
while (argv[i++] != NULL);
***************
*** 111,115 ****
do
! argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
--- 137,146 ----
do
! {
! argv[i] = va_arg (args, const char *);
! #if DEBUGGING
! debug_printf("argv[%d] = %s", i, argv[i]);
! #endif
! }
while (argv[i++] != NULL);
***************
*** 134,138 ****
--- 165,174 ----
do
+ {
argv[i] = va_arg (args, const char *);
+ #if DEBUGGING
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
+ }
while (argv[i++] != NULL);
***************
*** 157,161 ****
do
! argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
--- 193,202 ----
do
! {
! argv[i] = va_arg (args, const char *);
! #if DEBUGGING
! debug_printf("argv[%d] = %s", i, argv[i]);
! #endif
! }
while (argv[i++] != NULL);
***************
*** 180,183 ****
--- 221,228 ----
{
MALLOC_CHECK;
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return sexecvpe (hToken, path, argv, cur_environ ());
}
***************
*** 207,210 ****
--- 252,259 ----
path_conv buf;
MALLOC_CHECK;
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return sexecve (hToken, find_exec (file, buf), argv, envp);
}
Index: malloc.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/malloc.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** malloc.cc 15 Oct 2001 22:22:33 -0000 1.2
--- malloc.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 100,104 ****
return strdup_dbg (s, __FILE__, __LINE__);
}
! #else
/* Call though the application pointer,
which either points to export_malloc, or the application's
--- 100,104 ----
return strdup_dbg (s, __FILE__, __LINE__);
}
! #else /* ! MALLOC_DEBUG */
/* Call though the application pointer,
which either points to export_malloc, or the application's
Index: passwd.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/passwd.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** passwd.cc 15 Oct 2001 22:22:33 -0000 1.2
--- passwd.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 142,163 ****
}
- #if ! __MSYS__
- FILE *f = fopen ("/etc/passwd", "rt");
-
- if (f)
- {
- while (fgets (linebuf, sizeof (linebuf), f) != NULL)
- {
- if (strlen (linebuf))
- add_pwd_line (linebuf);
- }
-
- passwd_state.set_last_modified (f);
- fclose (f);
- passwd_state = loaded;
- }
- else
- {
- #endif //! __MSYS__
debug_printf ("Emulating /etc/passwd");
snprintf (linebuf, sizeof (linebuf), "%s::%u:%u::%s:/bin/sh", cygheap->user.name (),
--- 142,145 ----
***************
*** 165,172 ****
add_pwd_line (linebuf);
passwd_state = emulated;
- #if ! __MSYS__
- }
- #endif //! __MSYS__
-
}
--- 147,150 ----
Index: path.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/path.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** path.cc 13 May 2002 13:46:19 -0000 1.14
--- path.cc 13 Jun 2002 21:54:21 -0000 1.15
***************
*** 52,55 ****
--- 52,59 ----
#endif
+ #ifndef NO_SYMLINK
+ # define NO_SYMLINK 1
+ #endif
+
#include "winsup.h"
#include <stdio.h>
***************
*** 2292,2295 ****
--- 2296,2305 ----
symlink (const char *topath, const char *frompath)
{
+ #if NO_SYMLINK
+ int res;
+ debug_printf("symlink (%s, %s)", topath, frompath);
+ res = msys_symlink (frompath, topath);
+ return res;
+ #else
HANDLE h;
int res = -1;
***************
*** 2364,2369 ****
if (allow_ntsec && win32_path.has_acls ())
! set_security_attribute (S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO,
! &sa, alloca (4096), 4096);
h = CreateFileA(win32_path, GENERIC_WRITE, 0, &sa,
--- 2374,2381 ----
if (allow_ntsec && win32_path.has_acls ())
! {
! set_security_attribute (S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO,
! &sa, (new void [4096]), 4096);
! }
h = CreateFileA(win32_path, GENERIC_WRITE, 0, &sa,
***************
*** 2434,2437 ****
--- 2446,2450 ----
syscall_printf ("%d = symlink (%s, %s)", res, topath, frompath);
return res;
+ #endif //NO_SYMLINK
}
***************
*** 2786,2790 ****
if (name[1] == ':')
{
! char *nn, *newname = (char *) alloca (strlen (name) + 2);
nn = newname;
*nn = isupper (*name) ? cyg_tolower (*name) : *name;
--- 2799,2803 ----
if (name[1] == ':')
{
! char *nn, *newname = new char [(strlen (name) + 2)];
nn = newname;
*nn = isupper (*name) ? cyg_tolower (*name) : *name;
***************
*** 2795,2798 ****
--- 2808,2812 ----
strcpy (++nn, name);
name = newname;
+ delete[] newname;
goto hashit;
}
***************
*** 2976,2979 ****
--- 2990,2994 ----
}
+ #if 0
static bool
QuotedRelativePath (const char *Path)
***************
*** 2995,2998 ****
--- 3010,3014 ----
}
}
+ #endif
/******************** Exported Path Routines *********************/
***************
*** 3009,3024 ****
char *sptr;
char * sspath;
! char *swin32_path = (char *)malloc (MAX_PATH);
int swin32_pathlen;
// retpath will be what sets win32_path before exiting.
! char *retpath = (char *)malloc (MAX_PATH);
int retpath_len = 0;
! int retpath_buflen = MAX_PATH;
int sret;
int retval = 0;
#define retpathcat(retstr) \
! swin32_pathlen = strlen (swin32_path); \
! if (retpath_buflen < retpath_len + swin32_pathlen) \
{ \
retpath_buflen += MAX_PATH; \
--- 3025,3039 ----
char *sptr;
char * sspath;
! char *swin32_path = new char [MAX_PATH*4];
int swin32_pathlen;
// retpath will be what sets win32_path before exiting.
! char *retpath = new char [MAX_PATH*4];
int retpath_len = 0;
! int retpath_buflen = MAX_PATH*4;
int sret;
int retval = 0;
#define retpathcat(retstr) \
! if (retpath_buflen <= retpath_len) \
{ \
retpath_buflen += MAX_PATH; \
***************
*** 3026,3037 ****
} \
strcat (retpath, retstr); \
! retpath_len += strlen(retstr); \
! debug_printf("retpath = %s", retpath);
#define retpathcpy(retstr) \
- swin32_pathlen = strlen (swin32_path); \
retpath_len = 0; \
*retpath = '\0'; \
! if (retpath_buflen < retpath_len + swin32_pathlen) \
{ \
retpath_buflen += MAX_PATH; \
--- 3041,3050 ----
} \
strcat (retpath, retstr); \
! retpath_len += strlen(retstr);
#define retpathcpy(retstr) \
retpath_len = 0; \
*retpath = '\0'; \
! if (retpath_buflen <= retpath_len ) \
{ \
retpath_buflen += MAX_PATH; \
***************
*** 3039,3046 ****
} \
strcpy (retpath, retstr); \
! retpath_len += strlen(retstr); \
! debug_printf("retpath = %s", retpath);
debug_printf("cygwin_conv_to_win32_path (%s, ...)", path);
switch (spath[1])
--- 3052,3068 ----
} \
strcpy (retpath, retstr); \
! retpath_len += strlen(retstr);
!
! if (!path || !*path)
! {
! *win32_path = '\0';
! return -1;
! }
+ *win32_path = '\0';
+
+ #if DEBUGGING
debug_printf("cygwin_conv_to_win32_path (%s, ...)", path);
+ #endif
switch (spath[1])
***************
*** 3167,3171 ****
--- 3189,3195 ----
if (*sspath == '/')
{
+ #if DEBUGGING
debug_printf("spath = %s", spath);
+ #endif
sret = cygwin_conv_to_win32_path (sspath, swin32_path);
if (sret)
***************
*** 3231,3234 ****
--- 3255,3259 ----
}
strcpy (win32_path, retpath);
+ delete[] swin32_path;
*retpath = '\0';
retpath_len = 0;
***************
*** 3514,3518 ****
--- 3539,3545 ----
__seterrno ();
lock->release ();
+ #if DEBUGGING
debug_printf ("get_initial_cwd failed, %E");
+ #endif
lock->release ();
return 0;
***************
*** 3596,3600 ****
{
if (!buf)
! buf = (char *) malloc (strlen (tocopy) + 1);
strcpy (buf, tocopy);
if (!buf[0]) /* Should only happen when chroot */
--- 3623,3627 ----
{
if (!buf)
! buf = new char [(strlen (tocopy) + 1)];
strcpy (buf, tocopy);
if (!buf[0]) /* Should only happen when chroot */
Index: path.h
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/path.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** path.h 24 Apr 2002 12:47:53 -0000 1.4
--- path.h 13 Jun 2002 21:54:21 -0000 1.5
***************
*** 198,200 ****
--- 198,202 ----
int lnk_match () {return nextstate >= SCAN_EXTRALNK;}
};
+
+ extern "C" int msys_symlink(const char *, const char *);
#endif /* PATH_H */
Index: poll.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/poll.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** poll.cc 15 Oct 2001 22:22:33 -0000 1.2
--- poll.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 35,42 ****
size_t fds_size = howmany(max_fd + 1, NFDBITS) * sizeof (fd_mask);
! open_fds = (fd_set *) alloca (fds_size);
! read_fds = (fd_set *) alloca (fds_size);
! write_fds = (fd_set *) alloca (fds_size);
! except_fds = (fd_set *) alloca (fds_size);
if (!open_fds || !read_fds || !write_fds || !except_fds)
--- 35,42 ----
size_t fds_size = howmany(max_fd + 1, NFDBITS) * sizeof (fd_mask);
! open_fds = new fd_set [fds_size];
! read_fds = new fd_set [fds_size];
! write_fds = new fd_set [fds_size];
! except_fds = new fd_set [fds_size];
if (!open_fds || !read_fds || !write_fds || !except_fds)
Index: registry.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/registry.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** registry.cc 15 Oct 2001 22:22:33 -0000 1.2
--- registry.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 54,98 ****
reg_key::build_reg (HKEY top, REGSAM access, va_list av)
{
- #if __MSYS__
set_errno(ENOSYS);
- #else /* !__MSYS__ */
- char *name;
- HKEY r = top;
- key_is_invalid = 0;
-
- /* FIXME: Most of the time a valid mount area should exist. Perhaps
- we should just try an open of the correct key first and only resort
- to this method in the unlikely situation that it's the first time
- the current mount areas are being used. */
-
- while ((name = va_arg (av, char *)) != NULL)
- {
- DWORD disp;
- int res = RegCreateKeyExA (r,
- name,
- 0,
- cygnus_class,
- REG_OPTION_NON_VOLATILE,
- access,
- &sec_none_nih,
- &key,
- &disp);
- if (r != top)
- RegCloseKey (r);
- r = key;
- if (res != ERROR_SUCCESS)
- {
- key_is_invalid = res;
- debug_printf ("failed to create key %s in the registry", name);
- break;
- }
-
- /* If we're considering the mounts key, check if it had to
- be created and set had_to_create appropriately. */
- if (strcmp (name, CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME) == 0)
- if (disp == REG_CREATED_NEW_KEY)
- mount_table->had_to_create_mount_areas++;
- }
- #endif /* !__MSYS__ */
}
--- 54,58 ----
Index: select.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/select.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** select.cc 15 Oct 2001 22:22:33 -0000 1.2
--- select.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 81,85 ****
bzero ((caddr_t)(p), sizeof_fd_set ((n)))
! #define allocfd_set(n) ((fd_set *) memset (alloca (sizeof_fd_set (n)), 0, sizeof_fd_set (n)))
#define copyfd_set(to, from, n) memcpy (to, from, sizeof_fd_set (n));
--- 81,85 ----
bzero ((caddr_t)(p), sizeof_fd_set ((n)))
! #define allocfd_set(n) ((fd_set *) memset ((new fd_set [(sizeof_fd_set (n))]), 0, sizeof_fd_set (n)))
#define copyfd_set(to, from, n) memcpy (to, from, sizeof_fd_set (n));
Index: shared.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/shared.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** shared.cc 15 Oct 2001 22:22:33 -0000 1.2
--- shared.cc 13 Jun 2002 21:54:21 -0000 1.3
***************
*** 26,29 ****
--- 26,30 ----
#include "registry.h"
#include "cygwin_version.h"
+ #include "msys.h"
#define SHAREDVER (unsigned)(cygwin_version.api_major << 16 | \
***************
*** 44,50 ****
{
static NO_COPY char buf[MAX_PATH] = {0};
extern bool _cygwin_testing;
! __small_sprintf (buf, "%s.%s.%d", cygwin_version.shared_id, str, num);
if (!_cygwin_testing)
strcat (buf, cygwin_version.dll_build_date);
--- 45,57 ----
{
static NO_COPY char buf[MAX_PATH] = {0};
+ static NO_COPY char buf2[MAX_PATH] = {0};
extern bool _cygwin_testing;
! //FIXME: This should be based on where the DLL actually is located.
! AbsDllPath("msys-1.0.dll", buf2, MAX_PATH);
! strcpy(buf2, &buf2[3]);
! *(strchr(buf2, '\\')) = '\0';
! debug_printf("buf2 = %s", buf2);
! __small_sprintf (buf, "%s.%s.%s.%d", buf2, cygwin_version.shared_id, str, num);
if (!_cygwin_testing)
strcat (buf, cygwin_version.dll_build_date);
***************
*** 192,198 ****
heap_chunk_in_mb = reg.get_int ("heap_chunk_in_mb", 256);
! if (heap_chunk_in_mb < 4)
{
! heap_chunk_in_mb = 4;
reg.set_int ("heap_chunk_in_mb", heap_chunk_in_mb);
}
--- 199,205 ----
heap_chunk_in_mb = reg.get_int ("heap_chunk_in_mb", 256);
! if (heap_chunk_in_mb < 6)
{
! heap_chunk_in_mb = 6;
reg.set_int ("heap_chunk_in_mb", heap_chunk_in_mb);
}
Index: spawn.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/spawn.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** spawn.cc 24 Apr 2002 12:47:53 -0000 1.7
--- spawn.cc 13 Jun 2002 21:54:21 -0000 1.8
***************
*** 300,303 ****
--- 300,307 ----
pid_t cygpid;
sigframe thisframe (mainthread);
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
MALLOC_CHECK;
***************
*** 611,615 ****
envblock = NULL;
else
! envblock = winenv (envp, 0);
/* Preallocated buffer for `sec_user' call */
--- 615,672 ----
envblock = NULL;
else
! {
! envblock = winenv (envp, 0);
! char *envblockn = envblock;
! int envblockcnt;
! envblockcnt = 0;
! debug_printf("envblockn");
! while (*envblockn)
! {
! envblockcnt++;
! debug_printf("%s", envblockn);
! envblockn = strchr(envblockn, '\0') + 1;
! }
! char **envblockarg = new char *[envblockcnt + 1], *tptr, *wpath;
! int envblocknlen, envblockarglen = 0;
! envblockn = envblock;
! for (int i=0;i < envblockcnt;i++)
! {
! envblocknlen = strlen(envblockn);
! envblockarg[i] = new char [envblocknlen + MAX_PATH];
! memset (envblockarg[i], 0, envblocknlen + MAX_PATH);
! wpath = new char [envblocknlen + MAX_PATH];
! memset (wpath, 0, envblocknlen + MAX_PATH);
! if ((tptr = strchr(envblockn, '=')))
! {
! tptr++;
! strncpy (envblockarg[i], envblockn, tptr - envblockn);
! if (*tptr == '/')
! {
! cygwin_conv_to_win32_path (tptr, wpath);
! strcat(envblockarg[i], wpath);
! }
! else
! {
! strcat(envblockarg[i], tptr);
! }
! }
! debug_printf("%s", envblockarg[i]);
! envblockarglen += strlen(envblockarg[i]) + 1;
! envblockn = strchr (envblockn, '\0') + 1;
! delete[] wpath;
! }
! delete[] envblock;
! envblock = new char [envblockarglen + 1];
! tptr = envblock;
! for (int i=0;i < envblockcnt;i++)
! {
! envblocknlen = strlen (envblockarg[i]) + 1;
! memcpy (tptr, envblockarg[i], envblocknlen);
! tptr += envblocknlen;
! delete[] envblockarg[i];
! }
! *++tptr = '\0';
! delete[] envblockarg;
! }
/* Preallocated buffer for `sec_user' call */
***************
*** 714,719 ****
MALLOC_CHECK;
! if (envblock)
! free (envblock);
cygheap_setup_for_child_cleanup (&ciresrv);
MALLOC_CHECK;
--- 771,775 ----
MALLOC_CHECK;
! delete[] envblock;
cygheap_setup_for_child_cleanup (&ciresrv);
MALLOC_CHECK;
***************
*** 912,915 ****
--- 968,975 ----
int ret;
vfork_save *vf = vfork_storage.val ();
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
if (vf != NULL && (vf->pid < 0) && mode == _P_OVERLAY)
***************
*** 968,972 ****
--- 1028,1037 ----
do
+ {
argv[i] = va_arg (args, const char *);
+ #if DEBUGGING
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
+ }
while (argv[i++] != NULL);
***************
*** 989,993 ****
do
! argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
--- 1054,1063 ----
do
! {
! argv[i] = va_arg (args, const char *);
! #if DEBUGGING
! debug_printf("argv[%d] = %s", i, argv[i]);
! #endif
! }
while (argv[i++] != NULL);
***************
*** 1011,1015 ****
--- 1081,1090 ----
do
+ {
argv[i] = va_arg (args, const char *);
+ #if DEBUGGING
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
+ }
while (argv[i++] != NULL);
***************
*** 1032,1036 ****
do
! argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
--- 1107,1116 ----
do
! {
! argv[i] = va_arg (args, const char *);
! #if DEBUGGING
! debug_printf("argv[%d] = %s", i, argv[i]);
! #endif
! }
while (argv[i++] != NULL);
***************
*** 1044,1047 ****
--- 1124,1131 ----
spawnv (int mode, const char *path, const char * const *argv)
{
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return _spawnve (NULL, mode, path, argv, cur_environ ());
}
***************
*** 1051,1054 ****
--- 1135,1142 ----
const char * const *envp)
{
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return _spawnve (NULL, mode, path, argv, envp);
}
***************
*** 1057,1060 ****
--- 1145,1152 ----
spawnvp (int mode, const char *path, const char * const *argv)
{
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return spawnvpe (mode, path, argv, cur_environ ());
}
***************
*** 1065,1068 ****
--- 1157,1164 ----
{
path_conv buf;
+ #if DEBUGGING
+ for (int i=0;argv[i];i++)
+ debug_printf("argv[%d] = %s", i, argv[i]);
+ #endif
return _spawnve (NULL, mode, find_exec (file, buf), argv, envp);
}
Index: syscalls.cc
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/syscalls.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** syscalls.cc 17 Mar 2002 15:43:08 -0000 1.4
--- syscalls.cc 13 Jun 2002 21:54:21 -0000 1.5
***************
*** 1493,1497 ****
return 0;
! char *root = rootdir (strcpy ((char *)alloca (strlen (fname)), fname));
if (!allow_smbntsec
--- 1493,1497 ----
return 0;
! char *root = rootdir (strcpy (new char [(strlen (fname))], fname));
if (!allow_smbntsec
Index: winsup.h
===================================================================
RCS file: /cvsroot/mingw/msys/rt/src/winsup/cygwin/winsup.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** winsup.h 4 Feb 2002 15:35:29 -0000 1.5
--- winsup.h 13 Jun 2002 21:54:21 -0000 1.6
***************
*** 22,27 ****
#define FIXME(FIXNO) debug_printf("%s-%s", "FIXME", (FIXNO))
! static int HMMMcnt = 0;
! #define HMMM(HUM) debug_printf("%s-%d: %s", "HMMM", HMMMcnt++, (HUM))
#define alloca __builtin_alloca
--- 22,26 ----
#define FIXME(FIXNO) debug_printf("%s-%s", "FIXME", (FIXNO))
! #define HMMM(HUM) debug_printf("%s-%d: %s", "HMMM", __LINE__, (HUM))
#define alloca __builtin_alloca
|