[for review] kdewin32/include/msvc/alloca.h

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sun Dec 16 17:21:12 CET 2007


Jarosław Staniek schrieb:
> Christian Ehrlicher said the following, On 2007-12-14 06:58:
>> Jarosław Staniek schrieb:
>>> For review:
>>> It's the same as malloc.h, except defines alloca as _alloca.
>>>
>> Can't we have an inline function? There're so much problems with macros
>> that I would like to prefer inlines
>> Make sure to include alloca.h somewhere when you export it (because in
>> debug mode inline is ingored).
>>
> 
> Hmm; in msvc's malloc.h (2k3) we have:
> 
> --------------
> #ifndef _POSIX_
> 
> void *          __cdecl _alloca(size_t);
> //[....]
> 
> #if     !__STDC__
> /* Non-ANSI names for compatibility */
> #define alloca  _alloca
> #endif  /* __STDC__*/
> 
> //[....]
> 
> #endif  /* _POSIX_ */
> --------------
> 
> How about the attached alloca.h? It cooperates with what we have in
> malloc.h and adds the function you have proposed.
> 
Ok - does the alloca function realy works in debug mode? Imho a
WINPOSIX_EXPORT is missing (and a kdewin source file needs to include
alloca.h) - otherwise the linker may complain.



Christian




More information about the Kde-windows mailing list