On December 10, 2002 08:31 pm, Alexandre Julliard wrote:
Wine internal includes should not be in the include path.
True, but we do need to include the $prefix/include dir, because our headers include "wine/blah.h", and if $prefix is not a standard location (/usr or /usr/local) that will not work.
"Dimitrie O. Paun" dpaun@rogers.com writes:
True, but we do need to include the $prefix/include dir, because our headers include "wine/blah.h", and if $prefix is not a standard location (/usr or /usr/local) that will not work.
I think it's reasonable to require the user to specify an explicit include path if they install Wine in a non-standard directory. This shouldn't be a common case anyway.
On December 10, 2002 09:04 pm, Alexandre Julliard wrote:
I think it's reasonable to require the user to specify an explicit include path if they install Wine in a non-standard directory. This shouldn't be a common case anyway.
Well, this still does not work, because our msvcrt headers have includes like so: #include "msvcrt/wctype.h" and these fail miserably because msvcrt is not in the path.
I think we should install msvcrt at the same level as wine (as in my original proposal), the chances of a conflict are virtually NULL.
Either way, we need to fix this somehow.
"Dimitrie O. Paun" dpaun@rogers.com writes:
Either way, we need to fix this somehow.
IMO our headers should be fixed, they shouldn't have the msvcrt prefix.
On December 12, 2002 02:07 pm, Alexandre Julliard wrote:
IMO our headers should be fixed, they shouldn't have the msvcrt prefix.
Fine. What about this:
include/windows.h:#include "msvcrt/excpt.h"
I have a patch removing the msvcrt/ prefix from the msvcrt/*.h files, but in Wine it's a bit tricky as we want to use some msvcrt, and libc.
We can do this:
#ifndef __WINE__ # include <excpt.h> #endif
And in the Wine source where we need excpt.h we simply make sure we do #include <msvcrt/excpt.h>
Comments?
"Dimitrie O. Paun" dpaun@rogers.com writes:
And in the Wine source where we need excpt.h we simply make sure we do #include <msvcrt/excpt.h>
Comments?
Actually there is no excpt.h in the standard unix includes, so it doesn't need to be in msvcrt/, it can be moved with the normal includes.
On December 12, 2002 03:24 pm, Alexandre Julliard wrote:
Actually there is no excpt.h in the standard unix includes, so it doesn't need to be in msvcrt/, it can be moved with the normal includes.
Do
patch -p0 < excpt.diff cp include/msvcrt/excpt.h include/excpt.h cvs rm -f include/msvcrt/excpt.h cvs add include/excpt.h
ChangeLog Move excpt.h out of include/msvcrt/ as it does not conflict with any standard Unix header.
Index: dlls/kernel/computername.c =================================================================== RCS file: /var/cvs/wine/dlls/kernel/computername.c,v retrieving revision 1.4 diff -u -r1.4 computername.c --- dlls/kernel/computername.c 27 Nov 2002 21:38:06 -0000 1.4 +++ dlls/kernel/computername.c 12 Dec 2002 20:55:50 -0000 @@ -38,7 +38,7 @@ #include "winternl.h" #include "wine/unicode.h" #include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/debug.h" #include "file.h"
Index: dlls/kernel/console.c =================================================================== RCS file: /var/cvs/wine/dlls/kernel/console.c,v retrieving revision 1.11 diff -u -r1.11 console.c --- dlls/kernel/console.c 21 Nov 2002 23:45:31 -0000 1.11 +++ dlls/kernel/console.c 12 Dec 2002 20:55:50 -0000 @@ -46,7 +46,7 @@ #include "wine/exception.h" #include "wine/unicode.h" #include "wine/debug.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "console_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(console); Index: dlls/msvcrt/cppexcept.c =================================================================== RCS file: /var/cvs/wine/dlls/msvcrt/cppexcept.c,v retrieving revision 1.4 diff -u -r1.4 cppexcept.c --- dlls/msvcrt/cppexcept.c 1 Nov 2002 01:50:51 -0000 1.4 +++ dlls/msvcrt/cppexcept.c 12 Dec 2002 21:03:34 -0000 @@ -29,7 +29,7 @@ #include "winternl.h" #include "msvcrt.h" #include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(seh); Index: dlls/msvcrt/except.c =================================================================== RCS file: /var/cvs/wine/dlls/msvcrt/except.c,v retrieving revision 1.22 diff -u -r1.22 except.c --- dlls/msvcrt/except.c 1 Nov 2002 01:50:51 -0000 1.22 +++ dlls/msvcrt/except.c 12 Dec 2002 21:03:21 -0000 @@ -34,7 +34,7 @@ #include "msvcrt.h"
#include "msvcrt/setjmp.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
#include "wine/debug.h" Index: dlls/ntdll/debugtools.c =================================================================== RCS file: /var/cvs/wine/dlls/ntdll/debugtools.c,v retrieving revision 1.25 diff -u -r1.25 debugtools.c --- dlls/ntdll/debugtools.c 13 Nov 2002 19:38:17 -0000 1.25 +++ dlls/ntdll/debugtools.c 12 Dec 2002 20:55:51 -0000 @@ -41,7 +41,7 @@ #include "winbase.h" #include "winnt.h" #include "winternl.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DECLARE_DEBUG_CHANNEL(tid);
Index: dlls/ntdll/exception.c =================================================================== RCS file: /var/cvs/wine/dlls/ntdll/exception.c,v retrieving revision 1.50 diff -u -r1.50 exception.c --- dlls/ntdll/exception.c 10 Dec 2002 22:56:45 -0000 1.50 +++ dlls/ntdll/exception.c 12 Dec 2002 20:55:51 -0000 @@ -33,7 +33,7 @@ #include "miscemu.h" #include "wine/server.h" #include "wine/debug.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(seh);
Index: dlls/ntdll/loader.c =================================================================== RCS file: /var/cvs/wine/dlls/ntdll/loader.c,v retrieving revision 1.7 diff -u -r1.7 loader.c --- dlls/ntdll/loader.c 12 Sep 2002 22:07:03 -0000 1.7 +++ dlls/ntdll/loader.c 12 Dec 2002 20:55:52 -0000 @@ -22,7 +22,7 @@
#include "module.h" #include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll); Index: dlls/ntdll/sec.c =================================================================== RCS file: /var/cvs/wine/dlls/ntdll/sec.c,v retrieving revision 1.31 diff -u -r1.31 sec.c --- dlls/ntdll/sec.c 5 Dec 2002 19:56:16 -0000 1.31 +++ dlls/ntdll/sec.c 12 Dec 2002 20:55:51 -0000 @@ -42,7 +42,7 @@ #include "winternl.h" #include "winreg.h" #include "ntdll_misc.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
Index: dlls/user/lstr.c =================================================================== RCS file: /var/cvs/wine/dlls/user/lstr.c,v retrieving revision 1.24 diff -u -r1.24 lstr.c --- dlls/user/lstr.c 15 Oct 2002 21:00:06 -0000 1.24 +++ dlls/user/lstr.c 12 Dec 2002 20:55:54 -0000 @@ -36,7 +36,7 @@ #include "wine/winbase16.h" #include "wine/winuser16.h"
-#include "msvcrt/excpt.h" +#include "excpt.h"
#include "wine/debug.h"
Index: dlls/winedos/dosvm.c =================================================================== RCS file: /var/cvs/wine/dlls/winedos/dosvm.c,v retrieving revision 1.31 diff -u -r1.31 dosvm.c --- dlls/winedos/dosvm.c 2 Dec 2002 21:39:58 -0000 1.31 +++ dlls/winedos/dosvm.c 12 Dec 2002 20:55:55 -0000 @@ -52,7 +52,7 @@ #include "dosvm.h" #include "stackframe.h" #include "wine/debug.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(int); WINE_DECLARE_DEBUG_CHANNEL(module); Index: dlls/wininet/internet.c =================================================================== RCS file: /var/cvs/wine/dlls/wininet/internet.c,v retrieving revision 1.47 diff -u -r1.47 internet.c --- dlls/wininet/internet.c 5 Dec 2002 19:54:40 -0000 1.47 +++ dlls/wininet/internet.c 12 Dec 2002 20:55:56 -0000 @@ -54,7 +54,7 @@ #include "shlwapi.h"
#include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
#include "internet.h"
Index: files/dos_fs.c =================================================================== RCS file: /var/cvs/wine/files/dos_fs.c,v retrieving revision 1.125 diff -u -r1.125 dos_fs.c --- files/dos_fs.c 11 Dec 2002 00:19:56 -0000 1.125 +++ files/dos_fs.c 12 Dec 2002 20:55:57 -0000 @@ -52,7 +52,7 @@ #include "msdos.h" #include "winternl.h" #include "wine/server.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
#include "smb.h"
Index: include/windows.h =================================================================== RCS file: /var/cvs/wine/include/windows.h,v retrieving revision 1.55 diff -u -r1.55 windows.h --- include/windows.h 23 Oct 2002 20:16:23 -0000 1.55 +++ include/windows.h 12 Dec 2002 20:55:59 -0000 @@ -33,7 +33,7 @@ #else /* RC_INVOKED && !NOWINRES */
/* All the basic includes */ -#include "msvcrt/excpt.h" +#include "excpt.h" #include "windef.h" #include "winbase.h" #include "wingdi.h" Index: loader/resource.c =================================================================== RCS file: /var/cvs/wine/loader/resource.c,v retrieving revision 1.64 diff -u -r1.64 resource.c --- loader/resource.c 21 Nov 2002 03:45:02 -0000 1.64 +++ loader/resource.c 12 Dec 2002 20:55:59 -0000 @@ -42,7 +42,7 @@ #include "wine/debug.h" #include "winerror.h" #include "winnls.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(resource);
Index: loader/ne/module.c =================================================================== RCS file: /var/cvs/wine/loader/ne/module.c,v retrieving revision 1.124 diff -u -r1.124 module.c --- loader/ne/module.c 21 Nov 2002 03:45:02 -0000 1.124 +++ loader/ne/module.c 12 Dec 2002 20:55:59 -0000 @@ -42,7 +42,7 @@ #include "snoop.h" #include "builtin16.h" #include "stackframe.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/exception.h" #include "wine/debug.h"
Index: memory/global.c =================================================================== RCS file: /var/cvs/wine/memory/global.c,v retrieving revision 1.72 diff -u -r1.72 global.c --- memory/global.c 21 Nov 2002 03:45:02 -0000 1.72 +++ memory/global.c 12 Dec 2002 20:55:59 -0000 @@ -47,7 +47,7 @@ #include "module.h" #include "wine/debug.h" #include "winerror.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(global);
Index: memory/string.c =================================================================== RCS file: /var/cvs/wine/memory/string.c,v retrieving revision 1.44 diff -u -r1.44 string.c --- memory/string.c 16 Aug 2002 20:00:48 -0000 1.44 +++ memory/string.c 12 Dec 2002 20:55:59 -0000 @@ -29,7 +29,7 @@ #include "wine/unicode.h" #include "winerror.h" #include "winnls.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(string); Index: memory/virtual.c =================================================================== RCS file: /var/cvs/wine/memory/virtual.c,v retrieving revision 1.88 diff -u -r1.88 virtual.c --- memory/virtual.c 4 Nov 2002 22:43:24 -0000 1.88 +++ memory/virtual.c 12 Dec 2002 20:55:59 -0000 @@ -34,7 +34,7 @@ #include "winternl.h" #include "winerror.h" #include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(virtual); Index: programs/winedbg/dbg.y =================================================================== RCS file: /var/cvs/wine/programs/winedbg/dbg.y,v retrieving revision 1.2 diff -u -r1.2 dbg.y --- programs/winedbg/dbg.y 16 Sep 2002 19:26:48 -0000 1.2 +++ programs/winedbg/dbg.y 12 Dec 2002 21:05:29 -0000 @@ -32,7 +32,7 @@ #include "wine/exception.h" #include "debugger.h" #include "expr.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
static void mode_command(int); int yylex(void); Index: programs/winedbg/winedbg.c =================================================================== RCS file: /var/cvs/wine/programs/winedbg/winedbg.c,v retrieving revision 1.2 diff -u -r1.2 winedbg.c --- programs/winedbg/winedbg.c 28 Oct 2002 23:56:58 -0000 1.2 +++ programs/winedbg/winedbg.c 12 Dec 2002 20:56:00 -0000 @@ -31,7 +31,7 @@ #include "winreg.h" #include "wingdi.h" #include "winuser.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/library.h"
DBG_PROCESS* DEBUG_CurrProcess = NULL; Index: relay32/snoop.c =================================================================== RCS file: /var/cvs/wine/relay32/snoop.c,v retrieving revision 1.59 diff -u -r1.59 snoop.c --- relay32/snoop.c 21 Nov 2002 03:45:02 -0000 1.59 +++ relay32/snoop.c 12 Dec 2002 20:56:00 -0000 @@ -31,7 +31,7 @@ #include "stackframe.h" #include "wine/debug.h" #include "wine/exception.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(snoop);
Index: win32/except.c =================================================================== RCS file: /var/cvs/wine/win32/except.c,v retrieving revision 1.62 diff -u -r1.62 except.c --- win32/except.c 21 Nov 2002 03:45:01 -0000 1.62 +++ win32/except.c 12 Dec 2002 20:56:02 -0000 @@ -48,7 +48,7 @@ #include "wine/library.h" #include "thread.h" #include "stackframe.h" -#include "msvcrt/excpt.h" +#include "excpt.h" #include "wine/server.h" #include "wine/unicode.h" #include "wine/debug.h" Index: windows/cursoricon.c =================================================================== RCS file: /var/cvs/wine/windows/cursoricon.c,v retrieving revision 1.61 diff -u -r1.61 cursoricon.c --- windows/cursoricon.c 3 Dec 2002 23:34:53 -0000 1.61 +++ windows/cursoricon.c 12 Dec 2002 20:56:03 -0000 @@ -59,7 +59,7 @@ #include "user.h" #include "message.h" #include "winerror.h" -#include "msvcrt/excpt.h" +#include "excpt.h"
WINE_DEFAULT_DEBUG_CHANNEL(cursor); WINE_DECLARE_DEBUG_CHANNEL(icon);
On 12 Dec 2002, Alexandre Julliard wrote: [...]
Actually there is no excpt.h in the standard unix includes, so it doesn't need to be in msvcrt/, it can be moved with the normal includes.
I'm not sure it's a good idea to mix the MSVCRT headers with the others. Sure there is no excpt.h header in the standard Unix headers. But there are many headers we cannot move: malloc.h, stdlib.h, string.h, etc. So we'll end up with some headers (conio.h, crtdbg.h, io.h) mixed in with the regular Wine headers, and some others which will be kept separate. Then there is the case of headers such as direct.h that exist on some Unix platforms and not on others.
Then, what happens if a header similar to excpt.h includes a header such as stdlib.h. It will only work with msvcrt's stdlib.h thus causing trouble if the user is using the regular C library headers instead.
So I'm not convinved that moving excpt.h is any better or cleaner than leaving it in the msvcrt directory.
Francois Gouget fgouget@free.fr writes:
Then, what happens if a header similar to excpt.h includes a header such as stdlib.h. It will only work with msvcrt's stdlib.h thus causing trouble if the user is using the regular C library headers instead.
I don't see why it would only work with msvcrt, and if so it should be fixed. People should be able to choose between using the msvcrt headers or the standard Unix ones; if headers that don't exist on Unix are in msvcrt it forces everybody to use msvcrt headers. Now there may well be Windows-only headers like io.h that don't make sense outside of msvcrt, but I certainly don't see any reason to not use excpt.h along with the Unix headers.