[PATCH] xcursorgen: Upgraded to work with libpng14

Cody Maloney cmaloney at theoreticalchaos.com
Wed Mar 24 11:48:25 PDT 2010


Hi,

Could someone with commit privileges please push this? I think it has
been sitting around long enough.

Cody Maloney

On Sun, Mar 14, 2010 at 12:07 AM, Cody Maloney
<cmaloney at theoreticalchaos.com> wrote:
> Thanks for the comments. Here's an updated patch. It looks like
> png_jmpbuf has actually been available since libpng 1.0.6 or before
> when png_ptr->jmpbuf was first deprecated.
>
> From: Cody Maloney <cmaloney at theoreticalchaos.com>
>
> setjmp(png_ptr->jmpbuf) is depreceated so removed it and changed the
> configure.ac version number to accept libpng12 or libpng14
>
> Signed-off-by: Cody Maloney <cmaloney at theoreticalchaos.com>
> Tested-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
> ---
>  configure.ac |    2 +-
>  xcursorgen.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e7344ba..7a57230 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -18,7 +18,7 @@ AC_PROG_INSTALL
>  XORG_DEFAULT_OPTIONS
>
>  # Checks for pkg-config packages
> -PKG_CHECK_MODULES(XCURSORGEN, x11 xcursor libpng12)
> +PKG_CHECK_MODULES(XCURSORGEN, x11 xcursor libpng >= 1.2.0)
>  AC_SUBST(XCURSORGEN_CFLAGS)
>  AC_SUBST(XCURSORGEN_LIBS)
>
> diff --git a/xcursorgen.c b/xcursorgen.c
> index fc80f6d..daae18b 100644
> --- a/xcursorgen.c
> +++ b/xcursorgen.c
> @@ -196,7 +196,7 @@ load_image (struct flist *list, char *prefix)
>       return NULL;
>     }
>
> -  if (setjmp (png->jmpbuf))
> +  if (setjmp (png_jmpbuf(png)))
>     {
>       png_destroy_read_struct (&png, &info, NULL);
>       return NULL;
> --
> 1.7.0.2
>
>
> On Sat, Mar 13, 2010 at 10:42 PM, Yaakov (Cygwin/X)
> <yselkowitz at users.sourceforge.net> wrote:
>> On 2010-03-13 00:19, Cody Maloney wrote:
>>>
>>> setjmp(png_ptr->jmpbuf) is depreceated so removed it and bumped the
>>> version number in configure.ac
>>> ---
>>>  configure.ac |    2 +-
>>>  xcursorgen.c |    2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index e7344ba..0255ba3 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -18,7 +18,7 @@ AC_PROG_INSTALL
>>>  XORG_DEFAULT_OPTIONS
>>>
>>>  # Checks for pkg-config packages
>>> -PKG_CHECK_MODULES(XCURSORGEN, x11 xcursor libpng12)
>>> +PKG_CHECK_MODULES(XCURSORGEN, x11 xcursor libpng14)
>>
>> Make this libpng >= 1.2.0 instead of libpng14.  png_jmpbuf is available in
>> 1.2 as well and IMO it's a bit early to outright *require* libpng14.
>>
>>> diff --git a/xcursorgen.c b/xcursorgen.c
>>> index fc80f6d..daae18b 100644
>>> --- a/xcursorgen.c
>>> +++ b/xcursorgen.c
>>> @@ -196,7 +196,7 @@ load_image (struct flist *list, char *prefix)
>>>       return NULL;
>>>     }
>>>
>>> -  if (setjmp (png->jmpbuf))
>>> +  if (setjmp (png_jmpbuf(png)))
>>>     {
>>>       png_destroy_read_struct (&png,&info, NULL);
>>>       return NULL;
>>> --
>>> 1.7.0.2
>>
>> With the above-noted change:
>>
>> Tested-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
>>
>>
>> Yaakov
>> Cygwin/X
>> _______________________________________________
>> xorg-devel at lists.x.org: X.Org development
>> Archives: http://lists.x.org/archives/xorg-devel
>> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>>
>


More information about the xorg-devel mailing list