[RFC] io.h friends
Folks, Just as I thought 'fine, I'll add the #ifdef, and get it over with', this thing comes back to haunt me. For the record, I've delete the previous thread, _and_ the io.h patch from my tree, thinking the issue was put to rest. As you can probably guess, I have the io.h problems in wxWindows, simply because this is what I work on right now. Let me state the problem again: -- When you compile with winegcc, you get these macros: __WINE__, __WIN32__, __UNIX__ -- You want your source to compile with the native libc and/or msvcrt -- You want it portable between Wine/MinGW/Cygwin. So, let's say I do: #ifndef __UNIX__ #include io.h #endif Well, this will not work if I want to compile with msvcrt, because __UNIX__ will be defined anyway. So what do I have to test for? I have to define a new symbol (USE_MSVCRT) and test for it #if !defined(__UNIX__) || defined(USE_MSVCRT) #include io.h #endif But this is not all! For example, wxWindows includes stuff like this: #include sys/unistd.h #include sys/stat.h Since they are available in mingw, and cygwin, and in UNIX, but if I want to use msvcrt they conflit with stuff from there! It's a mess. As you can see, the defines alone can make a grown man cry, and this is for a simple include. And I don't even know I've covered all the basis! Problem is that there are already 5 platforms: UNIX, Wine, Cygwin, MinGW, MS. And complexity grows exponentially with the number of platforms and combinations you have to test for. This way lays madness. It is now clear to me why the Cygwin people included io.h. It's so that you can compile with or without the -mno-cygwin switch, and have everything work. The only way for that to happen without ungodly defines and tests, is to have a flat space of include files: a union of MS Unix files. Even if they are empty! This way you can simply do: #include unistd.h #include io.h and you make sure you get the access() definition regardless if you use the msvcrt of the libc. I'm not sure what to do. I was hoping to get a include/cygwin and/or a include/mingw directory so we can deal with these problems. I didn't know mingw had Unix headers as well, this complicates matters. Any fresh ideas in this matter are highly appreciated. -- Dimi.
Re: Help with /?? stuff
Hi Shachar, At 23.59 08/01/2003 +0200, Shachar Shemesh wrote: Hi, I'll clarify my specific predicament. It seems that when MoveFileEx is called with MOVEFILE_DELAY_UNTIL_REBOOT flag, an entry is written into the registry with the file names to rename. Windows being what it is, a MULTI_SZ entry is used in a way that is totally and utterly incopatible with the MULTI_SZ definition, but we'll leave that rant to another time. You can read from the MSDN page (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/movefileex.asp) what is the format used by MoveFileEx. That string is a NULL-separated list of pairs of files, where the first one is the source and the second is the target of the move operation (if the target is missing, the file should be deleted). I guess Wine is converting the NULL into \?? to be able to store it as a string. BTW, do you need any help on this task? Here is an excerpt of the doc: If the dwFlags parameter specifies MOVEFILE_DELAY_UNTIL_REBOOT, MoveFileEx stores the locations of the files to be renamed at restart in the following registry value: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations The function fails if it cannot access the registry. The PendingFileRenameOperations value is of type REG_MULTI_SZ. Each rename operation stores a pair of NULL-terminated strings. The system uses these registry entries to complete the operations at restart in the same order that they were issued. For example, the following code fragment creates registry entries that delete szDstFile and rename szSrcFile to be szDstFile at restart: MoveFileEx(szDstFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); MoveFileEx(szSrcFile, szDstFile, MOVEFILE_DELAY_UNTIL_REBOOT); The system stores the following entries in PendingFileRenameOperations: szDstFile\0\0 szSrcFile\0szDstFile\0\0 Because the actual move and deletion operations specified with the MOVEFILE_DELAY_UNTIL_REBOOT flag take place after the calling application has ceased running, the return value cannot reflect success or failure in moving or deleting the file. Rather, it reflects success or failure in placing the appropriate entries into the registry. The system deletes a directory tagged for deletion with the MOVEFILE_DELAY_UNTIL_REBOOT flag only if it is empty. To ensure deletion of directories, move or delete all files from the directory before attempting to delete it. Files may be in the directory at boot time, but they must be deleted or moved before the system can delete the directory. The move and deletion operations are carried out at boot time in the same order they are specified in the calling application. To delete a directory that has files in it at boot time, first delete the files. Alberto
Re: Registering DLL's
Quoting Alexandre Julliard [EMAIL PROTECTED]: That's much better than the previous one. I'm not convinced you really need to build a static list, you might as well have a function to register a single interface and call it a number of times. The main reason I used a static list was to make it impossible to forget to unregister one of the interfaces you registered; that is why the unregister functions take the entire structures (but only need the first members). OTOH, if we might someday want to avoid unregistering one or more interfaces or classes we registered, having separate functions would make that easier. I think I still prefer the structures, but are you convinced enough? I'm afraid copying it is the best choice; I don't think we want a new dll for just a couple of routines. It's not very elegant to duplicate it, but it shouldn't be a lot of code anyway. What would it take to make a static library work for this? Unlike a dll, that would not have any overhead, would it? I'm a real sucker for elegance, you know. :-) I used to think any library, even a static one, had to have a certain amount of bloat, until I came across the dietlibc (http://www.fefe.de/dietlibc/).
Re: html browser for wine (khtml)
On Wednesday 08 January 2003 22:27, Dimitrie O. Paun wrote: On January 8, 2003 02:11 pm, Hetz Ben Hamo wrote: Whats the difference? now you don't need QT, so license wise - it's kosher ;) But I guess it's still C++, no? I'm not sure if Alexandre will accept C++ dlls... Well, last time the talking here was that due to QT license, KHTML couldn't be used, and now with the Safari you don't need any QT (you can use other GUI kits around)... As for C++ - well, anyone is welcome to look at mozilla code - I'm affraid that it looks like a big spaghetti, compared to (pretty neat) KHTML code ;) Thanks, Hetz
Re: html browser for wine (khtml)
On January 9, 2003 10:44 am, Hetz Ben Hamo wrote: As for C++ - well, anyone is welcome to look at mozilla code - I'm affraid that it looks like a big spaghetti, compared to (pretty neat) KHTML code ;) I'm not saying it's an unreasonable request. All I'm saying is that it would be a change in policy to accept C++ code in Wine. So you need to take it up with Alexandre :) -- Dimi.
Re: html browser for wine (khtml)
Dimitrie O. Paun [EMAIL PROTECTED] writes: I'm not saying it's an unreasonable request. All I'm saying is that it would be a change in policy to accept C++ code in Wine. So you need to take it up with Alexandre :) I'd prefer to avoid C++, but if there's no other choice then of course we'll have to do it. I'm still hoping that we can find a way to avoid duplicating all that code inside Wine, C++ or not. -- Alexandre Julliard [EMAIL PROTECTED]
Re: html browser for wine (khtml)
On January 9, 2003 12:14 pm, Alexandre Julliard wrote: I'd prefer to avoid C++, but if there's no other choice then of course we'll have to do it. I'm still hoping that we can find a way to avoid duplicating all that code inside Wine, C++ or not. Well, it seems the only worthy alternatives are Mozilla and KHTML, and they are both written in C++. I am 100% with you on the non-duplicating bit: even if we get something in the tree, it's not going to be maintained, and it will bitrot to fast for words. It would be a huge addition and burden to maintain for the Wine project. Galeon does not include Mozilla -- it uses it. There's got to be a way to use KHTML in a similar manner. Even my first hand approximation (using the Win32 build of Mozilla) seems like a better option than duplicating code. If we get that working, I'm sure we can work with the Mozilla team to find a way of embedding the Linux version. Heck, Galeon does it! But since I'm not doing that work ... -- Dimi.
Re: [RFC] io.h friends
Dimitrie O. Paun wrote: #if !defined(__UNIX__) || defined(USE_MSVCRT) #include io.h #endif But this is not all! For example, wxWindows includes stuff like this: #include sys/unistd.h #include sys/stat.h Since they are available in mingw, and cygwin, and in UNIX, but if I want to use msvcrt they conflit with stuff from there! It's a mess. As you can see, the defines alone can make a grown man cry, and this is for a simple include. And I don't even know I've covered all the basis! Problem is that there are already 5 platforms: UNIX, Wine, Cygwin, MinGW, MS. And complexity grows exponentially with the number of platforms and combinations you have to test for. This way lays madness. It is now clear to me why the Cygwin people included io.h. It's so that you can compile with or without the -mno-cygwin switch, and have everything work. The only way for that to happen without ungodly defines and tests, is to have a flat space of include files: a union of MS Unix files. Even if they are empty! This way you can simply do: #include unistd.h #include io.h Applications that use autoconf surround each #include with a test for that header's presence, e.g. #if HAVE_IO_H #include io.h #endif #if HAVE_UNISTD_H #include unistd.h #endif That's best practice when writing applications. When creating a platform, on the other hand, it's probably best practice to have all those headers, even if they're empty, so everyone can #include them without worrying about the #if HAVE_BLAH_H's. - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: html browser for wine (khtml)
On Thu, Jan 09, 2003 at 11:21:18AM -0500, Dimitrie O. Paun wrote: On January 9, 2003 12:14 pm, Alexandre Julliard wrote: I'd prefer to avoid C++, but if there's no other choice then of course we'll have to do it. I'm still hoping that we can find a way to avoid duplicating all that code inside Wine, C++ or not. Well, it seems the only worthy alternatives are Mozilla and KHTML, and they are both written in C++. I am 100% with you on the non-duplicating bit: even if we get something in the tree, it's not going to be maintained, and it will bitrot to fast for words. It would be a huge addition and burden to maintain for the Wine project. Galeon does not include Mozilla -- it uses it. There's got to be a way to use KHTML in a similar manner. Even my first hand approximation (using the Win32 build of Mozilla) seems like a better option than duplicating code. If we get that working, I'm sure we can work with the Mozilla team to find a way of embedding the Linux version. Heck, Galeon does it! Actually there already was a Konqueror / WINE integration already, called reaktivate. It replaced urlmon and provided a IWebBrowser interface. Ciao, Marcus
Re: html browser for wine (khtml)
On January 9, 2003 01:46 pm, Marcus Meissner wrote: Actually there already was a Konqueror / WINE integration already, called reaktivate. It replaced urlmon and provided a IWebBrowser interface. Sweet! This is exactly what I was hoping for. [...searching for it...] Here's the original announcement: http://dot.kde.org/994747675/ But this seems to be going what cxplugin does. We need the complement of that, don't we? -- Dimi.
Re: wrc: -v, -h, -w, -O res16
Dimitrie O. Paun [EMAIL PROTECTED] writes: Collapse -w16 into -O as res16. -w16 can apply to all modes, not only .res, so you would need to support 'asm16' and 'hdr16' too. It seems cleaner to keep it as a separate option. -- Alexandre Julliard [EMAIL PROTECTED]
Re: distcc and wine
On 8 Jan 2003, Dan Kegel [EMAIL PROTECTED] wrote: I think the issue was that I did not have three identical machines; the speedup from distributing to three hosts was minimal compared to just building on the fast machine. I think the scheduler doesn't handle the case of heterogenous machines as well as it might. I'm going to try to fix that. You should make sure that the fastest machines are listed first in DISTCC_HOSTS. Thanks for working on distcc et al! BTW, is gecc ready for prime time yet? My impression is that it is still experimental, but I don't work on it so I can't really say. Presumably it would be a win over either ccache or distcc? Integrated distributed caching and compilation is probably best in the long term. My approach was to get small sharp tools really solid first before tackling integration -- correctness is more important than speed. I've discovered a number of interesting gcc behaviours along the way and they might have been harder to isolate with a more complex tool. -- Martin
Re: wine 20021219 install patch : registry installation failed
Ooops Ok, I'll do a make clean next time Sorry. On Wed, 8 Jan 2003, Dimitrie O. Paun wrote: On January 8, 2003 09:18 am, Thai Dang wrote: if you have troubles during installation (especially with registry installation failed) patch -p1 -l patchwine-20021219.diff Thai, You've sent a 190K email for a patch that changes 3 lines! Please, if you don't use CVS, at least use the -x switch for diff: diff -u -x *.o ... Or do a make clean before creating the patch. Or delete the garbage by hand. Any of these are OK, as long as you send in _just_ the patch, without the 99% extraneous garbage.
Re: _wine_ldt_copy can not be auto-imported when building under cygwin
Dimitrie O. Paun wrote: On January 8, 2003 02:33 am, Jeroen Janssen wrote: The attached patch fixes the following problem: '_wine_ldt_copy' can't be auto-imported when building under cygwin Jeroen, Can you please test if the attach patch work? No, it doesn't work (there was an 'endif' missing). Attached is the fixed patch. --- Jeroen Janssen Index: include/wine/library.h === RCS file: /home/wine/wine/include/wine/library.h,v retrieving revision 1.17 diff -u -p -r1.17 library.h --- include/wine/library.h 3 Jan 2003 03:12:58 - 1.17 +++ include/wine/library.h 8 Jan 2003 21:49:45 - @@ -72,7 +72,17 @@ extern void wine_ldt_get_entry( unsigned extern int wine_ldt_set_entry( unsigned short sel, const LDT_ENTRY *entry ); /* the local copy of the LDT */ -extern struct __wine_ldt_copy +#ifdef __CYGWIN__ +# ifdef WINE_EXPORT_LDT_COPY +# define WINE_LDT_EXTERN __declspec(dllexport) +# else +# define WINE_LDT_EXTERN __declspec(dllimport) +# endif +#else +# define WINE_LDT_EXTERN extern +#endif + +WINE_LDT_EXTERN struct __wine_ldt_copy { void *base[8192]; /* base address or 0 if entry is free */ unsigned long limit[8192]; /* limit in bytes or 0 if entry is free */ Index: library/ldt.c === RCS file: /home/wine/wine/library/ldt.c,v retrieving revision 1.5 diff -u -p -r1.5 ldt.c --- library/ldt.c 14 Aug 2002 21:10:50 - 1.5 +++ library/ldt.c 8 Jan 2003 21:49:48 - @@ -28,6 +28,7 @@ #include errno.h #include winbase.h +#define WINE_EXPORT_LDT_COPY #include wine/library.h #ifdef __i386__
Re: widl patch
Comment about http://www.winehq.com/hypermail/wine-devel/2003/01/0390.html | I don't see why it can't be there if we do something like | | #ifdef HAVE_SNAZZY_COMPILER | #define RpcTryExcept __try | ... | #else | #define RpcTryExcept if (1) | ... | #endif | | People compiling Windows apps under Winelib would usually need to use a | compiler with a lot of extensions anyway, and people needing to compile | RPC/DCOM marshalling code should either use such a compiler, know what | they're doing, or (when it becomes possible) use widl to generate such | code. One hint: Sendmail 8.12 uses also exception mecanism. On it's implementation 'try' uses setjmp() ( Look macros include/sm/exc.h -- you can not of course copy these but that should tell enough that it is doable just plain C ) / Kari Hurtta
Re: [RFC] io.h friends
Dimitrie O. Paun [EMAIL PROTECTED] writes: So, let's say I do: #ifndef __UNIX__ #include io.h #endif Well, this will not work if I want to compile with msvcrt, because __UNIX__ will be defined anyway. So what do I have to test for? I think it would work. What you have to do is something like: #ifndef __UNIX__ #include io.h #else #include unistd.h #endif (you could also use #ifdef _MSC_VER instead, since unistd.h should work everywhere except on MSVC) This would require us to add a unistd.h to our msvcrt headers, but that's much less problematic than having two versions of io.h. -- Alexandre Julliard [EMAIL PROTECTED]
Re: distcc and wine
On 8 Jan 2003, Paul Millar [EMAIL PROTECTED] wrote: Hi Martin, On a similar note, I've been investigating OpenMOSIX on and off (mostly off) for doing distributed compiling. In general, I've found it not particularly stable (although its improving) and the performance not particularly great -- although I've not had time to investigate the causes of these problems. Besides, compiling code is quite a tricky task for it to schedule/migrate. I haven't tried it myself but I would have expected the short, intense jobs generated by compilation to be a problem. A reduction in compilation time by a factor of 2.6 (for three machines) isn't bad at all! If you have the time, could you repeat this with different values for the -j option? Timing how long it takes with -j2 (and perhaps -j3 and -j4) would be interesting. Yes, I've been meaning to add that to the benchmark tool. I'll let you know. Also, repeat the compilation several times for each value of -j and taking the mean and standard deviation would be interesting too. In informal measurements it seems to be quite reproducible. The sd is typically only a few percent of the overall time. But that might be an interesting option to add too. -- Martin
Re: distcc and wine
Martin Pool wrote: On 8 Jan 2003, Dan Kegel [EMAIL PROTECTED] wrote: I think the issue was that I did not have three identical machines; the speedup from distributing to three hosts was minimal compared to just building on the fast machine. I think the scheduler doesn't handle the case of heterogenous machines as well as it might. I'm going to try to fix that. You should make sure that the fastest machines are listed first in DISTCC_HOSTS. OK, so if I'm running the build on the fast host, I should include 'localhost' first in DISTCC_HOSTS. But what about SMP machines? If the fast machine is a dual processor box, and the others are all single-processor, should I put localhost twice in DISTCC_HOSTS? That's probably part of the reason I got such a poor speedup -- I had no idea how to configure distcc well in the first place, let alone configuring it to deal with SMP systems. - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: widl patch
On Thu, 9 Jan 2003, Kari Hurtta wrote: Sendmail 8.12 uses also exception mecanism. On it's implementation 'try' uses setjmp() ( Look macros include/sm/exc.h -- you can not of course copy these but that should tell enough that it is doable just plain C ) Sure a try/except mechanism is doable in plain C. Wine already has such a plain-C-mechanism in include/wine/exception.h. The problem is to make it compatible with both Win32 SEH (which is different from setjmp/longjmp) *and* MSVC-style __except(expr) syntax; the macros in include/wine/exception.h, while complicated enough in their attempt to fit setjmp/longjmp into SEH, only manage to implement one of them.
Re: Can't find MFC afx.h
Hi John, John Westerman wrote: Hi Everybody, I'm currently trying to compile the basic Win32 Hello world project that VC6 generates for you using Wine. My problem is that when I run ./configure -with-wine=/usr/local/wine It fails with the Message checking for afx.h Could not find the MFC includes Is this application really an MFC application? Winemaker will assume that an application is an MFC application if it sees that it uses the 'StdAfx.h' header. However by default Visual C++ also uses this header for its (evil) precompiled header tricks. So you may want to re-run winemaker with the --nomfc option. -- Francois Gouget [EMAIL PROTECTED]
Re: Registering DLL's
What would it take to make a static library work for this? Unlike a dll, that would not have any overhead, would it? I'm a real sucker for elegance, you know. :-) It's possible, but it adds quite a bit of complexity to the build process, and creates annoying dll dependencies. I'd prefer that we start with the duplication for now, and see how ugly it gets. Okay, we'll start with the duplication. :-| When I prepare a patch including the shared regsvr.h and regsvr.c, should I include them everywhere they're needed (repeating them in the patch multiple times), or just add a note like Hey Alexandre, do a cp regsvr.[hc] ..., or maybe should I always submit the changes as separate patches for each dll?
Re: Registering DLL's
On Thu, 9 Jan 2003, John K. Hohm wrote: [...] Okay, we'll start with the duplication. :-| When I prepare a patch including the shared regsvr.h and regsvr.c, should I include them everywhere they're needed (repeating them in the patch multiple times), or just add a note like Hey Alexandre, do a cp regsvr.[hc] ..., or maybe should I always submit the changes as separate patches for each dll? Could it be done byt putting the required functions in a single header ala 'include/wine/test.h'? This way it would be duplicated... but not really. -- Francois Gouget [EMAIL PROTECTED]http://fgouget.free.fr/ $live{free} || die ;
Re: Registering DLL's
John K. Hohm [EMAIL PROTECTED] writes: When I prepare a patch including the shared regsvr.h and regsvr.c, should I include them everywhere they're needed (repeating them in the patch multiple times), or just add a note like Hey Alexandre, do a cp regsvr.[hc] ..., or maybe should I always submit the changes as separate patches for each dll? Please do it in one dll only for now and submit that; once it's tested and integrated we can start copying it around. Also I'd suggest putting the Dll(Un)RegisterServer functions in the same .c file so that you don't need a .h at all, this way there will be less duplication. -- Alexandre Julliard [EMAIL PROTECTED]
Re: Small fixes for my previous patch
On January 9, 2003 03:09 pm, Rok Mandeljc wrote: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN Can you, pretty please, turn off HTML mail? shrug/ -- Dimi.
Re: wrc: -v, -h, -w, -O res16
On January 9, 2003 02:23 pm, Alexandre Julliard wrote: -w16 can apply to all modes, not only .res, so you would need to support 'asm16' and 'hdr16' too. It seems cleaner to keep it as a separate option. Yes, I know, but we officially don't support Win16. We only need 16-bit support in a handful of places within wine, and there we use only .res. We make a big point about not supporting Win16 (headers, libs, etc. -- and I like that! :)), it seems a bit confusing to clutter the options (which are already too many) with it. I mean, come on -- who would use it? :) Win16 has been dead for so many years, I doubt there are that many Win16 programs in existance, and of those, who would use wrc?!? -- Dimi.
Re: wrc: -v, -h, -w, -O res16
Dimitrie O. Paun [EMAIL PROTECTED] writes: Yes, I know, but we officially don't support Win16. We only need 16-bit support in a handful of places within wine, and there we use only .res. Again, wrc can be useful for more than simply building Wine. Sure, that feature is not going to be used often, and we probably wouldn't implement it today if it didn't exist. But it's here, it works, and it can potentially be useful to someone someday; there's nothing to gain by removing it. -- Alexandre Julliard [EMAIL PROTECTED]
Re: [RFC] io.h friends
On January 9, 2003 12:12 pm, Alexandre Julliard wrote: I think it would work. What you have to do is something like: #ifndef __UNIX__ #include io.h #else #include unistd.h #endif This so fast! :) Remember, __UNIX__ is always defined when compiling in Wine, so we can never include io.h. Which begs the question: why do we have it in msvcrt in the first place? :) I'd like to be able to compile an app with _and_ without the msvcrt runtime, by adding/removing the -mno-cygwin switch. The simplest thing to do would be to just: #include io.h #include unistd.h and when compiling with the -mno-cygwin, I get an empty/small unistd.h, and without the -mno-cygwin I get an empty/small io.h. A include/cygwin would solve this nicely, we can simply stick in there all the cygwin extensions (like io.h, and others), and in msvcrt we can put the mingw extensions (such as unistd.h). The two includes will be mutually exclusive, and you can choose between them with the -mno-cygwin switch, the same as you do on Windows. -- Dimi.
Re: problem building tests with msvc6
LarstiQ wrote: On Sun, Jan 05, 2003 at 07:18:05PM -0800, Dan Kegel wrote: snip I guess I'm aiming at making it easier for Windows folks to grab the source for the tests from CVS and build them themselves under Windows. Furthermore, I'm hoping to write scripts to continuously update from cvs and run the regression tests, all on windows. (It'll be interesting making that work noninteractively.) How about something inspired by tinderbox? It continuously checks out from CVS, builds, and mails the results, all of that noninteractively. See tinderbox.mozilla.org, tinderbox.blender.org and http://lxr.mozilla.org/mozilla/source/webtools/. Yes, exactly. I didn't say tinderbox because I wasn't sure how much of that I could reuse. - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: wrc: -v, -h, -w, -O res16
On January 9, 2003 04:14 pm, Alexandre Julliard wrote: But it's here, it works, and it can potentially be useful to someone someday; there's nothing to gain by removing it. I really wonder how it can be of use to anyone. There is stuff to gain: simplicity, less code to maintain and support. But fine, if you don't want it, here's the patch with -w16 in: ChangeLog Added windres compatibility switches: -v, --[no-]use-temp-file. New -h option to conform to standard practice (and MS' rc). Updated documentation, minor option parsing cleanup. Index: tools/wrc/wrc.c === RCS file: /var/cvs/wine/tools/wrc/wrc.c,v retrieving revision 1.23 diff -u -r1.23 wrc.c --- tools/wrc/wrc.c 9 Jan 2003 00:03:53 - 1.23 +++ tools/wrc/wrc.c 9 Jan 2003 05:17:15 - @@ -77,19 +77,19 @@ #define INCLUDEDIR /usr/local/include/wine #endif +#ifdef WORDS_BIGENDIAN +#define ENDIAN big +#else +#define ENDIAN little +#endif + static char usage[] = Usage: wrc [options...] [infile[.rc|.res]] [outfile]\n -a nAlignment of resource (win16 only, default is 4)\n -A Auto register resources (only with gcc 2.7 and better)\n -b Create an assembly array from a binary .res file\n -B xSet output byte-order x={n[ative], l[ittle], b[ig]}\n - (win32 only; default is n[ative] which equals -#ifdef WORDS_BIGENDIAN - big -#else - little -#endif - -endian)\n + (win32 only; default is ENDIAN -endian)\n -c Add 'const' prefix to C constants\n -C cp Set the resource's codepage to cp (default is 0)\n -d nSet debug level to 'n'\n @@ -98,6 +98,7 @@ -E Preprocess only\n -F target Ignored for compatibility with windres\n -g Add symbols to the global c namespace\n + -h Prints this summary.\n -i file The name of the input file.\n -I path Set include search dir to path (multiple -I allowed)\n -J Do not search the standard include path\n @@ -110,13 +111,13 @@ -s Add structure with win32/16 (PE/NE) resource directory\n -t Generate indirect loadable resource tables\n -T Generate only indirect loadable resources tables\n + -v Enable verbose mode.\n -V Print version and exit\n -w 16|32Select win16 or win32 output (default is win32)\n -W Enable pedantic warnings\n #ifdef HAVE_GETOPT_LONG The following long options are supported:\n @@ -123,8 +124,10 @@ --nostdinc Synonym for -J.\n --defineSynonym for -D.\n --language Synonym for -l.\n + --use-temp-file Ignored for compatibility with windres.\n + --no-use-temp-file Ignored for compatibility with windres.\n --preprocessor Specify the preprocessor to use, including arguments.\n - --help Prints a usage summary.\n + --help Synonym for -h.\n --version Synonym for -V.\n #endif Input is taken from stdin if no sourcefile specified.\n @@ -135,11 +138,8 @@ * 0x08 Preprocessor messages\n * 0x10 Preprocessor lex messages\n * 0x20 Preprocessor yacc trace\n - The -o option only applies to the final destination file, which is\n - in case of normal compile a .s file. You must use the '-H header.h'\n - option to override the header-filename.\n If no input filename is given and the output name is not overridden\n - with -o and/or -H, then the output is written to \wrc.tab.[sh]\\n + with -o, then the output is written to \wrc.tab.[sh]\\n ; char version_string[] = Wine Resource Compiler Version WRC_FULLVERSION \n @@ -272,6 +272,8 @@ static void rm_tempfile(void); static void segvhandler(int sig); +static const char* short_options = + a:AbB:cC:d:D:eEF:ghH:i:I:Jl:LmnNo:O:p:rstTvVw:W; #ifdef HAVE_GETOPT_LONG static struct option long_options[] = { { input, 1, 0, 'i' }, @@ -282,9 +284,11 @@ { nostdinc, 0, 0, 'J' }, { define, 1, 0, 'D' }, { language, 1, 0, 'l' }, - { preprocessor, 1, 0, 1 }, - { help, 0, 0, 2 }, { version, 0, 0, 'V' }, + { help, 0, 0, 'h' }, + { preprocessor, 1, 0, 1 }, + { use-temp-file, 0, 0, 2 }, + { no-use-temp-file, 0, 0, 3 }, { 0, 0, 0, 0 } }; #endif @@ -320,9 +324,9 @@ } #ifdef HAVE_GETOPT_LONG - while((optc = getopt_long(argc, argv, a:AbB:cC:d:D:eEF:ghH:i:I:Jl:LmnNo:O:p:rstTVw:W, long_options, opti)) != EOF) + while((optc = getopt_long(argc, argv, short_options, long_options, opti)) != +EOF)
Re: fix shgetfileinfoW
On Wed, Jan 08, 2003 at 09:34:50PM +0100, Jürgen Schmied wrote: Content-Description: Mail message body - fixed crash in winamp reported by andreas mohr Yay !!! That fixed it indeed ! (in other words: I just didn't trust you, so I had to try myself ;-) Andreas Mohr
Re: html browser for wine (khtml)
On Thu, Jan 09, 2003 at 12:28:38PM -0500, Dimitrie O. Paun wrote: On January 9, 2003 01:46 pm, Marcus Meissner wrote: Actually there already was a Konqueror / WINE integration already, called reaktivate. It replaced urlmon and provided a IWebBrowser interface. Sweet! This is exactly what I was hoping for. [...searching for it...] Here's the original announcement: http://dot.kde.org/994747675/ But this seems to be going what cxplugin does. We need the complement of that, don't we? Not sure, it might just work both ways. Will have to go back and check. Ciao, Marcus
Re: Can't find MFC afx.h
Francois Gouget wrote: Hi John, John Westerman wrote: Hi Everybody, I'm currently trying to compile the basic Win32 Hello world project that VC6 generates for you using Wine. My problem is that when I run ./configure -with-wine=/usr/local/wine It fails with the Message checking for afx.h Could not find the MFC includes Is this application really an MFC application? Winemaker will assume that an application is an MFC application if it sees that it uses the 'StdAfx.h' header. However by default Visual C++ also uses this header for its (evil) precompiled header tricks. So you may want to re-run winemaker with the --nomfc option. Great - I also ran into that problem. As part of the winelib applications challange http://www.dssd.ca/wine/Winelib-Apps-0.2.html I have downloaded some *random* applications form sourceforge and have no idea if they use MFC Is there a way to find out more precise if an application really uses MFC ??? -- Hans Christian Studt : http://hc.studt.dk mailto:[EMAIL PROTECTED] .dk og W3C standarder : http://w3c.studt.dk
Re: [RFC] io.h friends
Dimitrie O. Paun [EMAIL PROTECTED] writes: Remember, __UNIX__ is always defined when compiling in Wine, so we can never include io.h. Which begs the question: why do we have it in msvcrt in the first place? :) Because not all apps are cygwin apps, and pure Windows apps are of course not going to test for __UNIX__. I'd like to be able to compile an app with _and_ without the msvcrt runtime, by adding/removing the -mno-cygwin switch. You can do that just fine with my solution, all we need is a trivial unistd.h in the msvcrt headers. Plus this way you also have a chance to build the app under normal Unix, where you will never have io.h. A include/cygwin would solve this nicely, we can simply stick in there all the cygwin extensions (like io.h, and others), and in msvcrt we can put the mingw extensions (such as unistd.h). The two includes will be mutually exclusive, and you can choose between them with the -mno-cygwin switch, the same as you do on Windows. I don't think that's necessary, and we can't go around creating a new include hierarchy for every single Windows compiler out there, not to mention keeping track of all changes to the includes of all these compilers to replicate them in our environment. We need to define a portable solution that has a reasonable chance of working in all cases, even including cases that don't exist today. If it requires tweaking broken apps a bit that's acceptable. -- Alexandre Julliard [EMAIL PROTECTED]
Re: [RFC] io.h friends
On January 9, 2003 12:54 pm, Alexandre Julliard wrote: You can do that just fine with my solution, all we need is a trivial unistd.h in the msvcrt headers. Plus this way you also have a chance to build the app under normal Unix, where you will never have io.h. OK, cool. What about this patch? On my system (RH 8.0), /usr/include/sys/unistd.h simply does #include unistd.h so it works perfectly with this addition. But is this standard? Should we just add a similar file to include/msvcrt/sys and be done with it? ChangeLog Add a unistd.h file for mingw/Unix compatibility. Index: include/Makefile.in === RCS file: /var/cvs/wine/include/Makefile.in,v retrieving revision 1.79 diff -u -r1.79 Makefile.in --- include/Makefile.in 9 Jan 2003 01:09:16 - 1.79 +++ include/Makefile.in 9 Jan 2003 17:20:17 - @@ -196,6 +196,7 @@ msvcrt/sys/types.h \ msvcrt/sys/utime.h \ msvcrt/time.h \ + msvcrt/unistd.h \ msvcrt/wchar.h \ msvcrt/wctype.h --- /dev/null 2002-08-30 19:31:37.0 -0400 +++ include/msvcrt/unistd.h 2003-01-09 12:18:20.0 -0500 @@ -0,0 +1,2 @@ +#include io.h +#include process.h -- Dimi.
Re: Registering DLL's
Quoting Alexandre Julliard [EMAIL PROTECTED]: Please do it in one dll only for now and submit that; once it's tested and integrated we can start copying it around. Also I'd suggest Okay. Should I perhaps start with something better-used than comcat (perhaps ole32) so that testing will be likely to fail quickly if it's broken? putting the Dll(Un)RegisterServer functions in the same .c file so that you don't need a .h at all, this way there will be less duplication. Are you suggesting that the static data defining which classes and interfaces to register be located in the same file as the implementation of the (un)registration functions? That would make copying the implementation around even more work, since I couldn't just copy regsvr.[hc] and keep the differing data in the respective dll-specific sources. I suppose you could also mean that *only* the static data be stored in a dll- specific file, with predefined variable names to be found by the regsvr.c, but that still requires a regsvr.h to get the struct definitions.
Re: Registering DLL's
John K. Hohm [EMAIL PROTECTED] writes: Are you suggesting that the static data defining which classes and interfaces to register be located in the same file as the implementation of the (un)registration functions? That would make copying the implementation around even more work, since I couldn't just copy regsvr.[hc] and keep the differing data in the respective dll-specific sources. Not really, you shouldn't be copying it around all the time anyway. Once the functions are working properly they shouldn't need to change. The idea is that you put everything into regsvr.c, both the common functions and the dll-specific stuff; then when you want to do a new dll you copy a regsvr.c and modify the dll-specific parts. This also allows simplifying the code for dlls that don't need the complete support. -- Alexandre Julliard [EMAIL PROTECTED]
Re: [RFC] io.h friends
On Thu, 9 Jan 2003, Dimitrie O. Paun wrote: [...] Remember, __UNIX__ is always defined when compiling in Wine, so we can never include io.h. Which begs the question: why do we have it in msvcrt in the first place? :) Because it's part of the Visual C++ headers for the msvcrt library. Visual C++ applications, and there's a lot of them on the Windows platform, will just do: #include io.h and thus if we want them to compile with Winelib we need to provide an io.h header. Note: even if you don't have Visual C++, you can find this header in the MS SDK src/crt directory (with all the other msvcrt headers). -- Francois Gouget [EMAIL PROTECTED]http://fgouget.free.fr/ Hiroshima '45 - Czernobyl '86 - Windows '95
Re: [RFC] io.h friends
Dimitrie O. Paun [EMAIL PROTECTED] writes: On my system (RH 8.0), /usr/include/sys/unistd.h simply does #include unistd.h so it works perfectly with this addition. But is this standard? Should we just add a similar file to include/msvcrt/sys and be done with it? Yes, that's probably safer, and it shouldn't break anything. -- Alexandre Julliard [EMAIL PROTECTED]
Re: problem building tests with msvc6
Paul Millar wrote: I'm in the process of extending WRT [1] to include running the conformance tests on as many Windows platforms as I can get my hands on (which, in theory should be more-or-less all of them). I didn't want to say anything until I knew it was feasible, but I've got most of it figured out ... it just needs setting up (oh and the conformance tests to cross-compile with mingw ;^) [1] - http://www.astro.gla.ac.uk/users/paulm/WRT/wrt.php Wow. Does it really make sense to test against windows 2.0 or 3.0 anymore? I recall Windows itself was pretty much a joke and terribly unstable until windows 3.1... Are the WRT sources in CVS? - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: Symbol stripping?
On Wed, Jan 08, 2003 at 08:59:39AM +, Mike Hearn wrote: What does gcc prior to 3.1 do with the -gstabs+ flag? If it ignores it, or it's implied anyway, we could just have it always on. If not then I have some bash here that can parse the output of gcc -v and determine whether it's = 3.1, would that be acceptable as a patch to configure.ac? The only other way would be to compile a little test app then run objdump on it to figure out if stabs data was included, but testing the GCC version would be faster. I submitted a patch which adds -gstabs to CFLAGS if necessary. Ciao, Marcus
Re: problem building tests with msvc6
On Thu, 9 Jan 2003, LarstiQ wrote: On Sun, Jan 05, 2003 at 07:18:05PM -0800, Dan Kegel wrote: grab the source for the tests from CVS and build them themselves under Windows. Furthermore, I'm hoping to write scripts to continuously update from cvs and run the regression tests, all on windows. (It'll be interesting making that work noninteractively.) How about something inspired by tinderbox? It continuously checks out from CVS, builds, and mails the results, all of that noninteractively. I'm in the process of extending WRT [1] to include running the conformance tests on as many Windows platforms as I can get my hands on (which, in theory should be more-or-less all of them). I didn't want to say anything until I knew it was feasible, but I've got most of it figured out ... it just needs setting up (oh and the conformance tests to cross-compile with mingw ;^) [1] - http://www.astro.gla.ac.uk/users/paulm/WRT/wrt.php Paul Millar
Re: prevent dereferencing null
On January 9, 2003 07:08 pm, Bill Medland wrote: +if (!tpinfo-chanbuf) { +ERR(tpinfo has no Rpc Channel Buffer\n); +return 0; +} Is this expected behaviour? If so, there's no need for the ERR msg. If not, there's no need for the test, we need to fix the root cause... -- Dimi.
Re: Problem in dlls/ddraw/dsufrace/main.c
no problem any more with this code when I updated my CVS (aged from Tuesday morning :) ) black magic ;) --- Lionel Ulmer [EMAIL PROTECTED] a écrit : trace:ddraw:Main_DirectDrawSurface_GetAttachedSurface (0x402a9418)-Looking for caps: 4,0,1,1 output: 0x741ed0 Caps are : DDSCAPS_BACKBUFFER trace:ddraw:Main_DirectDrawSurface_GetAttachedSurface Surface: (0x402a9b38) caps: 1000601c,0,0,0 Surface caps are : DDSCAPS_BACKBUFFER DDSCAPS_COMPLEX DDSCAPS_FLIP DDSCAPS_3DDEVICE DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM trace:ddraw:Main_DirectDrawSurface_GetAttachedSurface Returning surface 0x402a9b38 with description : - DDSD_CAPS : DDSCAPS_BACKBUFFER DDSCAPS_COMPLEX DDSCAPS_FLIP DDSCAPS_3DDEVICE DDSCAPS_VIDEOMEMORY DDSCAPS_LOCALVIDMEM - DDSD_HEIGHT : 480 - DDSD_WIDTH : 640 - DDSD_PITCH : 1280 - DDSD_LPSURFACE : 0x424b - DDSD_PIXELFORMAT : ( DDPF_RGB , RGB bits: 16, R f800 G 07e0 B 001f) Well, you completely lost me here... Could you restate your problem from the beginning ? Because well, in your trace, I see that you actually FOUND a valid attached surface. So the 'if (found == NULL)' test will be FALSE and thus whether this code is in or not would not change anything at all. So I doubt that removing this piece of code would change anything in the application's behaviour. The only thing I could see would be that you were running with a quite old CVS version and when you ugraded you got one fix I did on the GetAttachedSurface code to handle some problem we had with useless caps in the DDSCAPS structure being tested whereas they should not have been. Lionel -- Lionel Ulmer - http://www.bbrox.org/ = Sylvain Petreolle [EMAIL PROTECTED] Fight against Spam ! http://www.euro.cauce.org/en/index.html ICQ #170597259 Don't think you are. Know you are. Morpheus, in Matrix. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Re: DirectSound and i810 soundcards
Francois Gouget wrote: [...] 2. if we tweak things so that the CreateThread is done, then the resampling will be done by Alsa (or whichever back-end) which will presumably do it much better than us. howeve rin that case we have to make the almost never used case work and I'm not sure how well it would work anyway (I'm concerned about skips/cracks/pops). Option 2 turned out to be quite simple to get working so that's what I did. However the result does not work very well. When I run the DirectSound test I get a lot of 'stutter' :-( It seems like there are a lot of underruns. Other applications (e.g. Windows Media Player) seem to work better but that appears to depend on the machine too... It seems we should be able to do better. For those who want to play with this but don't have an i810 souncard (e.g. me), I attached a nice patch that allows you to simulate all sorts of things: * by default the patch has no effect * define I810O=1 (that's an O for OSS) Then the ioctls will return the same results they would return in an i810+OSS combination. This means only 48000x16x2 will be accepted. This simulates what happens in an i810+OSS configuration. * define I810A=1 Then winmm will be able to use all the formats your soundcard supports but mmap will fail if the current format is not 48000x16x2. This simulates what happens in an i810+Alsa configuration. * define NOMMAP=1 Then mmap will systematically fail. This does not simulate a specific configuration I know of but heck, why not. So to run the dsound test as if you had an i810+Alsa configuration you would do: cd dlls/dsound/tests I810A=1 WINETEST_INTERACTIVE=1 ../../../tools/runtest -P wine -M dsound.dll -T ../../.. -p dsound_test.exe.so dsound.c Actually doing so you may notice that the i810+Alsa patch I sent to wine-patches does not support writing to the primary buffer (but who does that anyway)... -- Francois Gouget [EMAIL PROTECTED] Index: dlls/winmm/wineoss/audio.c === RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v retrieving revision 1.70 diff -u -r1.70 audio.c --- dlls/winmm/wineoss/audio.c 7 Jan 2003 23:08:05 - 1.70 +++ dlls/winmm/wineoss/audio.c 9 Jan 2003 23:28:33 - @@ -70,6 +70,60 @@ /* Allow 1% deviation for sample rates (some ES137x cards) */ #define NEAR_MATCH(rate1,rate2) (((100*((int)(rate1)-(int)(rate2)))/(rate1))==0) +static int i810_rate=48000; +static int i810_format=16; +static int i810_stereo=1; +static int i810_ioctl(int fd, unsigned long int request, void* data) +{ +if (getenv(I810O)) +{ +switch (request) { +case SNDCTL_DSP_SETFMT: +TRACE(simulating i810+OSS: reject non 16bit format +(%d)\n,*((int*)data)); +*((int*)data)=AFMT_S16_LE; +break; +case SNDCTL_DSP_STEREO: +TRACE(simulating i810+OSS: reject non stereo format +(%d)\n,*((int*)data)); +*((int*)data)=1; +break; +case SNDCTL_DSP_SPEED: +TRACE(simulating i810+OSS: reject unsupported sample rate +(%d)\n,*((int*)data)); +*((int*)data)=48000; +break; +} +} +switch (request) { +case SNDCTL_DSP_SETFMT: +i810_format=*((int*)data); +break; +case SNDCTL_DSP_STEREO: +i810_stereo=*((int*)data); +break; +case SNDCTL_DSP_SPEED: +i810_rate=*((int*)data); +break; +} +return ioctl(fd,request,data); +} +#define ioctl(a,b,c) i810_ioctl((a),(b),(c)) + +static void* i810_mmap(void *start, size_t length, int prot , int flags, int fd, +off_t offset) +{ +if (getenv(NOMMAP) || +(getenv(I810A) + (i810_rate!=48000 || i810_format!=16 || i810_stereo!=1))) +{ +if (getenv(RtlAcquireResourceExclusive)) +TRACE(simulating lack of mmap support\n); +else +TRACE(simulating i810+Alsa: reject mmap for non native format +(%dx%dx%d)\n,i810_rate,i810_format,i810_stereo); +errno=EIO; +return (void*)-1; +} +return mmap(start, length, prot, flags, fd, offset); +} +#define mmap(a,b,c,d,e,f) i810_mmap((a),(b),(c),(d),(e),(f)) + #ifdef HAVE_OSS #define MAX_WAVEDRV(3)
Re: [RFC] io.h friends
On January 9, 2003 02:26 pm, Francois Gouget wrote: Which begs the question: why do we have it in msvcrt in the first place? :) Because it's part of the Visual C++ headers for the msvcrt library. I was just _kidding_ :) Notice the smiley ... -- Dimi.
[RFC] msvcrt: defines break C++ code
Folks, We have a lot of code in msvcrt headers like so: #define umask _umask #define unlink _unlink #define write _write This breaks C++ that define a write method in a header, and then implement it like so: #include io.h void MyClass::write(...) { write(...); } I suggest we turn those defines into inlines, like this: inline int write(int fd, const void* ptr, unsigned int size) { return _write(fd, ptr, size); } Any other solutions? -- Dimi.
Re: prevent dereferencing null
On January 9, 2003 03:12 pm, Dimitrie O. Paun wrote: On January 9, 2003 07:08 pm, Bill Medland wrote: +if (!tpinfo-chanbuf) { +ERR(tpinfo has no Rpc Channel Buffer\n); +return 0; +} Is this expected behaviour? If so, there's no need for the ERR msg. If not, there's no need for the test, we need to fix the root cause... You are, of course, quite correct. I don't know what the expected behaviour is; all I know is that dereferncing the null pointer isn't. If someone actually understands all that proxy stuff then maybe they can do something about it. If not then I guess it is destined to languish unfixed. -- Bill Medland ACCPAC International, Inc. [EMAIL PROTECTED] Corporate: www.accpac.com Hosted Services: www.accpaconline.com
PATCH - Define needed flags when building for Mingw
Dont know if this is right or not as you all know I think configure is a little whore. =P Maybe this should go somewhere else. I have about 12 or 13 other things that need to be fixed when building WINE for Mingw and MSYS and I am tired of doing ./configure CFLAGS=-D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK Maybe someone can suggest a better way rather than -DWINE_NOWINSOCK? Thanks Steven Changelog: add defines for Mingw cvs diff -u configure Index: configure === RCS file: /home/wine/wine/configure,v retrieving revision 1.387 diff -u -r1.387 configure --- configure 9 Jan 2003 06:04:33 - 1.387 +++ configure 10 Jan 2003 04:55:54 - @@ -11973,7 +11973,8 @@ case $host_os in mingw32*) -CRTLIBS=-lmsvcrt ;; +CRTLIBS=-lmsvcrt ; +CFLAGS==$CFLAGS -D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK ; esac cvs diff -u configure.ac Index: configure.ac === RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.119 diff -u -r1.119 configure.ac --- configure.ac9 Jan 2003 06:04:33 - 1.119 +++ configure.ac10 Jan 2003 04:56:29 - @@ -857,7 +857,8 @@ AC_SUBST(CRTLIBS,) case $host_os in mingw32*) -CRTLIBS=-lmsvcrt ;; +CRTLIBS=-lmsvcrt ; +CFLAGS==$CFLAGS -D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK ; esac dnl Get the soname for libraries that we load dynamically __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Re: PATCH - Define needed flags when building for Mingw
On January 10, 2003 12:01 am, Steven Edwards wrote: +CFLAGS==$CFLAGS -D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK ; Why do you need these defines? In particular, isn't the compiler defining __MINGW__ and _WINDOWS? -- Dimi.
Re: PATCH - Define needed flags when building for Mingw
--- Dimitrie O. Paun [EMAIL PROTECTED] wrote: On January 10, 2003 12:01 am, Steven Edwards wrote: +CFLAGS==$CFLAGS -D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK ; Why do you need these defines? In particular, isn't the compiler defining __MINGW__ and _WINDOWS? I started using them a while back on one of the mingw releases and have just always kept them out of habit. I thought it was supposed to define them but around the mingw-gcc 2.95.3 release It didnt do one of them (_WINDOWS) I think. When I first started wine development and was playing with the stuff Patrik did for MS_VC anything that both MS_VC and Mingw could use I always #ifdef'd as _WINDOWS. I guess I should have checked to see if this was still needed so yeah its way wrong. BRAIN FART. Anyway disregard this anyway because I forgot to test this patch after my ./configure was done. Now I'm ending up with gcc -c -I. -I. -I../include -I../include =-g -O2 -Wall -mpreferred-stack-bounda ry=2 -gstabs+ -D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK -D__WINESRC__ -D_REENTRAN T -o cptable.o cptable.c gcc.exe: cannot specify -o with -c or -S and multiple compilations I really only need a patch that adds -DWINE_NOWINSOCK to the CFLAGS if Mingw isnt broken. If I need anything else it can be added later. Thanks Steven __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
[Fwd: Re: getting started]
Dimitrie O. Paun wrote: Compiling under the SDK using MS tools gives us little value. We already know that works. If you don't want to spend the cash on MSVC (and not make MS any richer :)), and are willing to invest some time into it, I suggest the following path: 1. Get the latest mingw 2.0 distribution from http://www.mingw.org 2. Modify the makefiles that come in the book to work with GNU make, and the mingw tool chain. Make sure you use forward slashes (/)! :) 3. Build on Windows with your newly created Makefiles, and verify that everthing runs under Windows just fine. 4. If you feel like it, document what steps you took to convert the makefiles. Maybe we'll put that on the Winelib page, to help others in the future. 5. Take the exact same Makefiles you used under Windows, change 3 lines in them (CC=winegcc, CXX=wineg++, WINDRES=wrc), and try to compile under Linux. Use the latest Wine tree, and you should have native Linux apps. If you get errors in this step, they are Wine error, please report them, and let's try to fix them. This is the real value of this exercise. 6. Once everything builds, run the apps, and make sure they run fine. If they have problems, and you feel brave, let the debugging begin! Welcome to the team! Well I've gotten MinGW and sorta learned my way around it. But now, my problem is that neither of my windows programming books has makefiles of any sort. All they have is C++ code. So maybe I should go with my original plan of compiling stuff with visual studio and seeing if it runs under wine. Or do you have any other suggestions?
Re: prevent dereferencing null
On Thu, Jan 09, 2003 at 05:45:00PM -0800, Bill Medland wrote: On January 9, 2003 03:12 pm, Dimitrie O. Paun wrote: On January 9, 2003 07:08 pm, Bill Medland wrote: +if (!tpinfo-chanbuf) { +ERR(tpinfo has no Rpc Channel Buffer\n); +return 0; +} Is this expected behaviour? If so, there's no need for the ERR msg. If not, there's no need for the test, we need to fix the root cause... You are, of course, quite correct. I don't know what the expected behaviour is; all I know is that dereferncing the null pointer isn't. If someone actually understands all that proxy stuff then maybe they can do something about it. If not then I guess it is destined to languish unfixed. I vaguely remember this happening for inter-thread COM, I did not come around to debug it yet. return E_FAIL; might be more appropriate too. Ciao, Marcus
Re: [RFC] msvcrt: defines break C++ code
Dimitrie O. Paun wrote: I suggest we turn those defines into inlines, like this: inline int write(int fd, const void* ptr, unsigned int size) { return _write(fd, ptr, size); } Any other solutions? Sure, there are two: 0. use a linker alias for _write 1. actually have a function write() that just jumps to _write 2. actually have a function write() that calls _write Not sure any of those are better than what you suggest, though. - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: Expected name, id, length or ordinal error
On January 10, 2003 02:12 am, John Westerman wrote: My hellotest.spec looks like this: name hellotest type win32 mode guiexe init WinMain rsrc hellotest.res import kernel32.lib import user32.lib - line of failure None of this stuff resides in the .spec file anymore! I'm not sure if winemaker is update to generate spec files according to the latest and greatest. What version are you using BTW? You should be using HEAD, if you can work with CVS. -- Dimi.
Re: [RFC] msvcrt: defines break C++ code
On Thu, 9 Jan 2003, Dimitrie O. Paun wrote: Folks, We have a lot of code in msvcrt headers like so: #define umask _umask #define unlink _unlink #define write _write [...] I suggest we turn those defines into inlines, like this: inline int write(int fd, const void* ptr, unsigned int size) { return _write(fd, ptr, size); } Any other solutions? The strange thing is that the MSVC headers simply define their prototype, e.g.: _CRTIMP int __cdecl umask(int); Yet these APIs are not exported by the msvcrt library or by any other dll that I know of. And still applications compile and link! In fact it seems that whether the application calls umask or _umask (even once preprocessed), MSVC will import _umask. Anyway, replacing these defines with inline functions is fine with me. -- Francois Gouget [EMAIL PROTECTED]http://fgouget.free.fr/ Linux: Because rebooting is for adding new hardware
Expected name, id, length or ordinal error
Hi Everybody, I'm currently trying to compile the basic Win32 "Hello world" project that VC6 generates for you using Wine. Currently I'm running winemaker like this: winemaker --nomfc -I/usr/local/wine/include -L/usr/local/wine/lib -ikernel32.lib -iuser32.lib -igdi32.lib -iwinspool.lib -icomdlg32.lib -iadvapi32.lib -ishell32.lib -iole32.lib -ioleaut32.lib -iuuid.lib -iodbc32.lib -iodbccp32.lib /home/john/hello I've also added the header files that would have been found in the StdAfx.h to my main.cpp. This is because Winemaker wouldn't build with StdAfx.h in the directory, so I deleted it. This is the error I now get when I run make ./hellotest.spec:8: Expected name, id, length or ordinal My hellotest.spec looks like this: name hellotest type win32 mode guiexe init WinMain rsrc hellotest.res import kernel32.lib import user32.lib - line of failure Any Ideas? Thanks in Advance, John Westerman
Re: [RFC] msvcrt: defines break C++ code
Francois Gouget [EMAIL PROTECTED] writes: The strange thing is that the MSVC headers simply define their prototype, e.g.: _CRTIMP int __cdecl umask(int); Yet these APIs are not exported by the msvcrt library or by any other dll that I know of. And still applications compile and link! I think you have to link with oldnames.lib for that. We probably have to provide an oldnames.lib too. -- Alexandre Julliard [EMAIL PROTECTED]
Re: [Fwd: Re: getting started]
Glen Kaukola wrote: Well I've gotten MinGW and sorta learned my way around it. But now, my problem is that neither of my windows programming books has makefiles of any sort. All they have is C++ code. So maybe I should go with my original plan of compiling stuff with visual studio and seeing if it runs under wine. Or do you have any other suggestions? Your plan's fine -- but you should also go ahead and learn Make, and test the code in the books using MinGW and Makefiles. Knowledge is power. - Dan -- Dan Kegel Linux User #78045 http://www.kegel.com
Re: [RFC] msvcrt: defines break C++ code
On January 9, 2003 08:38 pm, Alexandre Julliard wrote: I think you have to link with oldnames.lib for that. We probably have to provide an oldnames.lib too. OK, but what do we do now about those defines? -- Dimi.
Re: getting started
On January 10, 2003 01:14 am, Glen Kaukola wrote: All they have is C++ code. So maybe I should go with my original plan of compiling stuff with visual studio and seeing if it runs under wine. Or do you have any other suggestions? Compiling stuff with visual studio is a first step. But it should be very simple to do a Makefile for the examples, how many files do you have in one example? Here is an example Makefile that you can use under mingw: (let me know if it doesn't work, I just typed it inline here, no testing) --- cut here CC = gcc# change this to winegcc under Wine CXX = g++ # change this to wineg++ under Wine RC = windres# change this to wrc under Wine # There six lines will change between examples TARGET = sample1.exe #name of the executable SRCS = file1.cpp file2.cpp ... RSRC = res1.rc res2.rc ... # If you need to add defines, add them to CPPFLAGS # CPPFLAGS, INCDIRS, LIBDIRS, and LIBS may change between examples CPPFLAGS = # add stuff here like -D_WIN32_IE=0x0400 CFLAGS = -mno-cygwin -W -Wall -g -gstabs+ -fno-exceptions -fno-rtti LDFLAGS = -mno-cygwin -mwindows INCDIRS = # add stuff there like -I../include LIBDIRS = # add stuff like -L../lib LIBS = -lcomctl32 # we'll need to add more libs in here for sure OBJ = $(SRCS:.c=.o) $(RSRC:.c=.o) %.o : %.rc $(RC) $(CPPFLAGS) $ $@ %.o : %.cpp $(CXX) $(CFLAGS) $(CPPFLAGS) $(INCDIRS) -c -o $@ $ %.o : %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(INCDIRS) -c -o $@ $ $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ $(OBJS) # A few nice targets all:$(TARGET) clean: rm -f $(TARGET) $(OBJS) --- cut here It's not hard, just look in the .dsp project to see what you need to put in these variables. -- Dimi.
Re: problem building tests with msvc6
On Sun, Jan 05, 2003 at 07:18:05PM -0800, Dan Kegel wrote: snip I guess I'm aiming at making it easier for Windows folks to grab the source for the tests from CVS and build them themselves under Windows. Furthermore, I'm hoping to write scripts to continuously update from cvs and run the regression tests, all on windows. (It'll be interesting making that work noninteractively.) How about something inspired by tinderbox? It continuously checks out from CVS, builds, and mails the results, all of that noninteractively. See tinderbox.mozilla.org, tinderbox.blender.org and http://lxr.mozilla.org/mozilla/source/webtools/. LarstiQ