commit ddd8339e262cbb7b25993599299ad40e0c95ccf6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 17 08:19:26 2023 -0800

    libXpm 3.5.15
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 8178eb0834d82242e1edbc7d4fb0d1b397569c68
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jan 16 19:44:52 2023 +1000

    Use gzip -d instead of gunzip
    
    GNU gunzip [1] is a shell script that exec's `gzip -d`. Even if we call
    /usr/bin/gunzip with the correct built-in path, the actual gzip call
    will use whichever gzip it finds first, making our patch pointless.
    
    Fix this by explicitly calling gzip -d instead.
    
    https://git.savannah.gnu.org/cgit/gzip.git/tree/gunzip.in
    
    [Part of the fix for CVE-2022-4883]
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit c5ab17bcc34914c0b0707d2135dbebe9a367c5f0
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Thu Jan 12 15:05:39 2023 +1000

    Prevent a double free in the error code path
    
    xpmParseDataAndCreate() calls XDestroyImage() in the error path.
    Reproducible with sxpm "zero-width.xpm", that file is in the test/
    directory.
    
    The same approach is needed in the bytes_per_line == 0 condition though
    here it just plugs a memory leak.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 515294bb8023a45ff916696d0a14308ff4f3a376
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 6 12:50:48 2023 -0800

    Fix CVE-2022-4883: compression commands depend on $PATH
    
    By default, on all platforms except MinGW, libXpm will detect if a
    filename ends in .Z or .gz, and will when reading such a file fork off
    an uncompress or gunzip command to read from via a pipe, and when
    writing such a file will fork off a compress or gzip command to write
    to via a pipe.
    
    In libXpm 3.5.14 or older these are run via execlp(), relying on $PATH
    to find the commands.  If libXpm is called from a program running with
    raised privileges, such as via setuid, then a malicious user could set
    $PATH to include programs of their choosing to be run with those
    privileges.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f80fa6ae47ad4a5beacb287c0030c9913b046643
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jan 7 12:44:28 2023 -0800

    Fix CVE-2022-44617: Runaway loop with width of 0 and enormous height
    
    When reading XPM images from a file with libXpm 3.5.14 or older, if a
    image has a width of 0 and a very large height, the ParsePixels() function
    will loop over the entire height calling getc() and ungetc() repeatedly,
    or in some circumstances, may loop seemingly forever, which may cause a
    denial of service to the calling program when given a small crafted XPM
    file to parse.
    
    Closes: #2
    
    Reported-by: Martin Ettl <ettl.martin78@googlemail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f7fbbb92f6d383b21dd1587c3703a5de37c625b5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 3 17:23:58 2023 -0800

    test: add test cases for CVE-2022-44617 (zero-width w/enormous height)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit a3a7c6dcc3b629d765014816c566c63165c63ca8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Dec 17 12:23:45 2022 -0800

    Fix CVE-2022-46285: Infinite loop on unclosed comments
    
    When reading XPM images from a file with libXpm 3.5.14 or older, if a
    comment in the file is not closed (i.e. a C-style comment starts with
    "/*" and is missing the closing "*/"), the ParseComment() function will
    loop forever calling getc() to try to read the rest of the comment,
    failing to notice that it has returned EOF, which may cause a denial of
    service to the calling program.
    
    Reported-by: Marco Ivaldi <raptor@0xdeadbeef.info>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f7a167a48a950b89b91f5123a0ec8d9a7cb97495
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Dec 17 12:18:24 2022 -0800

    test: add test case for CVE-2022-46285 (unclosed comments)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 0ff2c6af823ce7712c06150c43c9b403846a035f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jan 7 15:43:20 2023 -0800

    cxpm: getc/ungetc wrappers should not adjust position when c == EOF
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 501494c6c68a84114fdd0b44d4b67ef9cde776c9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jan 7 13:39:56 2023 -0800

    test: Add unit tests using glib framework
    
    Includes rudimentary tests for XpmReadFileToXpmImage, XpmReadFileToData,
    XpmReadFileToBuffer, XpmCreateXpmImageFromData, XpmCreateXpmImageFromBuffer,
    XpmWriteFileFromXpmImage, XpmWriteFileFromData, XpmWriteFileFromBuffer,
    XpmAttributesSize, XpmGetErrorString, XpmLibraryVersion
    
    Includes test cases for CVE-2004-0687
    
    Tests .Z and .gz files if --enable-open-zfile is active
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 4841039e5385f264d12757903894f47c64f59361
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jan 5 15:42:36 2023 -0800

    configure: add --disable-open-zfile instead of requiring -DNO_ZPIPE
    
    Documents the two compression options in the README, makes their
    configure options reflect the interdependency of their implementation,
    and makes the configure script report their configuration.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit aef0c8dd129838ac35b3cf8a7cdf04c7fd67dff1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jan 1 14:19:17 2023 -0800

    man pages: Apply standard man page style/formatting
    
    Function & macro names in bold, argument names in italics.
    
    In the man page body, bold function names followed by plain ()
    for functions defined in this page, plain (3) for functions defined
    in other man pages.
    
    New paragraphs start with .PP, not just a blank line.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 5d55a0be3f8a8d3e53c65c286878fc3224fce135
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jan 1 10:48:01 2023 -0800

    man pages: Replace "See Also" entries with more useful ones
    
    "See Also" entries in man pages should list other man pages to
    look at, not the alternate names for the current man page.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 392cb8fb444ae632176829076f412cb4029dbdbc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jan 1 10:21:38 2023 -0800

    man pages: Fix typos and other minor editing
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 08bc174f28af028b6ebaa9edeccd3ff56c396e92
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Nov 19 12:23:53 2022 -0800

    libXpm 3.5.14
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f0857c0de206e90777a5321cce9602083b283080
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 27 10:06:23 2022 -0700

    man pages: Correct Copyright/License notices
    
    Since the text was copied from doc/xpm.PS.gz, the copyright and license
    notices need to be copied from there as well.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit deb81a9a210527b0a00f002b1796e5e21e492879
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 26 18:39:17 2022 -0700

    man pages: Fix typos
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 2d5fa4c2079494f502f9a576d749fa1e205f2144
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 26 18:29:05 2022 -0700

    man pages: Add missing word 'function' where needed
    
    A number of instances of 'The Xpm... function' were missing the word
    "function", so read awkwardly.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 2b7357e83e38e2a860687ee4150ef60bd6c0a47f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 26 18:16:42 2022 -0700

    man pages: Make function synopses more consistent with other pages
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit fb8590c9c57d661ec4a29da243e05b9d87b999d3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 26 18:06:51 2022 -0700

    man pages: Fix shadow man pages
    
    Shadow man pages have a .so line that needs to list the file to be
    shown, not the name of the shadow page.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit bfaebfdcc92433a8b78c004de4bb3c5a8a545e75
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 26 17:49:25 2022 -0700

    man pages: Make file names consistent with their displayed names
    
    Lets users view the pages using the name displayed on the pages
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 7a138a5278890e122731eb94b8e5a7d6ef543243
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 17 16:29:35 2022 -0700

    gitlab CI: add a basic build test
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 3433f4334db7c30864c112639a929c5ae8bd3c3b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 17 16:27:01 2022 -0700

    man: strip trailing whitespace
    
    git diff -w shows no changes from this commit
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 961245427855ab6d30a5fa2dbb98aaffa571d728
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 17 16:25:38 2022 -0700

    Fix spelling/wording issues
    
    Found by using:
        codespell --builtin clear,rare,usage,informal,code,names
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit fa16fbda9c90f932a74cd80c90eee88432d987d7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 17 16:23:04 2022 -0700

    Build xz tarballs instead of bzip2
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 83e5427f9cd5d32602bcf647547e0030ea361f00
Author: Walter Harms <wharms@bfs.de>
Date:   Wed Dec 25 20:40:04 2019 +0100

    update man pages
    
    move from k&r to ansi prototypes
    improve nroff coding
    
    Signed-off-by: Walter Harms <wharms@bfs.de>

