Adding __WINE_USE_MSVCRT
Francois Gouget
fgouget at free.fr
Sun Oct 21 21:11:40 CDT 2001
This patch adds a macro, __WINE_USE_MSVCRT, in all the MSVCRT headers
so that one can test whether they (the MSVCRT headers) are being used or
not.
This is used in the winsock patch I am about to send to determine how
to handle the u_char, u_short & co types: if MSVCRT is used then they
are not defined and winsock.h should declare them; otherwise we should
get them from the Unix headers.
Changelog:
* include/msvcrt/conio.h,
include/msvcrt/crtdbg.h,
include/msvcrt/ctype.h,
include/msvcrt/direct.h,
include/msvcrt/dos.h,
include/msvcrt/eh.h,
include/msvcrt/fcntl.h,
include/msvcrt/io.h,
include/msvcrt/locale.h,
include/msvcrt/malloc.h,
include/msvcrt/process.h,
include/msvcrt/search.h,
include/msvcrt/stddef.h,
include/msvcrt/stdio.h,
include/msvcrt/stdlib.h,
include/msvcrt/string.h,
include/msvcrt/time.h,
include/msvcrt/wchar.h,
include/msvcrt/wctype.h,
include/msvcrt/sys/stat.h,
include/msvcrt/sys/timeb.h,
include/msvcrt/sys/types.h,
include/msvcrt/sys/utime.h
Added __WINE_USE_MSVCRT
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Stolen from an Internet user:
"f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng !"
-------------- next part --------------
Index: include/msvcrt/conio.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/conio.h,v
retrieving revision 1.1
diff -u -r1.1 conio.h
--- include/msvcrt/conio.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/conio.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_CONIO_H
#define __WINE_CONIO_H
+#define __WINE_USE_MSVCRT
#ifdef __cplusplus
Index: include/msvcrt/crtdbg.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/crtdbg.h,v
retrieving revision 1.1
diff -u -r1.1 crtdbg.h
--- include/msvcrt/crtdbg.h 2001/04/23 18:19:27 1.1
+++ include/msvcrt/crtdbg.h 2001/10/21 23:42:45
@@ -5,12 +5,13 @@
*/
#ifndef __WINE_CRTDBG_H_
#define __WINE_CRTDBG_H_
+#define __WINE_USE_MSVCRT
+
/* The debug API is not implemented in Winelib.
* Redirect everything to the regular APIs.
*/
-
#define _CRT_WARN 0
#define _CRT_ERROR 1
#define _CRT_ASSERT 2
Index: include/msvcrt/ctype.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/ctype.h,v
retrieving revision 1.1
diff -u -r1.1 ctype.h
--- include/msvcrt/ctype.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/ctype.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_CTYPE_H
#define __WINE_CTYPE_H
+#define __WINE_USE_MSVCRT
#include "msvcrt/wctype.h"
Index: include/msvcrt/direct.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/direct.h,v
retrieving revision 1.1
diff -u -r1.1 direct.h
--- include/msvcrt/direct.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/direct.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_DIRECT_H
#define __WINE_DIRECT_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
#include "msvcrt/dos.h" /* For _getdiskfree & co */
Index: include/msvcrt/dos.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/dos.h,v
retrieving revision 1.1
diff -u -r1.1 dos.h
--- include/msvcrt/dos.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/dos.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_DOS_H
#define __WINE_DOS_H
+#define __WINE_USE_MSVCRT
/* The following are also defined in io.h */
Index: include/msvcrt/eh.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/eh.h,v
retrieving revision 1.1
diff -u -r1.1 eh.h
--- include/msvcrt/eh.h 2001/05/31 21:32:53 1.1
+++ include/msvcrt/eh.h 2001/10/21 23:42:45
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_EH_H
#define __WINE_EH_H
+#define __WINE_USE_MSVCRT
#if !defined(__cplusplus) && !defined(__WINE__)
#error "eh.h is meant only for C++ applications"
Index: include/msvcrt/fcntl.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/fcntl.h,v
retrieving revision 1.1
diff -u -r1.1 fcntl.h
--- include/msvcrt/fcntl.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/fcntl.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_FCNTL_H
#define __WINE_FCNTL_H
+#define __WINE_USE_MSVCRT
#define _O_RDONLY 0
Index: include/msvcrt/io.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/io.h,v
retrieving revision 1.1
diff -u -r1.1 io.h
--- include/msvcrt/io.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/io.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_IO_H
#define __WINE_IO_H
+#define __WINE_USE_MSVCRT
#include "msvcrt/stdio.h" /* For FILENAME_MAX */
#include "msvcrt/sys/types.h" /* For time_t */
Index: include/msvcrt/locale.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/locale.h,v
retrieving revision 1.1
diff -u -r1.1 locale.h
--- include/msvcrt/locale.h 2001/09/19 20:29:33 1.1
+++ include/msvcrt/locale.h 2001/10/21 23:42:45
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_LOCALE_H
#define __WINE_LOCALE_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
Index: include/msvcrt/malloc.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/malloc.h,v
retrieving revision 1.1
diff -u -r1.1 malloc.h
--- include/msvcrt/malloc.h 2001/04/23 18:20:55 1.1
+++ include/msvcrt/malloc.h 2001/10/21 23:42:45
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_MALLOC_H
#define __WINE_MALLOC_H
+#define __WINE_USE_MSVCRT
#ifdef USE_MSVCRT_PREFIX
#define MSVCRT(x) MSVCRT_##x
Index: include/msvcrt/process.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/process.h,v
retrieving revision 1.2
diff -u -r1.2 process.h
--- include/msvcrt/process.h 2001/06/19 03:46:27 1.2
+++ include/msvcrt/process.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_PROCESS_H
#define __WINE_PROCESS_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
Index: include/msvcrt/search.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/search.h,v
retrieving revision 1.1
diff -u -r1.1 search.h
--- include/msvcrt/search.h 2001/04/23 18:20:55 1.1
+++ include/msvcrt/search.h 2001/10/21 23:42:45
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_SEARCH_H
#define __WINE_SEARCH_H
+#define __WINE_USE_MSVCRT
#ifdef USE_MSVCRT_PREFIX
#define MSVCRT(x) MSVCRT_##x
Index: include/msvcrt/stddef.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/stddef.h,v
retrieving revision 1.2
diff -u -r1.2 stddef.h
--- include/msvcrt/stddef.h 2001/04/23 18:22:05 1.2
+++ include/msvcrt/stddef.h 2001/10/21 23:42:45
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_STDDEF_H
#define __WINE_STDDEF_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
Index: include/msvcrt/stdio.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/stdio.h,v
retrieving revision 1.3
diff -u -r1.3 stdio.h
--- include/msvcrt/stdio.h 2001/10/15 17:50:55 1.3
+++ include/msvcrt/stdio.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_STDIO_H
#define __WINE_STDIO_H
+#define __WINE_USE_MSVCRT
#ifndef RC_INVOKED
#include <stdarg.h>
Index: include/msvcrt/stdlib.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/stdlib.h,v
retrieving revision 1.3
diff -u -r1.3 stdlib.h
--- include/msvcrt/stdlib.h 2001/04/24 23:16:39 1.3
+++ include/msvcrt/stdlib.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_STDLIB_H
#define __WINE_STDLIB_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
#include "msvcrt/malloc.h" /* For size_t, malloc & co */
Index: include/msvcrt/string.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/string.h,v
retrieving revision 1.2
diff -u -r1.2 string.h
--- include/msvcrt/string.h 2001/07/18 21:04:24 1.2
+++ include/msvcrt/string.h 2001/10/21 23:42:45
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_STRING_H
#define __WINE_STRING_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
Index: include/msvcrt/time.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/time.h,v
retrieving revision 1.1
diff -u -r1.1 time.h
--- include/msvcrt/time.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/time.h 2001/10/21 23:42:46
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_TIME_H
#define __WINE_TIME_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
#include "msvcrt/sys/types.h" /* For time_t */
Index: include/msvcrt/wchar.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/wchar.h,v
retrieving revision 1.2
diff -u -r1.2 wchar.h
--- include/msvcrt/wchar.h 2001/09/19 20:29:33 1.2
+++ include/msvcrt/wchar.h 2001/10/21 23:42:46
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_WCHAR_H
#define __WINE_WCHAR_H
+#define __WINE_USE_MSVCRT
#include "msvcrt/io.h"
#include "msvcrt/locale.h"
Index: include/msvcrt/wctype.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/wctype.h,v
retrieving revision 1.1
diff -u -r1.1 wctype.h
--- include/msvcrt/wctype.h 2001/04/10 23:21:43 1.1
+++ include/msvcrt/wctype.h 2001/10/21 23:42:46
@@ -5,6 +5,8 @@
*/
#ifndef __WINE_WCTYPE_H
#define __WINE_WCTYPE_H
+#define __WINE_USE_MSVCRT
+
/* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get
* there but WCHAR is not defined.
Index: include/msvcrt/sys/stat.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/sys/stat.h,v
retrieving revision 1.2
diff -u -r1.2 stat.h
--- include/msvcrt/sys/stat.h 2001/09/19 20:29:33 1.2
+++ include/msvcrt/sys/stat.h 2001/10/21 23:42:46
@@ -7,6 +7,7 @@
*/
#ifndef __WINE_SYS_STAT_H
#define __WINE_SYS_STAT_H
+#define __WINE_USE_MSVCRT
#include "msvcrt/sys/types.h"
Index: include/msvcrt/sys/timeb.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/sys/timeb.h,v
retrieving revision 1.1
diff -u -r1.1 timeb.h
--- include/msvcrt/sys/timeb.h 2001/04/10 23:21:44 1.1
+++ include/msvcrt/sys/timeb.h 2001/10/21 23:42:46
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_SYS_TIMEB_H
#define __WINE_SYS_TIMEB_H
+#define __WINE_USE_MSVCRT
#include "msvcrt/sys/types.h" /* For time_t */
Index: include/msvcrt/sys/types.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/sys/types.h,v
retrieving revision 1.1
diff -u -r1.1 types.h
--- include/msvcrt/sys/types.h 2001/04/10 23:21:44 1.1
+++ include/msvcrt/sys/types.h 2001/10/21 23:42:46
@@ -5,6 +5,8 @@
*/
#ifndef __WINE_SYS_TYPES_H
#define __WINE_SYS_TYPES_H
+#define __WINE_USE_MSVCRT
+
#ifdef USE_MSVCRT_PREFIX
#define MSVCRT(x) MSVCRT_##x
Index: include/msvcrt/sys/utime.h
===================================================================
RCS file: /home/wine/wine/include/msvcrt/sys/utime.h,v
retrieving revision 1.1
diff -u -r1.1 utime.h
--- include/msvcrt/sys/utime.h 2001/04/10 23:21:44 1.1
+++ include/msvcrt/sys/utime.h 2001/10/21 23:42:46
@@ -5,6 +5,7 @@
*/
#ifndef __WINE_SYS_UTIME_H
#define __WINE_SYS_UTIME_H
+#define __WINE_USE_MSVCRT
#include "winnt.h"
#include "msvcrt/sys/types.h" /* For time_t */
More information about the wine-patches
mailing list