[OpenJDK 2D-Dev] <AWT Dev> A change about the include header file of sun/awt/medialib/mlib_types.h

Charles Lee littlee at linux.vnet.ibm.com
Fri Nov 18 01:03:35 UTC 2011


On 11/18/2011 02:14 AM, Phil Race wrote:
> I filed 7113017: Use POSIX compliant include file headers in 
> sun/awt/medialib/mlib_types.h
>
> I'll push it under that bug id as soon as I get a couple of minutes.
>
> -phil.
>
> On 11/16/2011 5:34 PM, Charles Lee wrote:
>> That's great! Thanks Andrew!
>>
>> Could anyone can help to commit it? I do not have the magic :-X
>>
>>
>> On 11/16/2011 05:55 PM, Andrew Brygin wrote:
>>> Hi Charles,
>>>
>>>  I have verified that suggested change works fine for MacOS X.
>>>  In fact, MacOS X port already uses the same set of headers:
>>>
>>> -#if defined(_ALLBSD_SOURCE)
>>>  #include <stddef.h>                     /* for ptrdiff_t */
>>>  #include <stdint.h>                     /* for uintptr_t */
>>> -#elif defined(__linux__)
>>> -#include <stdint.h>                     /* for uintptr_t */
>>> -#include <malloc.h>                     /* for ptrdiff_t */
>>> -#else
>>> -#include <link.h>                       /* for uintptr_t */
>>> -#include <stddef.h>                     /* for ptrdiff_t */
>>> -#endif  /* __linux__ */
>>>
>>> Thanks,
>>> Andrew
>>>
>>>
>>> On 11/15/11 6:25 PM, Charles Lee wrote:
>>>> On 11/15/2011 09:36 AM, Charles Lee wrote:
>>>>> On 11/14/2011 11:14 PM, Artem Ananiev wrote:
>>>>>>
>>>>>> (Copying to 2d-dev as mblib is a Java2D area)
>>>>>>
>>>>>> On 11/14/2011 9:59 AM, Charles Lee wrote:
>>>>>>> Hi guys,
>>>>>>>
>>>>>>> I'd like to propose a change in mlib_types.h, it looks loke:
>>>>>>>
>>>>>>> -#if defined(__linux__)
>>>>>>> -#include <stdint.h> /* for uintptr_t */
>>>>>>> -#include <malloc.h> /* for ptrdiff_t */
>>>>>>> -#else
>>>>>>> -#include <link.h> /* for uintptr_t */
>>>>>>> -#include <stddef.h> /* for ptrdiff_t */
>>>>>>> -#endif /* __linux__ */
>>>>>>> +#include <stdint.h>
>>>>>>> +#include <stddef.h>
>>>>>>>
>>>>>>> The patch is mainly about using POSIX complaint headers to get 
>>>>>>> rid of
>>>>>>> the if/else define.
>>>>>>>
>>>>>>> I have check uintptr_t on the solaris 11 express. It will be 
>>>>>>> included in
>>>>>>> stdint.h. And my ubuntu works where which malloc.h changed to 
>>>>>>> stddef.h.
>>>>>>
>>>>>> Does it still compile on Solaris 10? MacOSX?
>>>>>>
>>>>>>> Would anyone like to take a look at this?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Artem
>>>>>>
>>>>> Hi Artem,
>>>>>
>>>>> I am sorry I do not have a Mac on the hand (too expensive :-)
>>>>>
>>>> Hi guys,
>>>>
>>>> Could anybody help to test this patch on the Mac OSX?
>>>>
>>>
>>
>>
>
Thanks Phil. Thanks all.

-- 
Yours Charles




More information about the 2d-dev mailing list