|
From: Steven E. <Ste...@ya...> - 2002-05-13 15:48:38
|
I am having a little problem with my wine porting work and was wondering if you guys could help with the solution. For the port of comdlg32 I have 1 error that must be fixed. Wine/include/ntddk.h defines INT __cdecl wcstol(LPCWSTR,LPWSTR*,INT); Which is a ntdll function. While mingws include/stdlib.h defines long wcstol (const wchar_t*, wchar_t**, int); Is based on msvcrt. Any idea on how to fix it to use wines prototype or have another solution? I have at least 2 other cases I know about where the protoype is wrong. Thanks Steven "Every revolution was once a thought in one man's mind" - Ralph Waldo Emerson |
|
From: Casper H. <ch...@us...> - 2002-05-13 17:32:41
|
man, 2002-05-13 kl. 17:49 skrev Steven Edwards: > I am having a little problem with my wine porting work and was wondering > if you guys could help with the solution. For the port of comdlg32 I > have 1 error that must be fixed. > > Wine/include/ntddk.h defines > INT __cdecl wcstol(LPCWSTR,LPWSTR*,INT); > Which is a ntdll function. > > > While mingws include/stdlib.h defines > long wcstol (const wchar_t*, wchar_t**, int); > Is based on msvcrt. > > Any idea on how to fix it to use wines prototype or have another > solution? I have at least 2 other cases I know about where the protoype > is wrong. > > Thanks > Steven Since this is a standard C runtime library function, I consider the MinGW to be more correct. LPCWSTR etc. are WinNT types, not stdc types. Does the WINE team have a problem with changing their stdc prototypes? |
|
From: Steven E. <Ste...@ya...> - 2002-05-14 02:00:42
|
> Since this is a standard C runtime library function, I > consider the MinGW to be more correct. LPCWSTR etc. are WinNT > types, not stdc types. Does the WINE team have a problem with > changing their stdc prototypes? The solution that Alexandre will accept for the Wine tree is this: > I think the right way would be to put that functionality in > libwine_unicode, and follow the naming convention that we are > using there (for instance wcstol would be strtolW). This way > we are sure the prototypes won't conflict. This most likely will be the law of the land unless you can change Alexandre's mind. <g> I will be starting bugs in wine's bugzilla when ever I find a Prototype conflict. This may be a case where the ReactOS projects Wine tree will differ. Right now I just want to get the damn thing Built right on mingw and I doubt I can make all of the changes that are needed anyway. As of right now if we were to do a import of the wine tree the only Thing we would need to change is this, a few other prototypes and The debugging interfaces for the wine tree. The wine resources are no longer a issue nor is most of the mingw buggy-ness (Thanks again Alexandre). I have only two small patches to mingws basetsd.h and windef.h to shutup some warnings. I will be submitting a TODO doc in the Next few days to outline where we are at and what is left to do. Once again none of this really matters for us without simple windowing (Hint,Hint) Steven "Every revolution was once a thought in one man's mind" - Ralph Waldo Emerson |
|
From: James T. <jim...@ad...> - 2002-05-14 02:46:10
|
Hi, Steven Edwards wrote: > > > Since this is a standard C runtime library function, I > > consider the MinGW to be more correct. LPCWSTR etc. are WinNT > > types, not stdc types. Does the WINE team have a problem with > > changing their stdc prototypes? > > The solution that Alexandre will accept for the > Wine tree is this: > > > I think the right way would be to put that functionality in > > libwine_unicode, and follow the naming convention that we are > > using there (for instance wcstol would be strtolW). This way > > we are sure the prototypes won't conflict. > > This most likely will be the law of the land unless you can change > Alexandre's mind. <g> > I think he was implying for you to replace wcstol calls with strtolW. Hay! I've looked for it in the source and I can not find it. Not even in the Unicode headers. I guess the best way, is to make a static inline function in a header file. Ask Alex how to make strtolW and where he would like to have it, My guess, in the unicode directory. > > Steven > > Thanks, James |
|
From: Alexandre J. <jul...@wi...> - 2002-05-13 23:43:19
|
"Steven Edwards" <Ste...@ya...> writes: > > Since this is a standard C runtime library function, I > > consider the MinGW to be more correct. LPCWSTR etc. are WinNT > > types, not stdc types. Does the WINE team have a problem with > > changing their stdc prototypes? We can't change the prototypes because wchar_t is 4 bytes under Unix, but we really need 2 bytes WCHARs here. But yes, the problem is with Wine, not with Mingw; we'll simply have to use different functions here so that the prototypes don't conflict. > I will be starting bugs in wine's bugzilla when ever I find a > Prototype conflict. This may be a case where the ReactOS projects > Wine tree will differ. With my solution the trees won't need to differ. comdlg32 will simply use libwine_unicode on both platforms; and you will need libwine_unicode on ReactOS anyway so this shouldn't be a limitation. It could be possible later on to have an optimized version of libwine_unicode on ReactOS that uses the msvcrt functions, but that's probably not very high priority right now... -- Alexandre Julliard jul...@wi... |
|
From: Steven E. <Ste...@ya...> - 2002-05-14 02:01:04
|
> With my solution the trees won't need to differ. comdlg32 > will simply use libwine_unicode on both platforms; and you > will need libwine_unicode on ReactOS anyway so this shouldn't > be a limitation. This is true we will need libwine_unicode.dll to be able to use Wrc to compile the resources before we feed them to windress. > It could be possible later on to have an optimized version of > libwine_unicode on ReactOS that uses the msvcrt functions, > but that's probably not very high priority right now... No its not. The high priority for us is the gcc self-hosing and Getting winhello working. Thanks Steven "Every revolution was once a thought in one man's mind" - Ralph Waldo Emerson |
|
From: Rex J. <re...@lv...> - 2002-05-14 02:42:08
|
At 07:30 PM 5/13/02 +0200, you wrote:
>man, 2002-05-13 kl. 17:49 skrev Steven Edwards:
> > I am having a little problem with my wine porting work and was wondering
> > [...]
> >
> > Wine/include/ntddk.h defines
> > INT __cdecl wcstol(LPCWSTR,LPWSTR*,INT);
^^^
> > While mingws include/stdlib.h defines
> > long wcstol (const wchar_t*, wchar_t**, int);
^^^^
perhaps the ntddk version is incorrect, as this function should return
a long int (LONG), not an int.
Rex Jolliff
re...@lv...
|
|
From: James T. <jim...@ad...> - 2002-05-14 03:15:56
|
Rex Jolliff wrote: > > At 07:30 PM 5/13/02 +0200, you wrote: > >man, 2002-05-13 kl. 17:49 skrev Steven Edwards: > > > I am having a little problem with my wine porting work and was wondering > > > [...] > > > > > > Wine/include/ntddk.h defines > > > INT __cdecl wcstol(LPCWSTR,LPWSTR*,INT); > ^^^ > > > > While mingws include/stdlib.h defines > > > long wcstol (const wchar_t*, wchar_t**, int); > ^^^^ > > perhaps the ntddk version is incorrect, as this function should return > a long int (LONG), not an int. > > Rex Jolliff > re...@lv... > I notice that too. James |