commit e48e649eb04f95ffbdbd0c8bb77d7131142f5e9a
Author: Walter Harms <wharms@bfs.de>
Date:   Tue Dec 24 17:20:09 2019 +0100

    add man pages based on doc/xpm.PS
    
    More or less hand crafted man pages based on xpm.PS.
    Prototypes are still in K&R, see also is a dud
    
    Signed-off-by: Walter Harms <wharms@bfs.de>

commit b0fc485495a694816d76a43978e2cfd5575c554d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 13 14:25:06 2019 +1000

    libXpm 3.5.13
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 5817fd4ac5308fe7c23301c652f174997009b7d5
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Wed Dec 4 11:17:21 2019 +0100

    parse: simplify error paths in xpmParseColors()
    
    We introduced a new label to handle the errors, we should use it
    for the rest of the function.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

commit e1d8f704d52f70680869b7aae1da0ad2382db363
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 5 06:17:00 2019 +1000

    parse: avoid memleak on error with STRLCAT/STRLCPY
    
    The original macro might exit the function without freeing `colorTable`.
    
    Move the macros into a slightly less awful helper function and use goto
    to clean up in case of error.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 7af7c5e275b69daedee3696bee1e880586f30373
Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date:   Fri May 3 07:59:09 2019 +0200

    Allow usage when fork() is not available
    
    When fork() is not available, we need to define NO_ZPIPE so that
    libXpm doesn't try to fork/exec to use a pipe to uncompress compressed
    .xpm files. There is obviously a loss of functionality, but loading
    uncompressed .xpm files should continue to work.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    [Retrieved from:
    https://git.buildroot.net/buildroot/tree/package/x11r7/xlib_libXpm/0001-fork-check.patch]
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

commit 0be2c6712728cea1fa1bcc640e564c45c2c82e37
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Dec 7 19:47:06 2018 -0800

    Update configure.ac bug URL for gitlab migration
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit c9f8faf1c05fb92abc6c5b1db5e45eb1a7942875
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Nov 19 22:30:30 2018 -0800

    Update README for gitlab migration
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 73a1e769dcf2a603fc63f5c36626c1c6db815f46
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Sep 30 15:09:29 2018 -0700

    After fdopen(), use fclose() instead of close() in error path
    
    Found by Oracle's Parfait 2.2 static analyzer:
    
    Error: File Leak
       File Leak [file-ptr-leak]:
          Leaked File fp
            at line 94 of lib/libXpm/src/RdFToBuf.c in function 'XpmReadFileToBuffer
    '.
              fp initialized at line 86 with fdopen
              fp leaks when len < 0 at line 92.
    
    Introduced-by: commit 8b3024e6871ce50b34bf2dff924774bd654703bc
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

commit bc1b4962f048cfa33b76be46493e10cfb256fe98
Author: Dave Bodenstab <the.tick@gmx.com>
Date:   Wed Feb 22 12:04:54 2012 +0000

    Windows build fixes
    
    https://bugs.freedesktop.org/show_bug.cgi?id=46475
    https://bugs.freedesktop.org/attachment.cgi?id=57479
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit e42ca7b484418b169fd19a4c68e23ad2a6ec7a11
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Thu Jan 26 13:52:49 2017 +1000

    autogen: add default patch prefix
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>

commit ed8f9c2e8b635eb63497c48b24a056f9e6f50609
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon Mar 9 12:00:52 2015 +0000

    autogen.sh: use quoted string variables
    
    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
    fall-outs, when they contain space.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 644d7c595ba29fb368666fb497e1e14a92a65a77
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 24 10:32:07 2017 +1000

    autogen.sh: use exec instead of waiting for configure to finish
    
    Syncs the invocation of configure with the one from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit 1fab5e81fd761f628fb68d22934615536dbd0220
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Mon Dec 12 23:09:52 2016 +0100

    libXpm 3.5.12
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>

commit 8b3024e6871ce50b34bf2dff924774bd654703bc
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Sun Dec 11 13:50:05 2016 +0100

    Handle size_t in file/buffer length
    
    The values of file sizes and buffer sizes can exceed current limits.
    Therefore, use proper variable types for these operations.
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit d1167418f0fd02a27f617ec5afd6db053afbe185
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Thu Dec 8 17:07:55 2016 +0100

    Avoid OOB write when handling malicious XPM files.
    
    libXpm uses unsigned int to store sizes, which fits size_t on 32 bit
    systems, but leads to issues on 64 bit systems.
    
    On 64 bit systems, it is possible to overflow 32 bit integers while
    parsing XPM extensions in a file.
    
    At first, it looks like a rather unimportant detail, because nobody
    will seriously open a 4 GB file. But unfortunately XPM has support for
    gzip compression out of the box. An attacker can therefore craft a
    compressed file which is merely 4 MB in size, which makes an attack
    much for feasable.
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 1ec33006a9e4214b390045b820464e24297dc6c0
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Tue Dec 6 22:34:33 2016 +0100

    Gracefully handle EOF while parsing files.
    
    libXpm does not properly handle EOF conditions when xpmGetC is called
    multiple times in a row to construct a string. Instead of checking
    its return value for EOF, the result is automatically casted into a
    char and attached to a string.
    
    By carefully crafting the color table in an XPM file, it is possible to
    send a libXpm program like gimp into a very long lasting loop and
    massive memory allocations.
    
    Otherwise no memory issues arise, therefore this is just a purely
    functional patch to dismiss invalid input.
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Matthieu Herrb <Matthieu@herrb.eu>

commit c46dedeba15edf7216d62633ed6daf40cd1f5bfd
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Tue Dec 6 22:31:53 2016 +0100

    Fix out out boundary read on unknown colors
    
    libXpm is vulnerable to an out of boundary read if an XPM file contains
    a color with a symbolic name but without any default color value.
    
    A caller must set XpmColorSymbols and a color with a NULL name in
    the supplied XpmAttributes to XpmReadFileToImage (or other functions of
    this type) in order to trigger this issue.
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 42ca8d956276bc00bec09e410d76daf053ae35f9
Author: Jörg Sonnenberger  <joerg@NetBSD.org>
Date:   Wed Mar 19 09:26:37 2014 +0100

    Fix abs() usage.
    
    For long arguments, use labs().
    
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

commit 3425cbb0e6086f74783eafbe23df1121b655e006
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Sep 7 21:40:17 2013 -0700

    libXpm 3.5.11
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 4bab3b62a47996ee77b8ddebcd92f0ebe9679c28
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Sep 7 21:36:51 2013 -0700

    Fix typo in COPYING (matches src/amigax.h)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 9e38750da16c6e5bd8bb26b00d74041ddf9be3e8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Aug 2 22:22:09 2013 -0700

    Add noreturn attributes suggested by gcc
    
    Remove extra bogus return added to avoid warnings when calling Punt()
    since gcc didn't know it would never return.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 93f900ceac7ac899e00998adc8782ed02b352930
Author: Eric S. Raymond <esr@thyrsus.com>
Date:   Wed Jun 19 06:19:18 2013 -0400

    doclifter can't handle more than one dash in a name line.

commit 22734e4439b3609a6b621d8e7ef8465f0a2ac0d5
Author: Claudio Bley <cbley@av-test.de>
Date:   Mon May 27 09:32:05 2013 +0200

    Fix libXpm build with NO_ZPIPE
    
    When NO_ZPIPE is defined, fcntl.h is not included in WrFFrI.c
    although OpenWriteFile uses open, O_WRONLY, O_CREAT and O_TRUNC.
    
        * src/WrFFrI.c: unconditionally include fcntl.h regardless
         of NO_ZPIPE being defined or not.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit e439f6e7163e3259f11f3363fa319e8a29085a92
Author: Christophe CURIS <christophe.curis@free.fr>
Date:   Wed May 1 10:39:38 2013 +0200

    Added 'const' attribute to all filename arguments in the API
    
    The filename is always a read-only argument, so it is a good idea
    to let the caller now about it.
    
    This patch does not change active code; the place where the attribute
    is added will not break source-level compatibility because it adds
    no restriction on caller side, just adds information; because the
    lib code behaved the same way it will not break the binary interface
    either.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 01ee6b9c500cd9c67f167e68c8383e8c58db5ddf
Author: Christophe CURIS <christophe.curis@free.fr>
Date:   Wed May 1 10:39:37 2013 +0200

    Added 'const' qualifier to the filename argument to internal functions
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 980e9f851e47d31eed9635a6399a23d1456548d0
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Apr 22 13:23:09 2013 -0700

    Close fd if fdopen() or xpmPipeThrough() fails in OpenWriteFile()
    
    Fixes leak found by parfait 1.1 bug checking tool:
       File Descriptor Leak: Leaked File Descriptor fd
            at line 350 of lib/libXpm/src/WrFFrI.c in function 'OpenWriteFile'.
              fd initialized at line 332 with open
              fd leaks when strcmp(".Z", (filename + (len - 2))) != 0 at line 337
                  and strcmp(".gz", (filename + (len - 3))) != 0 at line 340.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>

commit 81608285e11f2455800001a965dfece878861162
Author: Colin Walters <walters@verbum.org>
Date:   Wed Jan 4 17:37:06 2012 -0500

    autogen.sh: Implement GNOME Build API
    
    http://people.gnome.org/~walters/docs/build-api.txt
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 4c3e0ff63a7c71daaafdcdaa1d619063e0cf4a63
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jan 15 14:28:48 2013 -0500

    configure: Remove AM_MAINTAINER_MODE
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 4ca8014afbb66f0b65cdcd8ea12e469f52c8c70c
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date:   Mon Jan 2 22:45:53 2012 +0000

    Define NO_ZPIPE when building for MinGW
    
    Define NO_ZPIPE when building for MinGW, decompressing via a pipe isn't implemented.
    (since xpmPipeThrough() is only written in terms of fork() currently...)
    
    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
    Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
    Reviewed-by: Ángel González <ingenit@zoho.com>

commit acaaea96776b36c097d5413040c5ce85d3ae6cb9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Mar 7 20:39:55 2012 -0800

    libXpm 3.5.10
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 1450186652cb9d2efe55c8da7cb64996eddd34c7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Nov 18 23:25:16 2011 -0800

    closeness_cmp: maintain constness when casting pointers
    
    create.c: In function 'closeness_cmp':
    create.c:224:5: warning: cast discards qualifiers from pointer target type
    create.c:224:5: warning: cast discards qualifiers from pointer target type
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 7aa7b34491de534da56d637552ee86f94f038cc3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Nov 18 23:22:12 2011 -0800

    sxpm: make ErrorMessage take const char * arg to fix -Wwrite-strings warnings
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 4cedf181bcfe13e5d206554c51edb82cb17e7ad5
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Nov 11 10:17:11 2011 -0800

    Include missing headers
    
    This fixes implicit declarations for strdup and strcasecmp.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 933b5d1f1fe9273d1a984707687b36ec61c4c5af
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Nov 10 21:32:15 2011 -0800

    Fix gcc -Wwrite-strings warnings that don't require public API changes
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 696be14bcb4daef5280b425e297223c6ae530cb5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Nov 10 21:03:44 2011 -0800

    Assume C89 and just use const, not local Const macro
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 29972ebbb2409bcba87637069a7ad9a958b3325d
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Sep 24 19:18:56 2011 +0200

    Link sxpm against -lX11
    
    It calls various Xlib functions so should link with -lX11 directly.
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

commit 3ea70059805b3ebc795f797b5880b90b6b3a9235
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Sep 16 22:48:53 2011 -0700

    Strip trailing whitespace
    
    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
    git diff -w & git diff -b show no diffs from this change
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 0c9e200c3975917f5d78eac67b1f4cedefd73079
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sat Mar 5 20:39:03 2011 -0500

    man: add missing title header (.TH) __xorgversion__
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 0f8f24302bb0e35eaab16f16358bf9c44f9f3af1
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sat Mar 5 15:35:17 2011 -0500

    config: move man pages into their own directory
    
    As per X.Org guidelines.
    Fix whitespace issues.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 9c622c5fc82f2a19ae41e75398fee4ff1de52a1d
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Wed Feb 2 11:43:44 2011 -0500

    config: minor layout change in configure.ac
    
    Group statements per section as per Autoconf standard layout
    Quote statements where appropriate.
    No functional configuration changes
    
    This helps automated maintenance and release activities.
    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 22a434d061af224536baee6c6110b603c5c96b2c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Oct 29 17:29:25 2010 -0700

    libXpm 3.5.9
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit c11f1bd18303139f070e1873382632ee80cd9878
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Wed Oct 20 08:30:56 2010 -0400

    config: remove obsolete FILES file from the Imakefile days
    
    It lists the files contained in the original
    BULL Research Koala Project.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 0ea6c432a068fc4edf90c614e68a4f4be94edd14
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Oct 17 12:51:15 2010 -0400

    doc: move doc files to the newly created doc dir.
    
    As per guidelines for all xorg modules.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 7a3e69cfb079c7345f3d9b1217f373a706ba544c
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Oct 15 17:14:39 2010 -0400

    config: provide a Makefile for the include directory
    
    Reduce some complexity in the src makefile as it should not
    handle sibling directories.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit e50f645f4cc5bb1db0e025fc6e39c6e84a894c13
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Oct 15 14:56:32 2010 -0400

    libXpm make: remove redundant -I.
    
    It is always included by Automake
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 8dee37ff3bb908d597d53f2b335fc2111643cce7
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Oct 24 19:39:54 2010 -0400

    sxpm make: no need to use a per target LDADD
    
    There is only one program in this makefile.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 34abbaaacddf1018d1805bc4890226ab200a50fb
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Oct 15 11:45:58 2010 -0400

    sxpm make: remove redundant $(XMP_LIBS) linker flags
    
    SXPM_LIBS contains the complete list of dependencies.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit b818f5cf7f7d8240db2a94ebcc28603730760e48
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Oct 15 10:21:08 2010 -0400

    src make: remove -I$(top_builddir)/include
    
    This directory does not exist, only object code is created
    in "builddir".
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 78bca7e85b930593fefe85cc51b5e24f98de31d0
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 21:56:21 2010 -0400

    config: fix warnings, m4 quoting and layout
    
    Fix some m4 quoting
    Fix some autoconf warnings
    Regroup statements per section
    Add comments
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 8e47c819490331c01959332e067f06a382d9a14a
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:35:47 2010 -0400

    config: AC_OUTPUT with parms is deprecated, use AC_CONFIG_FILES
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit c6915d034fa3f72a9724816d2e3f5e8432ef9321
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:33:40 2010 -0400

    config: AC_HELP_STRING is deprecated, use AS_HELP_STRING
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit e2fdf80a7f9feedacf67e46a8e577b2e6d415a5f
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:29:42 2010 -0400

    config: remove unrequired AC_SUBST(XPM_CFLAGS)
    
    This macro is called by PKG_CHECK_MODULES
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 937d8c8cf82bd57e82152af3768bdbfc5de4316a
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:28:43 2010 -0400

    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
    
    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
    AC_PROG_C_C99. This sets gcc with -std=gnu99.
    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 0ed9cb4546d0c65f08a9511736400c0f7fba982f
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:28:08 2010 -0400

    config: remove unrequired AC_HEADER_STDC
    
    Autoconf says:
    "This macro is obsolescent, as current systems have conforming
    header files. New programs need not use this macro".
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit e99bce47294eab031fc733d695e3c9589b52aff8
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:25:00 2010 -0400

    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
    
    Regroup AC statements at the top.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 0b5e15c685d295262bf2307d65bee3a0b28e74f5
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:15:08 2010 -0400

    sxpm: use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    The value of MAN_SUBST is the same for all X.Org packages.
    
    Use the appropriate platform version of sed
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 262bb7e9426150f6c7b553d184c51d3884d04adf
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:11:43 2010 -0400

    cxpm: use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    The value of MAN_SUBST is the same for all X.Org packages.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit acd4856aac05a884376736196154842959803aa6
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:03:13 2010 -0400

    config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
    
    It depends on util-macros 1.8
    The LT_AC_PROG_SED macro was never released by libtool.
    Neither man makefile actually used $SED anyway.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit d1bd1fbc6d7f7b4817aca4fecd8ccfe80a1c2f03
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Oct 14 20:02:30 2010 -0400

    config: upgrade to util-macros 1.8 for additional man page support
    
    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
    The value of MAN_SUBST is the same for all X.Org packages.
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit 3b20344bf3c5ae7a8291041d4887dc8f23644d40
Author: Colin Harrison <colin.harrison@virgin.net>
Date:   Thu Oct 7 13:49:17 2010 +0200

    Missing end comment in libXpm/src/parse.c
    
    CVS tag removal chopped too much out in this case...
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

commit f8f0a68247b920052df0796a39ebcdc2e4161d05
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date:   Tue Sep 28 13:30:03 2010 -0700

    Purge cvs tags.
    
    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit d026662cce0808cf402e0d50932d90984a2ea1bb
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Apr 1 21:11:35 2010 -0400

    config: update AC_PREREQ statement to 2.60
    
    Unrelated to the previous patches, the new value simply reflects
    the reality that the minimum level for autoconf to configure
    all x.org modules is 2.60 dated June 2006.
    
    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit d4a7b15b3ed9e7cf94dbf64f929ae954bada9f60
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Thu Apr 1 21:07:54 2010 -0400

    config: update and relocate AX_DEFINE_DIR macro
    
    Remove deprecated acinclude.m4 macro container file
    Use separate macro files as per autoconf recommendation
    Use the latest version of the macro from GNU
    
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

commit e0920779d1227338e61aaab16458b9daad508c36
