sync with OpenBSD -current

This commit is contained in:
purplerain 2025-01-10 01:40:29 +00:00
parent 4b49aefbb1
commit 1fd36b57f8
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
945 changed files with 81965 additions and 59988 deletions

View file

@ -1,27 +1,27 @@
# $OpenBSD: 3RDPARTY,v 1.434 2024/10/17 10:58:51 jsg Exp $ # $OpenBSD: 3RDPARTY,v 1.438 2025/01/04 15:59:22 matthieu Exp $
# #
Package: Freetype Package: Freetype
Version: 2.13.2 Version: 2.13.2
Current Vers: 2.13.2 Current Vers: 2.13.3
Maintainer: Freetype.org Maintainer: Freetype.org
Archive Site: http://download.savannah.gnu.org/releases/freetype/ Archive Site: http://download.savannah.gnu.org/releases/freetype/
Package: xterm Package: xterm
Version: 393 Version: 395
Current Vers: 394 Current Vers: 396
Maintainer: Thomas E. Dickey Maintainer: Thomas E. Dickey
Archive Site: http://invisible-island.net/xterm/xterm.html Archive Site: http://invisible-island.net/xterm/xterm.html
Package: Mesa Package: Mesa
Version 23.3.6 Version 23.3.6
Current Vers: 24.2.5 Current Vers: 24.3.1
Maintainer: Brian Paul Maintainer: Brian Paul
Archive Site: https://archive.mesa3d.org/ Archive Site: https://archive.mesa3d.org/
Package: libdrm Package: libdrm
Version: 2.4.123 Version: 2.4.123
Current Vers: 2.4.123 Current Vers: 2.4.124
Maintainer: Freedesktop.org Maintainer: Freedesktop.org
Archive Site: https://dri.freedesktop.org/libdrm/ Archive Site: https://dri.freedesktop.org/libdrm/
@ -43,7 +43,7 @@ Current Vers: 2.22
Archive Site: https://github.com/intel/libva Archive Site: https://github.com/intel/libva
Package: fontconfig Package: fontconfig
Version: 2.14.2 Version: 2.15.0
Current Vers: 2.15.0 Current Vers: 2.15.0
Maintainer: Akira TAGOH Maintainer: Akira TAGOH
Archive Site: https://www.fontconfig.org/ Archive Site: https://www.fontconfig.org/

70
MODULES
View file

@ -1,21 +1,21 @@
# $OpenBSD: MODULES,v 1.529 2024/10/06 08:44:04 matthieu Exp $ # $OpenBSD: MODULES,v 1.534 2024/12/23 10:15:04 matthieu Exp $
# #
# X.Org maintained modules # X.Org maintained modules
# #
app/appres 1.0.7 app/appres 1.0.7
app/bdftopcf 1.1.1 app/bdftopcf 1.1.2
app/beforelight 1.0.6 app/beforelight 1.0.6
app/bitmap 1.1.1 app/bitmap 1.1.1
app/editres 1.0.9 app/editres 1.0.9
app/fonttosfnt 1.2.3 app/fonttosfnt 1.2.4
app/iceauth 1.0.10 app/iceauth 1.0.10
app/ico 1.0.6 app/ico 1.0.6
app/listres 1.0.6 app/listres 1.0.6
app/luit 1.1.1 remove? app/luit 1.1.1 remove?
app/mkcomposecache 1.2.2 needs-import app/mkcomposecache 1.2.2 needs-import
app/mkfontscale 1.2.3 app/mkfontscale 1.2.3
app/oclock 1.0.5 app/oclock 1.0.6
app/rgb 1.1.0 remove? app/rgb 1.1.0 remove?
app/sessreg 1.1.3 app/sessreg 1.1.3
app/setxkbmap 1.3.4 app/setxkbmap 1.3.4
@ -24,13 +24,13 @@ app/twm 1.0.12
app/viewres 1.0.7 app/viewres 1.0.7
app/x11perf 1.7.0 app/x11perf 1.7.0
app/xauth 1.1.3 app/xauth 1.1.3
app/xbacklight 1.2.3 app/xbacklight 1.2.4
app/xbiff 1.0.5 app/xbiff 1.0.5
app/xcalc 1.1.2 app/xcalc 1.1.2
app/xclipboard 1.1.4 app/xclipboard 1.1.5
app/xclock 1.1.1 app/xclock 1.1.1
app/xcmsdb 1.0.6 app/xcmsdb 1.0.7
app/xcompmgr 1.1.9 app/xcompmgr 1.1.10
app/xconsole 1.0.8 app/xconsole 1.0.8
app/xdpyinfo 1.3.4 app/xdpyinfo 1.3.4
app/xdriinfo 1.0.7 app/xdriinfo 1.0.7
@ -46,22 +46,22 @@ app/xhost 1.0.9
app/xinit 1.4.2 app/xinit 1.4.2
app/xinput 1.6.4 app/xinput 1.6.4
app/xkbcomp 1.4.7 reverted app/xkbcomp 1.4.7 reverted
app/xkbevd 1.1.5 app/xkbevd 1.1.6
app/xkbprint 1.0.6 app/xkbprint 1.0.7
app/xkbutils 1.0.6 app/xkbutils 1.0.6
app/xkill 1.0.6 app/xkill 1.0.6
app/xload 1.2.0 app/xload 1.2.0
app/xlogo 1.0.6 app/xlogo 1.0.7
app/xlsatoms 1.1.4 app/xlsatoms 1.1.4
app/xlsclients 1.1.5 app/xlsclients 1.1.5
app/xlsfonts 1.0.8 app/xlsfonts 1.0.8
app/xmag 1.0.7 app/xmag 1.0.8
app/xmessage 1.0.7 app/xmessage 1.0.7
app/xmodmap 1.0.11 app/xmodmap 1.0.11
app/xmore 1.0.4 app/xmore 1.0.4
app/xpr 1.2.0 app/xpr 1.2.0
app/xprop 1.2.7 app/xprop 1.2.8
app/xrandr 1.5.2 app/xrandr 1.5.3
app/xrdb 1.2.2 app/xrdb 1.2.2
app/xrefresh 1.1.0 app/xrefresh 1.1.0
app/xset 1.2.5 app/xset 1.2.5
@ -71,7 +71,7 @@ app/xvidtune 1.0.4
app/xvinfo 1.1.5 app/xvinfo 1.1.5
app/xwd 1.0.9 app/xwd 1.0.9
app/xwininfo 1.1.6 app/xwininfo 1.1.6
app/xwud 1.0.6 app/xwud 1.0.7
data/bitmaps 1.1.3 data/bitmaps 1.1.3
@ -82,7 +82,7 @@ driver/xf86-input-elographics 1.4.3
driver/xf86-input-fpit 1.4.0 driver/xf86-input-fpit 1.4.0
driver/xf86-input-hyperpen 1.4.1 driver/xf86-input-hyperpen 1.4.1
driver/xf86-input-joystick 1.6.4 driver/xf86-input-joystick 1.6.4
driver/xf86-input-keyboard 2.0.0 driver/xf86-input-keyboard 2.1.0 needs-update
driver/xf86-input-mouse 1.9.5 driver/xf86-input-mouse 1.9.5
driver/xf86-input-mutouch 1.3.0 driver/xf86-input-mutouch 1.3.0
driver/xf86-input-penmount 1.5.0 driver/xf86-input-penmount 1.5.0
@ -97,11 +97,11 @@ driver/xf86-video-cirrus 1.6.0 needs-update
driver/xf86-video-dummy 0.4.1 driver/xf86-video-dummy 0.4.1
driver/xf86-video-geode 2.11.21 needs-update driver/xf86-video-geode 2.11.21 needs-update
driver/xf86-video-intel 2.99.917 needs-update driver/xf86-video-intel 2.99.917 needs-update
driver/xf86-video-mach64 6.9.7 driver/xf86-video-mach64 6.10.0 needs-update
driver/xf86-video-mga 2.0.1 driver/xf86-video-mga 2.1.0 needs-update
driver/xf86-video-nv 2.1.23 needs-update driver/xf86-video-nv 2.1.23 needs-update
driver/xf86-video-openchrome 0.6.179 needs-update driver/xf86-video-openchrome 0.6.179 needs-update
driver/xf86-video-r128 6.12.1 driver/xf86-video-r128 6.13.0 needs-update
driver/xf86-video-savage 2.4.1 needs-update driver/xf86-video-savage 2.4.1 needs-update
driver/xf86-video-siliconmotion 1.7.10 needs-update driver/xf86-video-siliconmotion 1.7.10 needs-update
driver/xf86-video-sunffb 1.2.3 driver/xf86-video-sunffb 1.2.3
@ -147,42 +147,42 @@ font/util 1.4.1
font/winitzki-cyrillic 1.0.4 font/winitzki-cyrillic 1.0.4
font/xfree86-type1 1.0.5 font/xfree86-type1 1.0.5
lib/libICE 1.1.1 lib/libICE 1.1.2 needs-update
lib/libSM 1.2.4 lib/libSM 1.2.5 needs-update
lib/libX11 1.8.10 lib/libX11 1.8.10
lib/libXScrnSaver 1.2.4 lib/libXScrnSaver 1.2.4
lib/libXau 1.0.11 lib/libXau 1.0.12 needs-update
lib/libXaw 1.0.16 lib/libXaw 1.0.16
lib/libXcomposite 0.4.6 lib/libXcomposite 0.4.6
lib/libXcursor 1.2.2 lib/libXcursor 1.2.3
lib/libXdamage 1.1.6 lib/libXdamage 1.1.6
lib/libXdmcp 1.1.5 lib/libXdmcp 1.1.5
lib/libXext 1.3.6 lib/libXext 1.3.6
lib/libXfixes 6.0.1 lib/libXfixes 6.0.1
lib/libXfont2 2.0.7 needs-update lib/libXfont2 2.0.7
lib/libXft 2.3.8 lib/libXft 2.3.8
lib/libXi 1.8.2 needs-update lib/libXi 1.8.2
lib/libXinerama 1.1.5 lib/libXinerama 1.1.5
lib/libXmu 1.2.1 lib/libXmu 1.2.1
lib/libXpm 3.5.17 lib/libXpm 3.5.17
lib/libXpresent 1.0.1 lib/libXpresent 1.0.1
lib/libXrandr 1.5.4 lib/libXrandr 1.5.4
lib/libXrender 0.9.11 lib/libXrender 0.9.12 needs-update
lib/libXres 1.2.2 lib/libXres 1.2.2
lib/libXt 1.3.0 lib/libXt 1.3.1 needs-update
lib/libXtst 1.2.5 lib/libXtst 1.2.5
lib/libXv 1.0.12 lib/libXv 1.0.13 needs-update
lib/libXvMC 1.0.14 lib/libXvMC 1.0.14
lib/libXxf86dga 1.1.6 lib/libXxf86dga 1.1.6
lib/libXxf86vm 1.1.5 lib/libXxf86vm 1.1.6 needs-update
lib/libfontenc 1.1.8 lib/libfontenc 1.1.8
lib/libpciaccess 0.18.1 lib/libpciaccess 0.18.1
lib/libxcb 1.17.0 lib/libxcb 1.17.0
lib/libxcvt 0.1.2 lib/libxcvt 0.1.3 needs-update
lib/libxkbfile 1.1.3 lib/libxkbfile 1.1.3
lib/libxshmfence 1.3.2 lib/libxshmfence 1.3.3 needs-update
lib/libxtrans 1.5.0 lib/libxtrans 1.5.2 needs-update
lib/pixman 0.43.4 needs-update lib/pixman 0.44.2 needs-update
lib/xcb-util 0.4.1 lib/xcb-util 0.4.1
lib/xcb-util-cursor 0.1.5 lib/xcb-util-cursor 0.1.5
lib/xcb-util-image 0.4.1 lib/xcb-util-image 0.4.1
@ -195,7 +195,7 @@ proto/xorgproto 2024.1
util/cf 1.0.4 util/cf 1.0.4
util/gccmakedep 1.0.4 util/gccmakedep 1.0.4
util/macros 1.20.1 util/macros 1.20.2
util/makedepend 1.0.9 util/makedepend 1.0.9
xserver 21.1.13 xserver 21.1.15

View file

@ -1,3 +1,70 @@
commit 0ee2c68b5d3ea3eb36f895d9dfcc4ebe1416f176
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 12 13:52:45 2024 -0700
bdftopcf 1.1.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit dc539964379c3dfad255260983bca72e4e28c298
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 21 14:43:50 2024 -0700
pcfWriteFont: Avoid uninitialized values in tables
Clears gcc 14.1 warning:
pcfwrite.c: In function pcfWriteFont:
pcfwrite.c:369:24: warning: use of uninitialized value *table.size
[CWE-457] [-Wanalyzer-use-of-uninitialized-value]
369 | offset += table->size;
| ~~~~~^~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/merge_requests/7>
commit 8dee1b3a8008202810e18c06bf78b3b05409ffaf
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 21 14:42:32 2024 -0700
bdfReadBitmap: avoid access to byte before start of array
Clears 4 -Wanalyzer-out-of-bounds warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/merge_requests/7>
commit daba8411d9a658f0fec116f36550652aa7dfabe9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 21 14:00:58 2024 -0700
bdfReadBitmap: avoid NULL dereference on zero-width glyphs
Clears 3 -Wanalyzer-null-dereference warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/merge_requests/7>
commit 62862a862ab045ac7bbe16b30c58bb301958a00e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 28 17:30:21 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/merge_requests/7>
commit 59a952e39f186bc42e12502317981cd07930d939
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat Nov 26 21:48:45 2022 -0800
atom: Update Hash() to be unsigned
This avoids undefined behavior (left shift overflow in signed integer type)
atom.c:62:16: runtime error: left shift of 1324774199 by 3 places cannot be represented in type 'int'
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
commit 84eaf7f1bdd402661a83db7ad914eb7f8d5dc627 commit 84eaf7f1bdd402661a83db7ad914eb7f8d5dc627
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 15 11:53:35 2022 -0700 Date: Sat Oct 15 11:53:35 2022 -0700
@ -670,7 +737,7 @@ Date: Fri Oct 14 00:25:40 2005 +0000
Use sed to fill in variables in man page Use sed to fill in variables in man page
commit 1367d1093078bb49e4f1b5f1453fea41ae6f2b25 commit 1367d1093078bb49e4f1b5f1453fea41ae6f2b25
Author: Kristian Høgsberg <krh@redhat.com> Author: Kristian Høgsberg <krh@redhat.com>
Date: Fri Sep 23 20:39:52 2005 +0000 Date: Fri Sep 23 20:39:52 2005 +0000
Fill these in. Fill these in.

View file

@ -209,7 +209,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -220,11 +219,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -1318,7 +1318,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1376,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1686,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1900,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +1970,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2054,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2162,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2256,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2311,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2344,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2377,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2852,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2872,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2888,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3033,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3142,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -44,34 +44,32 @@ typedef struct _AtomList {
static AtomListPtr *hashTable; static AtomListPtr *hashTable;
static int hashSize, hashUsed; static unsigned hashSize, hashUsed;
static int hashMask; static unsigned hashMask;
static int rehash; static unsigned rehash;
static AtomListPtr *reverseMap; static AtomListPtr *reverseMap;
static size_t reverseMapSize; static size_t reverseMapSize;
static Atom lastAtom; static Atom lastAtom;
static int static unsigned
Hash(const char *string, int len) Hash(const char *string, unsigned len)
{ {
int h; unsigned h = 0;
h = 0;
while (len--) while (len--)
h = (h << 3) ^ *string++; h = (h << 3) ^ *string++;
if (h < 0)
return -h;
return h; return h;
} }
static int static int
ResizeHashTable(void) ResizeHashTable(void)
{ {
int newHashSize; unsigned newHashSize;
int newHashMask; unsigned newHashMask;
AtomListPtr *newHashTable; AtomListPtr *newHashTable;
int newRehash; unsigned newRehash;
if (hashSize == 0) if (hashSize == 0)
newHashSize = 1024; newHashSize = 1024;
@ -88,9 +86,9 @@ ResizeHashTable(void)
newRehash = (newHashMask - 2); newRehash = (newHashMask - 2);
for (int i = 0; i < hashSize; i++) { for (int i = 0; i < hashSize; i++) {
if (hashTable[i]) { if (hashTable[i]) {
int h = (hashTable[i]->hash) & newHashMask; unsigned h = (hashTable[i]->hash) & newHashMask;
if (newHashTable[h]) { if (newHashTable[h]) {
int r = hashTable[i]->hash % newRehash | 1; unsigned r = hashTable[i]->hash % newRehash | 1;
do { do {
h += r; h += r;
if (h >= newHashSize) if (h >= newHashSize)
@ -143,9 +141,9 @@ Atom
MakeAtom(const char *string, unsigned len, int makeit) MakeAtom(const char *string, unsigned len, int makeit)
{ {
AtomListPtr a; AtomListPtr a;
int hash; unsigned hash;
int h = 0; unsigned h = 0;
int r; unsigned r;
hash = Hash(string, len); hash = Hash(string, len);
if (hashTable) { if (hashTable) {

View file

@ -126,7 +126,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
if (!line) if (!line)
break; break;
if (widthBits == 0) { if ((widthBits == 0) || (picture == NULL)) {
if (bdfIsPrefix(line, "ENDCHAR")) if (bdfIsPrefix(line, "ENDCHAR"))
break; break;
else else
@ -152,7 +152,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
for (i = widthHexChars - inLineLen; i > 0; i--) for (i = widthHexChars - inLineLen; i > 0; i--)
picture[nextByte++] = 0; picture[nextByte++] = 0;
} }
else { else if (nextByte > 0) {
unsigned char mask; unsigned char mask;
mask = 0xff << (8 - (widthBits & 0x7)); mask = 0xff << (8 - (widthBits & 0x7));

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

File diff suppressed because it is too large Load diff

View file

@ -3,12 +3,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,7 +57,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

2954
app/bdftopcf/config.sub vendored

File diff suppressed because it is too large Load diff

6488
app/bdftopcf/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([bdftopcf], [1.1.1], AC_INIT([bdftopcf], [1.1.2],
[https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/issues], [bdftopcf]) [https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/issues], [bdftopcf])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -127,7 +127,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -138,11 +137,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -213,7 +213,7 @@ pcfNameForAtom(Atom a)
int int
pcfWriteFont(FontPtr pFont, FontFilePtr file) pcfWriteFont(FontPtr pFont, FontFilePtr file)
{ {
PCFTableRec tables[32], *table; PCFTableRec tables[32] = { { 0 } }, *table;
CARD32 mask; CARD32 mask;
int ntables; int ntables;
int size; int size;

View file

@ -1,3 +1,92 @@
commit 6b29ee45a794e459d53643ee72a82442cd30d4e8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 12 10:28:05 2024 -0700
fonttosfnt 1.2.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 2a6a5574001d7a9959ba4d924522b96f8cc57b43
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Wed Jul 24 16:28:43 2024 +0200
Allow to override build date with SOURCE_DATE_EPOCH
to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
This patch was done while working on reproducible builds for openSUSE, sponsored by the NLnet NGI0 fund.
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/22>
commit 5fb8b61537b832561f074a6d400956c8cb6b31a5
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Wed Jul 24 16:27:35 2024 +0200
Use long long for timestamp diff
to avoid integer overflows in the future
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/22>
commit e3971be7b20580a54b3c26281a5912433b9a7319
Author: Jan Friesse <jfriesse@gmail.com>
Date: Wed Nov 2 09:41:57 2022 +0100
Use FONT_UNITS_FLOOR for ascent/descent
Before version 1.49.3 the pango was using (probably) values from BLC
table, since 1.49.3 pango uses harfbuzz for metrics and it seems
harfbuzz is using OS2 table. Result is font with 1px extra for
ascend/descent.
Solution seems to be to use FONT_UNITS_FLOOR instead of FONT_UNITS_CEIL
when storing file.
Fixes: #7
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/18>
commit 7532e3ad70441041395c77d12424edd31cf63a42
Author: philg314 <philg314@fastmail.com>
Date: Thu Aug 11 11:42:22 2022 +0000
Fix `cmap` Subtable Format 4 `entrySelector`
https://docs.microsoft.com/en-us/typography/opentype/spec/cmap defines
`entrySelector` as "Log2 of the maximum power of 2 less than or equal to
numTables (log2(searchRange/2), which is equal to floor(log2(segCount)))"
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/17>
commit 6eeb52757c9d2d1f40a3d31a6b6d3925dc17fbb2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 15 16:38:08 2024 -0800
unifdef NEED_SNPRINTF
If it was defined, it would try to include a snprintf.c file that's
not actually in our source tree.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 964b103be665953306e9476ce7dd3c305f0541bd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 15 16:35:51 2024 -0800
unifdef __SCO__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 13fcc6781f192c1bd1ae61ca88543dc1d27e79e9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 15 16:35:01 2024 -0800
unifdef __UNIXOS2__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 3b0f4a799bb7820dd27257be16f1a9d61a4969f9 commit 3b0f4a799bb7820dd27257be16f1a9d61a4969f9
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Sep 27 18:37:58 2023 -0700 Date: Wed Sep 27 18:37:58 2023 -0700

View file

@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.20.0]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for fonttosfnt 1.2.3. # Generated by GNU Autoconf 2.71 for fonttosfnt 1.2.4.
# #
# Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues>. # Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues>.
# #
# #
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@ -268,7 +268,7 @@ then :
printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else else
printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues $0: https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues
$0: about your system, including any error possibly output $0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or $0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do $0: manually run the script under such a shell if you do
@ -612,9 +612,9 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='fonttosfnt' PACKAGE_NAME='fonttosfnt'
PACKAGE_TARNAME='fonttosfnt' PACKAGE_TARNAME='fonttosfnt'
PACKAGE_VERSION='1.2.3' PACKAGE_VERSION='1.2.4'
PACKAGE_STRING='fonttosfnt 1.2.3' PACKAGE_STRING='fonttosfnt 1.2.4'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues'
PACKAGE_URL='' PACKAGE_URL=''
ac_unique_file="Makefile.am" ac_unique_file="Makefile.am"
@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures fonttosfnt 1.2.3 to adapt to many kinds of systems. \`configure' configures fonttosfnt 1.2.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1416,7 +1416,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of fonttosfnt 1.2.3:";; short | recursive ) echo "Configuration of fonttosfnt 1.2.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1461,7 +1461,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues>. Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues>.
_ACEOF _ACEOF
ac_status=$? ac_status=$?
fi fi
@ -1525,7 +1525,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
fonttosfnt configure 1.2.3 fonttosfnt configure 1.2.4
generated by GNU Autoconf 2.71 generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc. Copyright (C) 2021 Free Software Foundation, Inc.
@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by fonttosfnt $as_me 1.2.3, which was It was created by fonttosfnt $as_me 1.2.4, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw $ $0$ac_configure_args_raw
@ -3032,7 +3032,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='fonttosfnt' PACKAGE='fonttosfnt'
VERSION='1.2.3' VERSION='1.2.4'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -11566,7 +11566,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by fonttosfnt $as_me 1.2.3, which was This file was extended by fonttosfnt $as_me 1.2.4, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -11626,7 +11626,7 @@ $config_headers
Configuration commands: Configuration commands:
$config_commands $config_commands
Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues>." Report bugs to <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues>."
_ACEOF _ACEOF
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
@ -11634,7 +11634,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped' ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\ ac_cs_version="\\
fonttosfnt config.status 1.2.3 fonttosfnt config.status 1.2.4
configured by $0, generated by GNU Autoconf 2.71, configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View file

@ -23,8 +23,9 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT(fonttosfnt, [1.2.3], AC_INIT(fonttosfnt, [1.2.4],
[https://gitlab.freedesktop.org/xorg/app/fonttosfnt/issues], fonttosfnt) [https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/issues],
[fonttosfnt])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

View file

@ -26,11 +26,7 @@ THE SOFTWARE.
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef __UNIXOS2__ #include <math.h>
# include <math.h>
#else
# include <float.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include <ft2build.h> #include <ft2build.h>
@ -40,12 +36,6 @@ THE SOFTWARE.
#include "X11/Xfuncproto.h" /* for _X_ATTRIBUTE_PRINTF */ #include "X11/Xfuncproto.h" /* for _X_ATTRIBUTE_PRINTF */
#include "fonttosfnt.h" #include "fonttosfnt.h"
#ifdef NEED_SNPRINTF
#undef SCOPE
#define SCOPE static
#include "snprintf.c"
#endif
#ifdef __GLIBC__ #ifdef __GLIBC__
#define HAVE_TIMEGM #define HAVE_TIMEGM
#define HAVE_TM_GMTOFF #define HAVE_TM_GMTOFF
@ -56,11 +46,6 @@ THE SOFTWARE.
#define GMTOFFMEMBER tm_gmtoff #define GMTOFFMEMBER tm_gmtoff
#endif #endif
#ifdef __SCO__
#define HAVE_TM_GMTOFF
#define GMTOFFMEMBER tm_tzadj
#endif
/* That's in POSIX */ /* That's in POSIX */
#define HAVE_TZSET #define HAVE_TZSET
@ -196,7 +181,8 @@ mktime_gmt(struct tm *tm)
int int
macTime(int *hi, unsigned *lo) macTime(int *hi, unsigned *lo)
{ {
unsigned long diff; /* Not time_t */ unsigned long long diff; /* Not time_t */
char *source_date_epoch;
time_t macEpoch, current; time_t macEpoch, current;
struct tm tm; struct tm tm;
tm.tm_sec = 0; tm.tm_sec = 0;
@ -210,7 +196,11 @@ macTime(int *hi, unsigned *lo)
macEpoch = mktime_gmt(&tm); macEpoch = mktime_gmt(&tm);
if(macEpoch == -1) return -1; if(macEpoch == -1) return -1;
current = time(NULL); /* This assumes that the SOURCE_DATE_EPOCH environment variable will contain
a correct, positive integer in the time_t range */
if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
(current = (time_t)strtoll(source_date_epoch, NULL, 10)) <= 0)
current = time(NULL);
if(current == -1) if(current == -1)
return -1; return -1;

View file

@ -875,7 +875,7 @@ writecmap(FILE* out, FontPtr font)
/* How baroque can you get? */ /* How baroque can you get? */
writeUSHORT(out, segcount * 2); /* segCountX2 */ writeUSHORT(out, segcount * 2); /* segCountX2 */
writeUSHORT(out, 2 * two_log2_floor(segcount)); /* searchRange */ writeUSHORT(out, 2 * two_log2_floor(segcount)); /* searchRange */
writeUSHORT(out, 1 + log2_floor(segcount)); /* entrySelector */ writeUSHORT(out, log2_floor(segcount)); /* entrySelector */
writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount))); writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount)));
/* rangeShift */ /* rangeShift */
@ -941,8 +941,8 @@ writehhea(FILE* out, FontPtr font)
degreesToFraction(font->italicAngle, &num, &den); degreesToFraction(font->italicAngle, &num, &den);
writeULONG(out, 0x00010000); /* version */ writeULONG(out, 0x00010000); /* version */
writeSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* ascender */ writeSHORT(out, FONT_UNITS_FLOOR(font->metrics.ascent)); /* ascender */
writeSHORT(out, -FONT_UNITS_CEIL(font->metrics.descent)); /* descender */ writeSHORT(out, -FONT_UNITS_FLOOR(font->metrics.descent)); /* descender */
writeSHORT(out, FONT_UNITS(font->metrics.size - font->metrics.ascent - font->metrics.descent)); /* lineGap */ writeSHORT(out, FONT_UNITS(font->metrics.size - font->metrics.ascent - font->metrics.descent)); /* lineGap */
writeUSHORT(out, FONT_UNITS(font->metrics.maxAwidth)); /* advanceWidthMax */ writeUSHORT(out, FONT_UNITS(font->metrics.maxAwidth)); /* advanceWidthMax */
/* TODO: the next three are not calculated according to spec, are they ? /* TODO: the next three are not calculated according to spec, are they ?
@ -1116,14 +1116,14 @@ writeOS2(FILE* out, FontPtr font)
writeUSHORT(out, i); /* fsSelection; */ writeUSHORT(out, i); /* fsSelection; */
writeUSHORT(out, 0x20); /* usFirstCharIndex; */ writeUSHORT(out, 0x20); /* usFirstCharIndex; */
writeUSHORT(out, 0xFFFD); /* usLastCharIndex; */ writeUSHORT(out, 0xFFFD); /* usLastCharIndex; */
writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* sTypoAscender; */ writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.ascent)); /* sTypoAscender; */
writeSHORT(out, -FONT_UNITS_CEIL(font->metrics.descent)); /* sTypoDescender; */ writeSHORT(out, -FONT_UNITS_FLOOR(font->metrics.descent)); /* sTypoDescender; */
writeSHORT(out, FONT_UNITS(font->metrics.size - font->metrics.ascent - font->metrics.descent)); /* sTypoLineGap */ writeSHORT(out, FONT_UNITS(font->metrics.size - font->metrics.ascent - font->metrics.descent)); /* sTypoLineGap */
#ifdef NO_TYPO_METRICS #ifdef NO_TYPO_METRICS
writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* usWinAscent; */ writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.ascent)); /* usWinAscent; */
writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.descent)); /* usWinDescent; */ writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.descent)); /* usWinDescent; */
#else #else
writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.maxY)); /* usWinAscent; */ writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.maxY)); /* usWinAscent; */
writeUSHORT(out, -FONT_UNITS_FLOOR(font->metrics.minY)); /* usWinDescent; */ writeUSHORT(out, -FONT_UNITS_FLOOR(font->metrics.minY)); /* usWinDescent; */
#endif #endif
writeULONG(out, 3); /* ulCodePageRange1; */ writeULONG(out, 3); /* ulCodePageRange1; */

View file

@ -1,3 +1,53 @@
commit 3803281f7466146baa0bbb54173719a77eed0ef6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Dec 4 12:49:05 2024 -0800
oclock 1.0.6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 5cd1068b0a60431a80520ef11b176a9915182154
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Nov 9 13:42:48 2024 -0800
Initialize: fix indentation of conditional clause after if statement
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/oclock/-/merge_requests/5>
commit 408c2843083c89b3eaef2ad54c2706bdd038e357
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Nov 9 13:37:47 2024 -0800
Variable scope reductions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/oclock/-/merge_requests/5>
commit 414e18fa0cde56038b39e1a850abbcc3ccda500e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Feb 9 11:59:47 2023 -0800
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit c6b5813f7258bbccc8368fcdc0e1ba94219a7843
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Feb 8 16:27:53 2023 -0800
Add -help and -version options
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit e43205f548795c2cab5c1f92ca839b72d25f2a10
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Feb 8 16:27:13 2023 -0800
Print which argument was unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit a2ca36a770cac1684dc5e39d9b777b1b02c69114 commit a2ca36a770cac1684dc5e39d9b777b1b02c69114
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Aug 30 17:21:34 2022 -0700 Date: Tue Aug 30 17:21:34 2022 -0700
@ -573,7 +623,7 @@ Date: Sun Jul 17 20:11:01 2005 +0000
fix rules to work with non-GNU make and outside of $srcdir fix rules to work with non-GNU make and outside of $srcdir
commit f9b186fdd589267fc8d448ffc5da6d775afe01f2 commit f9b186fdd589267fc8d448ffc5da6d775afe01f2
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Tue Jun 28 15:22:52 2005 +0000 Date: Tue Jun 28 15:22:52 2005 +0000
Add buildsystem for oclock Add buildsystem for oclock

View file

@ -177,7 +177,8 @@ static void Initialize (Widget greq, Widget gnew,
if (w->clock.shape_window && !XShapeQueryExtension (XtDisplay (w), if (w->clock.shape_window && !XShapeQueryExtension (XtDisplay (w),
&shape_event_base, &shape_event_base,
&shape_error_base)) &shape_error_base))
w->clock.shape_window = False; w->clock.shape_window = False;
w->clock.shape_mask = 0; w->clock.shape_mask = 0;
w->clock.shapeGC = NULL; w->clock.shapeGC = NULL;
w->clock.shape_width = 0; w->clock.shape_width = 0;
@ -189,11 +190,8 @@ static void Resize (Widget widget)
{ {
ClockWidget w = (ClockWidget) widget; ClockWidget w = (ClockWidget) widget;
XGCValues xgcv; XGCValues xgcv;
Widget parent;
XWindowChanges xwc; XWindowChanges xwc;
int face_width, face_height; int face_width, face_height;
int x, y;
Pixmap shape_mask;
if (!XtIsRealized((Widget) w)) if (!XtIsRealized((Widget) w))
return; return;
@ -216,6 +214,9 @@ static void Resize (Widget widget)
*/ */
if (w->clock.shape_window) { if (w->clock.shape_window) {
Widget parent;
Pixmap shape_mask;
int x, y;
SetTransform (&w->clock.t, SetTransform (&w->clock.t,
face_width, w->core.width - face_width, face_width, w->core.width - face_width,
@ -476,7 +477,6 @@ check_jewel_poly (ClockWidget w, TPoint poly[POLY_SIZE])
if (JEWEL_SIZE(w) > 0.0) if (JEWEL_SIZE(w) > 0.0)
{ {
double x, y, size; double x, y, size;
int i;
x = JEWEL_X(w); x = JEWEL_X(w);
y = JEWEL_Y(w); y = JEWEL_Y(w);
@ -486,7 +486,7 @@ check_jewel_poly (ClockWidget w, TPoint poly[POLY_SIZE])
* distance from the line to the center of the * distance from the line to the center of the
* circular jewel is less than the radius. * circular jewel is less than the radius.
*/ */
for (i = 0; i < POLY_SIZE-1; i++) { for (int i = 0; i < POLY_SIZE-1; i++) {
double a2, b2, c2, d2; double a2, b2, c2, d2;
a2 = sqr (poly[i].x - x) + sqr (poly[i].y - y); a2 = sqr (poly[i].x - x) + sqr (poly[i].y - y);

View file

@ -233,7 +233,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -244,11 +243,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

166
app/oclock/aclocal.m4 vendored
View file

@ -13,13 +13,13 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2) # serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
@ -107,7 +107,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS], AC_DEFUN([PKG_CHECK_EXISTS],
@ -176,14 +176,14 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR( m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met: [Package requirements ($2) were not met:
$$1_PKG_ERRORS $$1_PKG_ERRORS
@ -195,7 +195,7 @@ _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config. path to pkg-config.
@ -205,10 +205,10 @@ _PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
]) ])
else else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
$3 $3
fi[]dnl fi[]dnl
])dnl PKG_CHECK_MODULES ])dnl PKG_CHECK_MODULES
@ -295,6 +295,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR ])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2012 Free Software Foundation, Inc. # Copyright (C) 2002-2012 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
@ -1318,7 +1386,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1423,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1444,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1470,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1754,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1968,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +2038,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2122,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2230,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2324,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2379,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2412,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2445,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2920,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2940,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2956,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3101,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3210,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -3,12 +3,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,7 +57,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

6446
app/oclock/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([oclock], AC_INIT([oclock],
[1.0.5], [1.0.6],
[https://gitlab.freedesktop.org/xorg/app/oclock/-/issues], [https://gitlab.freedesktop.org/xorg/app/oclock/-/issues],
[oclock]) [oclock])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -125,7 +125,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -136,11 +135,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -75,6 +75,12 @@ fit the outline of the clock.
.TP 8 .TP 8
.B \-transparent .B \-transparent
causes the clock to consist only of the jewel, the hands, and the border. causes the clock to consist only of the jewel, the hands, and the border.
.TP 8
.B \-help
prints a usage message and exits.
.TP 8
.B \-version
prints version info and exits.
.SH COLORS .SH COLORS
If you would like your clock to be viewable in color, include the following If you would like your clock to be viewable in color, include the following
in the #ifdef COLOR section you read with xrdb: in the #ifdef COLOR section you read with xrdb:

View file

@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group.
static void die ( Widget w, XtPointer client_data, XtPointer call_data ); static void die ( Widget w, XtPointer client_data, XtPointer call_data );
static void save ( Widget w, XtPointer client_data, XtPointer call_data ); static void save ( Widget w, XtPointer client_data, XtPointer call_data );
static void usage ( void ); static void usage ( int exitval );
static void quit ( Widget w, XEvent *event, String *params, static void quit ( Widget w, XEvent *event, String *params,
Cardinal *num_params ); Cardinal *num_params );
@ -70,7 +70,7 @@ static void save(Widget w, XtPointer client_data, XtPointer call_data)
/* Exit with message describing command line format */ /* Exit with message describing command line format */
static void usage(void) static void usage(int exitval)
{ {
fprintf(stderr, fprintf(stderr,
"usage: oclock\n" "usage: oclock\n"
@ -78,8 +78,10 @@ static void usage(void)
" [-display [{host}]:[{vs}]]\n" " [-display [{host}]:[{vs}]]\n"
" [-fg {color}] [-bg {color}] [-bd {color}] [-bw {pixels}]\n" " [-fg {color}] [-bg {color}] [-bd {color}] [-bw {pixels}]\n"
" [-minute {color}] [-hour {color}] [-jewel {color}]\n" " [-minute {color}] [-hour {color}] [-jewel {color}]\n"
" [-backing {backing-store}] [-shape] [-noshape] [-transparent]\n"); " [-backing {backing-store}] [-shape] [-noshape] [-transparent]\n"
exit(1); " [-help] [-version]\n"
);
exit(exitval);
} }
/* Command line options table. Only resources are entered here...there is a /* Command line options table. Only resources are entered here...there is a
@ -107,10 +109,33 @@ main(int argc, char *argv[])
Arg arg[2]; Arg arg[2];
int i; int i;
/* Handle args that don't require opening a display */
for (int n = 1; n < argc; n++) {
const char *argn = argv[n];
/* accept single or double dash for -help & -version */
if (argn[0] == '-' && argn[1] == '-') {
argn++;
}
if (strcmp(argn, "-help") == 0) {
usage(0);
}
if (strcmp(argn, "-version") == 0) {
puts(PACKAGE_STRING);
exit(0);
}
}
toplevel = XtOpenApplication(&xtcontext, "Clock", toplevel = XtOpenApplication(&xtcontext, "Clock",
options, XtNumber(options), &argc, argv, NULL, options, XtNumber(options), &argc, argv, NULL,
sessionShellWidgetClass, NULL, 0); sessionShellWidgetClass, NULL, 0);
if (argc != 1) usage(); if (argc != 1) {
fputs("Unknown argument(s):", stderr);
for (int n = 1; n < argc; n++) {
fprintf(stderr, " %s", argv[n]);
}
fputs("\n\n", stderr);
usage(1);
}
XtAddCallback(toplevel, XtNsaveCallback, save, NULL); XtAddCallback(toplevel, XtNsaveCallback, save, NULL);
XtAddCallback(toplevel, XtNdieCallback, die, NULL); XtAddCallback(toplevel, XtNdieCallback, die, NULL);

View file

@ -40,13 +40,12 @@ TranslatePoints(TPoint *points, int n_points,
Transform *t, int mode) Transform *t, int mode)
{ {
XPoint *xpoints; XPoint *xpoints;
int i;
double xoff = 0.0, yoff = 0.0; double xoff = 0.0, yoff = 0.0;
xpoints = (XPoint *) malloc ((unsigned)n_points * sizeof (*xpoints)); xpoints = (XPoint *) malloc ((unsigned)n_points * sizeof (*xpoints));
if (!xpoints) if (!xpoints)
return NULL; return NULL;
for (i = 0; i < n_points; i++) { for (int i = 0; i < n_points; i++) {
xpoints[i].x = Xx(points[i].x + xoff, points[i].y + yoff, t); xpoints[i].x = Xx(points[i].x + xoff, points[i].y + yoff, t);
xpoints[i].y = Xy(points[i].x + xoff, points[i].y + yoff, t); xpoints[i].y = Xy(points[i].x + xoff, points[i].y + yoff, t);
if (mode == CoordModePrevious) { if (mode == CoordModePrevious) {

View file

@ -11325,6 +11325,8 @@ then :
fi fi
# Substitute config variables in man pages
ac_config_files="$ac_config_files man/x11perf.1:man/x11perf.man" ac_config_files="$ac_config_files man/x11perf.1:man/x11perf.man"
ac_config_files="$ac_config_files man/x11perfcomp.1:man/x11perfcomp.man" ac_config_files="$ac_config_files man/x11perfcomp.1:man/x11perfcomp.man"

View file

@ -76,6 +76,8 @@ yes)
esac esac
AC_CHECK_FUNCS([srand_deterministic]) AC_CHECK_FUNCS([srand_deterministic])
# Substitute config variables in man pages
AC_CONFIG_FILES([man/x11perf.1:man/x11perf.man]) AC_CONFIG_FILES([man/x11perf.1:man/x11perf.man])
AC_CONFIG_FILES([man/x11perfcomp.1:man/x11perfcomp.man]) AC_CONFIG_FILES([man/x11perfcomp.1:man/x11perfcomp.man])
AC_CONFIG_FILES([man/Xmark.1:man/Xmark.man]) AC_CONFIG_FILES([man/Xmark.1:man/Xmark.man])

View file

@ -422,8 +422,8 @@ InitShmImage(XParms xp, Parms p, int64_t reps, Bool read_only)
shm_image = *image; shm_image = *image;
image_size = image->bytes_per_line * image->height; image_size = image->bytes_per_line * image->height;
/* allow XYPixmap choice: */ /* allow XYPixmap choice: */
if(p->font)image_size *= xp->vinfo.depth; if(p->font && strcmp(p->font, "XYBitmap") != 0) image_size *= xp->vinfo.depth;
shm_info.shmid = shmget(IPC_PRIVATE, image_size, IPC_CREAT|0700); shm_info.shmid = shmget(IPC_PRIVATE, image_size, IPC_CREAT|0777);
if (shm_info.shmid < 0) if (shm_info.shmid < 0)
{ {
/* /*

View file

@ -1,3 +1,53 @@
commit 26dec2410f8b2c1df0817e51b7f702cfb7dfd2cc
Author: Matt Turner <mattst88@gmail.com>
Date: Thu Nov 7 13:08:21 2024 -0500
xbacklight 1.2.4
Part-of: <https://gitlab.freedesktop.org/xorg/app/xbacklight/-/merge_requests/5>
commit 0d54d6fc02bec076e6e086d04eaf6cb3fe03bac2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Aug 26 15:01:06 2024 -0700
Accept --help & --version as aliases to -help & -version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xbacklight/-/merge_requests/3>
commit e42b6e5321edfac3d0584163cbd93a7c2ec5e3eb
Author: Andreas Tille <tille@debian.org>
Date: Mon Aug 19 09:48:10 2024 +0200
xbacklight.man: Add missing items in SYNOPSIS
Bug-Debian: https://bugs.debian.org/825274
Part-of: <https://gitlab.freedesktop.org/xorg/app/xbacklight/-/merge_requests/4>
commit e710db137f0bd7a39e211013597cc0f91eb7157f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 28 17:30:21 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 2f35e416419c64bb3e9357ee0ad77e17e5ddf8a5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Dec 4 10:33:51 2021 -0800
Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 4f98c5f3c9b8ece7bb401222b830712f3df02eef
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Dec 4 10:33:47 2021 -0800
gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 76de9d7a0faeb74b7d5d8b5dfcf632c6c1eae879 commit 76de9d7a0faeb74b7d5d8b5dfcf632c6c1eae879
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 14 11:25:03 2019 -0700 Date: Sun Jul 14 11:25:03 2019 -0700

View file

@ -179,9 +179,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \ done; \
reldir="$$dir2" reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
GZIP_ENV = --best GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip DIST_TARGETS = dist-xz dist-gzip
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@ -202,7 +202,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -213,11 +212,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@ -299,6 +296,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@ -642,6 +640,7 @@ distdir: $(DISTFILES)
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir) $(am__post_remove_distdir)
@ -649,7 +648,6 @@ dist-bzip2: distdir
dist-lzip: distdir dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-xz: distdir dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir) $(am__post_remove_distdir)

View file

@ -13,15 +13,15 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1) # serial 12 (pkg-config-0.29.2)
dnl
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl dnl
@ -62,7 +62,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require. dnl of the macros you require.
m4_defun([PKG_PREREQ], m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1]) [m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ ])dnl PKG_PREREQ
@ -163,7 +163,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no pkg_failed=no
AC_MSG_CHECKING([for $1]) AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@ -173,7 +173,7 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.]) See the pkg-config man page for more details.])
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
@ -194,7 +194,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
@ -1318,7 +1318,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1376,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1686,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1900,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +1970,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2054,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2162,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2256,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2311,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2344,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2377,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2852,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2872,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2888,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3033,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3142,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*) MINGW*)
file_conv=mingw file_conv=mingw
;; ;;
CYGWIN*) CYGWIN* | MSYS*)
file_conv=cygwin file_conv=cygwin
;; ;;
*) *)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*) mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;; ;;
cygwin/*) cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"` file=`cygpath -m "$file" || echo "$file"`
;; ;;
wine/*) wine/*)
@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion" echo "compile $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;
esac esac
@ -339,9 +340,9 @@ exit $ret
# Local Variables: # Local Variables:
# mode: shell-script # mode: shell-script
# sh-indentation: 2 # sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -3,12 +3,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,7 +57,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

6461
app/xbacklight/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -23,15 +23,14 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xbacklight], [1.2.3], AC_INIT([xbacklight], [1.2.4],
[https://gitlab.freedesktop.org/xorg/app/xbacklight/issues], [https://gitlab.freedesktop.org/xorg/app/xbacklight/issues],
[xbacklight]) [xbacklight])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
# Initialize Automake # Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_INIT_AUTOMAKE([foreign dist-xz])
AM_MAINTAINER_MODE
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION], m4_ifndef([XORG_MACROS_VERSION],

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -125,7 +125,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -136,11 +135,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@ -222,6 +219,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@

View file

@ -29,6 +29,8 @@ xbacklight \- adjust backlight brightness using RandR extension
[\-set percent] [\-set percent]
[\-inc percent] [\-inc percent]
[\-dec percent] [\-dec percent]
[\-time milliseconds]
[\-steps number]
.SH DESCRIPTION .SH DESCRIPTION
.I Xbacklight .I Xbacklight
is used to adjust the backlight brightness where supported. It finds all is used to adjust the backlight brightness where supported. It finds all

View file

@ -217,11 +217,12 @@ main (int argc, char **argv)
steps = atoi (argv[i]); steps = atoi (argv[i]);
continue; continue;
} }
if (!strcmp (argv[i], "-help") || !strcmp (argv[i], "-?")) if (!strcmp (argv[i], "-help") || !strcmp (argv[i], "-?") ||
!strcmp (argv[i], "--help"))
{ {
usage (0); usage (0);
} }
if (!strcmp (argv[i], "-version")) if (!strcmp (argv[i], "-version") || !strcmp (argv[i], "--version"))
{ {
puts (PACKAGE_STRING); puts (PACKAGE_STRING);
exit (0); exit (0);

View file

@ -1,3 +1,92 @@
commit 02e7dc1231436274bd84232927bc99201a772b3d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Aug 26 18:36:09 2024 -0700
xclipboard 1.1.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 36d6d686dba46f595a690c529bf56f05834ee15b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 11:59:38 2024 -0700
NewClip: error out if failed to allocate memory for new ClipRec
Quiets -Wanalyzer-possible-null-dereference warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xclipboard/-/merge_requests/6>
commit 316cd14b9cbd2ef518a090edb80ce5f715282ad9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jul 6 12:51:19 2024 -0700
gitlab CI: Update build container contents
Updates include:
- gcc 11.1 -> 14.1
- binutils 2.36 -> 2.42
- libX11 1.7.2 -> 1.8.9
- autoconf 2.71 -> 2.72
- xorg-util-macros 1.19.3 -> 1.20.1
- xorgproto 2021.5 -> 2024.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xclipboard/-/merge_requests/5>
commit e074743e9c38afdcf5809d857921959bb6c14241
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 7 12:07:58 2024 -0700
Handle -Wdiscarded-qualifiers warnings for XawTextBlock ptr
xclipboard.c: In function NewCurrentClip:
xclipboard.c:384:29: warning: passing argument 1 of NewCurrentClipContents
discards const qualifier from pointer target type [-Wdiscarded-qualifiers]
384 | NewCurrentClipContents ("", 0);
| ^~
xclipboard.c:77:44: note: expected char * but argument is of type
const char *
77 | static void NewCurrentClipContents ( char *data, int len );
| ~~~~~~^~~~
xclipboard.c: In function EraseTextWidget:
xclipboard.c:420:15: warning: assignment discards const qualifier from
pointer target type [-Wdiscarded-qualifiers]
420 | block.ptr = "";
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xclipboard/-/merge_requests/4>
commit 98ebfcf3bc9a9f7cdd94eea880bd64e2af705fd5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 6 11:26:45 2024 -0700
Fix -Wbad-function-cast warnings from casting Atom to void *
xclipboard.c: In function InsertClipboard:
xclipboard.c:494:33: warning: cast from function call of type Atom
{aka long unsigned int} to non-matching type void * [-Wbad-function-cast]
494 | (XtPointer)(XA_COMPOUND_TEXT(d)),
| ^
xclipboard.c: In function LoseSelection:
xclipboard.c:637:25: warning: cast from function call of type Atom
{aka long unsigned int} to non-matching type void * [-Wbad-function-cast]
637 | (XtPointer)(XA_UTF8_STRING(d)), CurrentTime);
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xclipboard/-/merge_requests/4>
commit b2d0637073564107c1e038da339d47e2e8c40bb9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 28 17:30:21 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xclipboard/-/merge_requests/4>
commit 0220c7d59cbb83c53dce331ec7e8108a76f75328 commit 0220c7d59cbb83c53dce331ec7e8108a76f75328
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 10 14:42:43 2022 -0700 Date: Sun Jul 10 14:42:43 2022 -0700
@ -719,7 +808,7 @@ Date: Sun Jul 17 20:11:02 2005 +0000
fix rules to work with non-GNU make and outside of $srcdir fix rules to work with non-GNU make and outside of $srcdir
commit e0a326f3bd7889da2352a1e534871a64b693545a commit e0a326f3bd7889da2352a1e534871a64b693545a
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Wed Jul 6 17:30:20 2005 +0000 Date: Wed Jul 6 17:30:20 2005 +0000
Build system for xclipboard and xcutsel Build system for xclipboard and xcutsel

View file

@ -237,7 +237,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -248,11 +247,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -1318,7 +1318,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1376,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1686,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1900,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +1970,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2054,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2162,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2256,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2311,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2344,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2377,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2852,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2872,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2888,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3033,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3142,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -3,12 +3,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,7 +57,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

6473
app/xclipboard/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -22,8 +22,10 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xclipboard], [1.1.4], AC_INIT([xclipboard], [1.1.5],
[https://gitlab.freedesktop.org/xorg/app/xclipboard/issues], [xclipboard]) [https://gitlab.freedesktop.org/xorg/app/xclipboard/-/issue],
[xclipboard],
[https://gitlab.freedesktop.org/xorg/app/xclipboard/])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -127,7 +127,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -138,11 +137,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -135,8 +135,10 @@ NewClip(Widget w, ClipPtr old)
ClipPtr newClip; ClipPtr newClip;
newClip = calloc (1, sizeof (ClipRec)); newClip = calloc (1, sizeof (ClipRec));
if (!newClip) if (!newClip) {
XtError("Failed to allocate memory for ClipRec\n");
return newClip; return newClip;
}
newClip->prev = old; newClip->prev = old;
if (old) if (old)
{ {
@ -377,11 +379,13 @@ WMProtocols(Widget w, XEvent *ev, String *params, Cardinal *n)
} }
} }
static char empty_string[] = "";
/* ARGUSED */ /* ARGUSED */
static void static void
NewCurrentClip(Widget w, XEvent *ev, String *parms, Cardinal *np) NewCurrentClip(Widget w, XEvent *ev, String *parms, Cardinal *np)
{ {
NewCurrentClipContents ("", 0); NewCurrentClipContents (empty_string, 0);
} }
static void static void
@ -417,7 +421,7 @@ EraseTextWidget(void)
{ {
XawTextBlock block; XawTextBlock block;
block.ptr = ""; block.ptr = empty_string;
block.length = 0; block.length = 0;
block.firstPos = 0; block.firstPos = 0;
block.format = FMT8BIT; block.format = FMT8BIT;
@ -459,7 +463,7 @@ InsertClipboard(Widget w, XtPointer client_data, Atom *selection,
int *format) int *format)
{ {
Display *d = XtDisplay(w); Display *d = XtDisplay(w);
Atom target = (Atom)client_data; Atom target = *((Atom *)client_data);
Boolean convert_failed = (*type == XT_CONVERT_FAIL); Boolean convert_failed = (*type == XT_CONVERT_FAIL);
if (!convert_failed) if (!convert_failed)
@ -489,9 +493,10 @@ InsertClipboard(Widget w, XtPointer client_data, Atom *selection,
/* if UTF8_STRING failed try COMPOUND_TEXT */ /* if UTF8_STRING failed try COMPOUND_TEXT */
if (target == XA_UTF8_STRING(d)) if (target == XA_UTF8_STRING(d))
{ {
XtGetSelectionValue(w, *selection, XA_COMPOUND_TEXT(d), Atom compound_text = XA_COMPOUND_TEXT(d);
XtGetSelectionValue(w, *selection, compound_text,
InsertClipboard, InsertClipboard,
(XtPointer)(XA_COMPOUND_TEXT(d)), &compound_text,
CurrentTime); CurrentTime);
return; return;
} }
@ -633,8 +638,9 @@ static void
LoseSelection(Widget w, Atom *selection) LoseSelection(Widget w, Atom *selection)
{ {
Display *d = XtDisplay(w); Display *d = XtDisplay(w);
XtGetSelectionValue(w, *selection, XA_UTF8_STRING(d), InsertClipboard, Atom utf8_string = XA_UTF8_STRING(d);
(XtPointer)(XA_UTF8_STRING(d)), CurrentTime); XtGetSelectionValue(w, *selection, utf8_string, InsertClipboard,
&utf8_string, CurrentTime);
} }
/*ARGSUSED*/ /*ARGSUSED*/
@ -675,6 +681,7 @@ main(int argc, char *argv[])
Cardinal n; Cardinal n;
XtAppContext xtcontext; XtAppContext xtcontext;
Widget parent; Widget parent;
Window w;
XtSetLanguageProc(NULL, NULL, NULL); XtSetLanguageProc(NULL, NULL, NULL);
@ -689,8 +696,10 @@ main(int argc, char *argv[])
/* CLIPBOARD_MANAGER is a non-standard mechanism */ /* CLIPBOARD_MANAGER is a non-standard mechanism */
ManagerAtom = XInternAtom(XtDisplay(top), "CLIPBOARD_MANAGER", False); ManagerAtom = XInternAtom(XtDisplay(top), "CLIPBOARD_MANAGER", False);
ClipboardAtom = XA_CLIPBOARD(XtDisplay(top)); ClipboardAtom = XA_CLIPBOARD(XtDisplay(top));
if (XGetSelectionOwner(XtDisplay(top), ManagerAtom)) if ((w = XGetSelectionOwner(XtDisplay(top), ManagerAtom))) {
printf("window %lu\n", w);
XtError("another clipboard is already running\n"); XtError("another clipboard is already running\n");
}
parent = XtCreateManagedWidget("form", formWidgetClass, top, NULL, ZERO); parent = XtCreateManagedWidget("form", formWidgetClass, top, NULL, ZERO);
(void) XtCreateManagedWidget("quit", Command, parent, NULL, ZERO); (void) XtCreateManagedWidget("quit", Command, parent, NULL, ZERO);

View file

@ -1,3 +1,125 @@
commit 42eebb75e2e5e6c5f8205ce3af3355fef4cf1476
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 12 10:48:30 2024 -0700
xcmsdb 1.0.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1985c52593c2a88dd96d60b14fe416ce4b9de457
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Aug 26 18:59:33 2024 -0700
configure: Use AC_SYS_LARGEFILE to enable large file support
While X Device Color Characterization files should never be more than 2gb
in size, they may be stored on filesystems with inodes or timestamps
outside the normal range for 32-bit programs.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/7>
commit b70540f49144d517a21a04caa0e01cab9d345177
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Aug 2 18:50:12 2024 -0700
ProcessColorimetric: limit string size written by scanf()
Raised by cppcheck:
loadData.c:341:20: warning: sscanf() without field width limits can crash
with huge input data. [invalidscanf]
int ntok = sscanf(buf, "%s %s", keyword, token);
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/6>
commit c2b16b542179bf61cbbf25774c4b2796047c23c1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Aug 2 18:39:46 2024 -0700
ProcessIProfile: Avoid NULL dereference if strtok doesn't find a match
Reported by cppcheck:
loadData.c:552:38: warning: Either the condition 'sizeStr==0L' is redundant
or there is possible null pointer dereference: sizeStr.
[nullPointerRedundantCheck]
linenum, sizeStr);
^
loadData.c:548:30: note: Assuming that condition 'sizeStr==0L' is not redundant
if ((sizeStr == NULL) ||
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/6>
commit bd3ac0d85c8efc36507e7b437a4b119ce033dff7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Aug 2 18:36:52 2024 -0700
SCScrnClassStringOf: always return a non-NULL string
Clears 4 -Wformat-overflow warnings from gcc of the form:
loadData.c: In function LoadSCCData:
loadData.c:397:83: warning: %s directive argument is null [-Wformat-overflow=]
397 | "Line %d: Keyword RGBTOXYZMAT_END mismatch for visual %s.\n",
| ^~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/6>
commit e9cfb815eb6c8342ea0d38e7bf14e247bd37576c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Aug 2 18:20:42 2024 -0700
Correct comment describing DefineToStr
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/6>
commit 626f3daaec912273850f94de624930a7359ece59
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 27 15:24:59 2024 -0700
Declare DefineEntry tables of string to id mappings as const
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/5>
commit a5a3e02ff607f8526403368e999c2fb58ddbecfb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 27 15:13:46 2024 -0700
Variable scope reduction as suggested by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/5>
commit 75067cd1491e9bd74f1eb57936e62cbc162f2474
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 27 14:41:44 2024 -0700
ParseVisualOptions: eliminate unneccessary strcpy & strcat
We can just place constant string literals side by side to concatenate
them at build time instead of having to copy to a fixed size buffer at
run time.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/5>
commit 3e309af84791b8b8bf22938952eecbdd0f863657
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 28 17:30:21 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/merge_requests/5>
commit 8067bc3bd82c1bd3b50e03b7f1614907509495cb commit 8067bc3bd82c1bd3b50e03b7f1614907509495cb
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 10 14:54:38 2022 -0700 Date: Sun Jul 10 14:54:38 2022 -0700
@ -379,7 +501,7 @@ Date: Thu Apr 16 22:49:23 2015 -0700
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit aa02eb3d4f0c5722b8f9012ec08512daa7420184 commit aa02eb3d4f0c5722b8f9012ec08512daa7420184
Author: Erkki Seppälä < <erkki.seppala@vincit.fi> Author: Erkki Seppälä <erkki.seppala@vincit.fi>
Date: Sun Jan 4 12:51:10 2015 -0800 Date: Sun Jan 4 12:51:10 2015 -0800
_XcmsGetProperty: don't deal with uninitialized values, fail instead _XcmsGetProperty: don't deal with uninitialized values, fail instead
@ -842,7 +964,7 @@ Date: Wed Jul 20 19:31:52 2005 +0000
configure cache, you cache it, and the cached value is probably wrong. configure cache, you cache it, and the cached value is probably wrong.
commit bdf7beaadb08e4599d28433a49422825949b8295 commit bdf7beaadb08e4599d28433a49422825949b8295
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Wed Jul 6 20:07:41 2005 +0000 Date: Wed Jul 6 20:07:41 2005 +0000
Build system for xcmsdb Build system for xcmsdb

View file

@ -202,7 +202,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -213,11 +212,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

76
app/xcmsdb/aclocal.m4 vendored
View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -1318,7 +1318,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1376,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1686,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1900,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +1970,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2054,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2162,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2256,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2311,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2344,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2377,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2852,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2872,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2888,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3033,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3142,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -3,12 +3,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,8 +57,16 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES

6638
app/xcmsdb/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -24,8 +24,8 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xcmsdb], AC_INIT([xcmsdb],
[1.0.6], [1.0.7],
[https://gitlab.freedesktop.org/xorg/app/xcmsdb/issues], [https://gitlab.freedesktop.org/xorg/app/xcmsdb/-/issues],
[xcmsdb]) [xcmsdb])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
@ -39,6 +39,9 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8) XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
# Checks for typedefs, structures, and compiler characteristics.
AC_SYS_LARGEFILE
# Checks for pkg-config packages # Checks for pkg-config packages
PKG_CHECK_MODULES(XCMSDB, x11) PKG_CHECK_MODULES(XCMSDB, x11)

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -37,6 +37,10 @@
* INCLUDES * INCLUDES
*/ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <X11/Xos.h> #include <X11/Xos.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
@ -61,7 +65,7 @@
* *
*/ */
typedef struct _DefineEntry { typedef const struct _DefineEntry {
const char *pString; const char *pString;
int define; int define;
} DefineEntry; } DefineEntry;
@ -191,10 +195,10 @@ DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */
int id) /* IN: id to be looked up in that table */ int id) /* IN: id to be looked up in that table */
/* /*
* DESCRIPTION * DESCRIPTION
* Converts a string to an integer define. * Converts an integer define to a string.
* *
* Looks up the string in the table and returns the integer * Looks up the integer in the table and returns the string
* associated with the string. * associated with the integer.
* *
* Later may need similar function for unsigned long define. * Later may need similar function for unsigned long define.
* *
@ -202,7 +206,7 @@ DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */
* *
* RETURNS * RETURNS
* The int equivalent of the defined string. * The int equivalent of the defined string.
* -1 if the string is not found in table * NULL if the string is not found in table
* *
*/ */
{ {
@ -284,24 +288,27 @@ SCScrnClassStringOf(int id)
* Converts a id to astring * Converts a id to astring
* *
* RETURNS * RETURNS
* Pointer to string if found; otherwise NULL. * Pointer to string if found; otherwise "unknown".
* *
*/ */
{ {
return (DefineToStr(ScrnClassTbl, id)); const char *str = DefineToStr(ScrnClassTbl, id);
if (str != NULL)
return str;
else
return "unknown";
} }
/* close the stream and return any memory allocated. */ /* close the stream and return any memory allocated. */
static void static void
closeS(FILE *stream, XDCCC_Correction *pCorrection) closeS(FILE *stream, XDCCC_Correction *pCorrection)
{ {
XDCCC_Correction *pNext;
if (stream) { if (stream) {
fclose(stream); fclose(stream);
} }
while (pCorrection) { while (pCorrection) {
pNext = pCorrection->next; XDCCC_Correction *pNext = pCorrection->next;
free(pCorrection); free(pCorrection);
pCorrection = pNext; pCorrection = pNext;
} }
@ -322,8 +329,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
{ {
char buf[BUFSIZ]; char buf[BUFSIZ];
char keyword[BUFSIZ]; char keyword[BUFSIZ];
char token[BUFSIZ], *ptoken; char token[BUFSIZ];
int ntok;
unsigned int matrices_processed = 0; unsigned int matrices_processed = 0;
/* bit 0 for XYZtoRGB matrix */ /* bit 0 for XYZtoRGB matrix */
/* bit 1 for RGBtoXYZ matrix */ /* bit 1 for RGBtoXYZ matrix */
@ -336,7 +342,9 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
XcmsFloat *pElement = NULL; XcmsFloat *pElement = NULL;
while ((nextline(buf, BUFSIZ, stream)) != NULL) { while ((nextline(buf, BUFSIZ, stream)) != NULL) {
if ((ntok = sscanf(buf, "%s %s", keyword, token)) > 0) { int ntok = sscanf(buf, "%1023s %1023s", keyword, token);
if (ntok > 0) {
switch (SCKeyOf(keyword)) { switch (SCKeyOf(keyword)) {
case XYZTORGBMAT_BEGIN: case XYZTORGBMAT_BEGIN:
if (VisualFlag != VIDEO_RGB) { if (VisualFlag != VIDEO_RGB) {
@ -448,7 +456,7 @@ ProcessColorimetric(FILE *stream, XDCCC_Matrix *pMatrix, int VisualFlag)
break; break;
#endif /* GRAY */ #endif /* GRAY */
case DATA: case DATA:
for (ptoken = strtok(buf, DATA_DELIMS); ptoken != NULL; for (char *ptoken = strtok(buf, DATA_DELIMS); ptoken != NULL;
ptoken = strtok(NULL, DATA_DELIMS)) { ptoken = strtok(NULL, DATA_DELIMS)) {
if (sscanf(ptoken, "%lf", pElement) != 1) { if (sscanf(ptoken, "%lf", pElement) != 1) {
if (VisualFlag == VIDEO_RGB) { if (VisualFlag == VIDEO_RGB) {
@ -516,8 +524,7 @@ static int
ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection) ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
{ {
char buf[BUFSIZ]; char buf[BUFSIZ];
char *keyword; char *tableStr, *sizeStr;
char *tableStr, *sizeStr, *ptoken;
int size; int size;
int state = 0; int state = 0;
/************************************************ /************************************************
@ -529,7 +536,9 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
IntensityRec *pIRec = NULL; IntensityRec *pIRec = NULL;
while ((nextline(buf, BUFSIZ, stream)) != NULL) { while ((nextline(buf, BUFSIZ, stream)) != NULL) {
ptoken = keyword = strtok(buf, DATA_DELIMS); char *ptoken = strtok(buf, DATA_DELIMS);
char *keyword = ptoken;
if (keyword != NULL) { if (keyword != NULL) {
switch (SCKeyOf(keyword)) { switch (SCKeyOf(keyword)) {
case ITBL_BEGIN: case ITBL_BEGIN:
@ -544,7 +553,7 @@ ProcessIProfile(FILE *stream, XDCCC_Correction *pCorrection)
sscanf(sizeStr, "%d", &size) != 1) { sscanf(sizeStr, "%d", &size) != 1) {
fprintf(stderr, fprintf(stderr,
"Line %d: invalid Intensity Table size, %s.\n", "Line %d: invalid Intensity Table size, %s.\n",
linenum, sizeStr); linenum, sizeStr ? sizeStr : "\"\"");
return (0); return (0);
} }
if (size < 0) { if (size < 0) {
@ -1133,8 +1142,6 @@ static int
LoadDataGray(Display *pDpy, window root, int tableType, LoadDataGray(Display *pDpy, window root, int tableType,
LINEAR_RGB_SCCData *pScreenData, int targetFormat) LINEAR_RGB_SCCData *pScreenData, int targetFormat)
{ {
unsigned char *ret_prop;
int count;
int nLevels; int nLevels;
unsigned char *pCard8; unsigned char *pCard8;
unsigned char *pCard8Array = NULL; unsigned char *pCard8Array = NULL;
@ -1143,16 +1150,14 @@ LoadDataGray(Display *pDpy, window root, int tableType,
unsigned long *pCard32; unsigned long *pCard32;
unsigned long *pCard32Array = NULL; unsigned long *pCard32Array = NULL;
unsigned long Card32Array[18]; unsigned long Card32Array[18];
int ret_format; Atom MatricesAtom, CorrectAtom;
unsigned long ret_len, ret_after;
Atom MatricesAtom, CorrectAtom, ret_atom;
XcmsFloat *pValue; XcmsFloat *pValue;
int total; int total;
/* Now store the XDCCC_SCREENWHITEPT */ /* Now store the XDCCC_SCREENWHITEPT */
pCard32 = Card32Array; pCard32 = Card32Array;
pValue = (XcmsFloat *) pScreenData->XYZtoRGBmatrix; pValue = (XcmsFloat *) pScreenData->XYZtoRGBmatrix;
for (count = 0; count < 3; count++) { for (int count = 0; count < 3; count++) {
*pCard32++ = (unsigned long) (*pValue++ * (XcmsFloat) XDCCC_NUMBER); *pCard32++ = (unsigned long) (*pValue++ * (XcmsFloat) XDCCC_NUMBER);
} }
MatricesAtom = XInternAtom(pDpy, XDCCC_SCREENWHITEPT_ATOM_NAME, False); MatricesAtom = XInternAtom(pDpy, XDCCC_SCREENWHITEPT_ATOM_NAME, False);
@ -1163,6 +1168,11 @@ LoadDataGray(Display *pDpy, window root, int tableType,
CorrectAtom = XInternAtom(pDpy, XDCCC_GRAY_CORRECT_ATOM_NAME, False); CorrectAtom = XInternAtom(pDpy, XDCCC_GRAY_CORRECT_ATOM_NAME, False);
if (tableType == CORR_TYPE_NONE) { if (tableType == CORR_TYPE_NONE) {
unsigned char *ret_prop;
Atom ret_atom;
int ret_format;
unsigned long ret_len, ret_after;
XGetWindowProperty(pDpy, root, CorrectAtom, XGetWindowProperty(pDpy, root, CorrectAtom,
0, 5, False, XA_INTEGER, 0, 5, False, XA_INTEGER,
&ret_atom, &ret_format, &ret_len, &ret_after, &ret_atom, &ret_format, &ret_len, &ret_after,
@ -1300,19 +1310,16 @@ static int
ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf) ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
{ {
char *key; char *key;
char *value;
XVisualInfo *vinfo; XVisualInfo *vinfo;
int n_matches; int n_matches;
char delims[8]; const char *delims = DATA_DELIMS ":";
strcpy(delims, DATA_DELIMS);
strcat(delims, ":");
pCorrection->visual_info_mask = VisualNoMask; pCorrection->visual_info_mask = VisualNoMask;
key = strtok(pbuf, delims); key = strtok(pbuf, delims);
do { do {
long tmp; long tmp;
char *value = strtok(NULL, delims);
value = strtok(NULL, delims);
if ((key == NULL) || (value == NULL)) { if ((key == NULL) || (value == NULL)) {
return (0); return (0);
} }

View file

@ -125,7 +125,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -136,11 +135,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -108,7 +108,6 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
Display *dpy; Display *dpy;
int i;
char *displayname = NULL; char *displayname = NULL;
char *filename = NULL; char *filename = NULL;
int query = 0; int query = 0;
@ -119,7 +118,7 @@ main(int argc, char *argv[])
ProgramName = argv[0]; ProgramName = argv[0];
for (i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
char *arg = argv[i]; char *arg = argv[i];
if (arg[0] == '-') { if (arg[0] == '-') {
@ -575,7 +574,6 @@ QuerySCCDataGray(Display * dpy, Window root)
*/ */
{ {
char *property_return, *pChar; char *property_return, *pChar;
int j;
int count, format, cType; int count, format, cType;
unsigned long nitems, nbytes_return; unsigned long nitems, nbytes_return;
Atom MatricesAtom, CorrectAtom; Atom MatricesAtom, CorrectAtom;
@ -604,7 +602,7 @@ QuerySCCDataGray(Display * dpy, Window root)
printf("\nQuerying property %s\n", XDCCC_SCREENWHITEPT_ATOM_NAME); printf("\nQuerying property %s\n", XDCCC_SCREENWHITEPT_ATOM_NAME);
printf("\tWhite Point XYZ :\n"); printf("\tWhite Point XYZ :\n");
printf("\t"); printf("\t");
for (j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
printf("\t%8.5lf", printf("\t%8.5lf",
(long) _XcmsGetElement(format, &pChar, &nitems) / (long) _XcmsGetElement(format, &pChar, &nitems) /
(XcmsFloat) XDCCC_NUMBER); (XcmsFloat) XDCCC_NUMBER);

View file

@ -1,3 +1,88 @@
commit 5244f3a61beb61702f6dcaca64aa99b63b78e3b9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Nov 12 16:51:40 2024 -0800
xcompmgr 1.1.10
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit ebc2a566d68bdfc86e94ae5e37d2ad2124095f5c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 11:37:48 2024 -0700
More variable scope reductions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit 1972797736a5aa25a69c5b0ba53a33592fe1640e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 11:22:16 2024 -0700
Add {} around for loops containing multiple lines of code
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit 7175619585083d6378229e5f86b900472c7d7c01
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 11:11:42 2024 -0700
Use C99 struct initializers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit 4c4bc9a67fbefb63e9dc1355a686622eac7a5da3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 10:23:12 2024 -0700
Convert sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit fb596ae3eb7a4732319391c0274c29cc5499cb23
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 09:38:53 2024 -0700
Use reallocarray() if it is available
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit e455e9eb8091fa7bbcfde9fbe2920ff053f1ee9c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 09:30:32 2024 -0700
Handle realloc() failure
Flagged by cppcheck:
xcompmgr.c:2290:8: error: Common realloc mistake: 'expose_rects' nulled
but not freed upon failure [memleakOnRealloc]
expose_rects = realloc (expose_rects,
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit 062ba6bd66ac4998047467490d608d15c0f6caae
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Aug 3 09:11:17 2024 -0700
find_fade: declare argument as const
Suggested by cppcheck:
xcompmgr.c:211:17: style: Parameter 'w' can be declared with const
[constParameter]
find_fade (win *w)
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/merge_requests/6>
commit 052a0d39908a33e62f4d77b4d9e395f2f3583925 commit 052a0d39908a33e62f4d77b4d9e395f2f3583925
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Nov 12 11:55:23 2022 -0800 Date: Sat Nov 12 11:55:23 2022 -0800

View file

@ -181,7 +181,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -192,11 +191,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -13,13 +13,13 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2) # serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
@ -107,7 +107,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS], AC_DEFUN([PKG_CHECK_EXISTS],
@ -176,14 +176,14 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR( m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met: [Package requirements ($2) were not met:
$$1_PKG_ERRORS $$1_PKG_ERRORS
@ -195,7 +195,7 @@ _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config. path to pkg-config.
@ -205,10 +205,10 @@ _PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
]) ])
else else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
$3 $3
fi[]dnl fi[]dnl
])dnl PKG_CHECK_MODULES ])dnl PKG_CHECK_MODULES
@ -295,6 +295,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR ])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2012 Free Software Foundation, Inc. # Copyright (C) 2002-2012 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
@ -1318,7 +1386,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1423,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1444,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1470,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1754,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1968,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +2038,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2122,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2230,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2324,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2379,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2412,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2445,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2920,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2940,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2956,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3101,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3210,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify

View file

@ -3,12 +3,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the `reallocarray' function. */
#undef HAVE_MEMORY_H #undef HAVE_REALLOCARRAY
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -57,7 +60,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

6505
app/xcompmgr/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT([xcompmgr], [1.1.9], AC_INIT([xcompmgr], [1.1.10],
[https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/issues]) [https://gitlab.freedesktop.org/xorg/app/xcompmgr/-/issues])
AC_CONFIG_SRCDIR([xcompmgr.c]) AC_CONFIG_SRCDIR([xcompmgr.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
@ -17,6 +17,9 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8) XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
# Checks for library functions.
AC_CHECK_FUNCS([reallocarray])
PKG_CHECK_MODULES(XCOMPMGR, PKG_CHECK_MODULES(XCOMPMGR,
[xcomposite xfixes xdamage xrender xext xproto >= 7.0.25]) [xcomposite xfixes xdamage xrender xext xproto >= 7.0.25])

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -125,7 +125,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -136,11 +135,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -46,6 +46,10 @@
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#ifndef HAVE_REALLOCARRAY
#define reallocarray(old, num, size) realloc(old, (num) * (size))
#endif
#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 2 #if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 2
#define HAS_NAME_WINDOW_PIXMAP 1 #define HAS_NAME_WINDOW_PIXMAP 1
#endif #endif
@ -208,11 +212,9 @@ get_time_in_milliseconds (void)
} }
static fade * static fade *
find_fade (win *w) find_fade (const win *w)
{ {
fade *f; for (fade *f = fades; f; f = f->next)
for (f = fades; f; f = f->next)
{ {
if (f->w == w) if (f->w == w)
return f; return f;
@ -223,9 +225,8 @@ find_fade (win *w)
static void static void
dequeue_fade (Display *dpy, fade *f) dequeue_fade (Display *dpy, fade *f)
{ {
fade **prev; for (fade **prev = &fades; *prev; prev = &(*prev)->next)
{
for (prev = &fades; *prev; prev = &(*prev)->next)
if (*prev == f) if (*prev == f)
{ {
*prev = f->next; *prev = f->next;
@ -234,6 +235,7 @@ dequeue_fade (Display *dpy, fade *f)
free (f); free (f);
break; break;
} }
}
} }
static void static void
@ -264,9 +266,11 @@ set_fade (Display *dpy, win *w, double start, double finish, double step,
if (!f) if (!f)
{ {
f = malloc (sizeof (fade)); f = malloc (sizeof (fade));
f->next = NULL; *f = (fade) {
f->w = w; .next = NULL,
f->cur = start; .w = w,
.cur = start
};
enqueue_fade (dpy, f); enqueue_fade (dpy, f);
} }
else if(!override) else if(!override)
@ -391,27 +395,32 @@ make_gaussian_map (Display *dpy, double r)
conv *c; conv *c;
int size = ((int) ceil ((r * 3)) + 1) & ~1; int size = ((int) ceil ((r * 3)) + 1) & ~1;
int center = size / 2; int center = size / 2;
int x, y;
double t; double t;
double g;
c = malloc (sizeof (conv) + size * size * sizeof (double)); c = malloc (sizeof (conv) + size * size * sizeof (double));
c->size = size; *c = (conv) {
c->data = (double *) (c + 1); .size = size,
.data = (double *) (c + 1)
};
t = 0.0; t = 0.0;
for (y = 0; y < size; y++) for (int y = 0; y < size; y++)
for (x = 0; x < size; x++) {
for (int x = 0; x < size; x++)
{ {
g = gaussian (r, (double) (x - center), (double) (y - center)); double g =
gaussian (r, (double) (x - center), (double) (y - center));
t += g; t += g;
c->data[y * size + x] = g; c->data[y * size + x] = g;
} }
}
/* printf ("gaussian total %f\n", t); */ /* printf ("gaussian total %f\n", t); */
for (y = 0; y < size; y++) for (int y = 0; y < size; y++)
for (x = 0; x < size; x++) {
for (int x = 0; x < size; x++)
{ {
c->data[y*size + x] /= t; c->data[y*size + x] /= t;
} }
}
return c; return c;
} }
@ -435,7 +444,6 @@ make_gaussian_map (Display *dpy, double r)
static unsigned char static unsigned char
sum_gaussian (conv *map, double opacity, int x, int y, int width, int height) sum_gaussian (conv *map, double opacity, int x, int y, int width, int height)
{ {
int fx, fy;
double *g_line = map->data; double *g_line = map->data;
int g_size = map->size; int g_size = map->size;
int center = g_size / 2; int center = g_size / 2;
@ -470,12 +478,12 @@ sum_gaussian (conv *map, double opacity, int x, int y, int width, int height)
g_line = g_line + fy_start * g_size + fx_start; g_line = g_line + fy_start * g_size + fx_start;
v = 0; v = 0;
for (fy = fy_start; fy < fy_end; fy++) for (int fy = fy_start; fy < fy_end; fy++)
{ {
double *g_data = g_line; double *g_data = g_line;
g_line += g_size; g_line += g_size;
for (fx = fx_start; fx < fx_end; fx++) for (int fx = fx_start; fx < fx_end; fx++)
v += *g_data++; v += *g_data++;
} }
if (v > 1) if (v > 1)
@ -489,7 +497,6 @@ static void
presum_gaussian (conv *map) presum_gaussian (conv *map)
{ {
int center = map->size/2; int center = map->size/2;
int opacity, x, y;
Gsize = map->size; Gsize = map->size;
@ -501,21 +508,23 @@ presum_gaussian (conv *map)
shadowCorner = malloc ((Gsize + 1) * (Gsize + 1) * 26); shadowCorner = malloc ((Gsize + 1) * (Gsize + 1) * 26);
shadowTop = malloc ((Gsize + 1) * 26); shadowTop = malloc ((Gsize + 1) * 26);
for (x = 0; x <= Gsize; x++) for (int x = 0; x <= Gsize; x++)
{ {
shadowTop[25 * (Gsize + 1) + x] = sum_gaussian (map, 1, x - center, center, Gsize * 2, Gsize * 2); shadowTop[25 * (Gsize + 1) + x] = sum_gaussian (map, 1, x - center, center, Gsize * 2, Gsize * 2);
for(opacity = 0; opacity < 25; opacity++) for (int opacity = 0; opacity < 25; opacity++)
shadowTop[opacity * (Gsize + 1) + x] = shadowTop[25 * (Gsize + 1) + x] * opacity / 25; shadowTop[opacity * (Gsize + 1) + x] = shadowTop[25 * (Gsize + 1) + x] * opacity / 25;
for(y = 0; y <= x; y++) for (int y = 0; y <= x; y++)
{ {
shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x] shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x]
= sum_gaussian (map, 1, x - center, y - center, Gsize * 2, Gsize * 2); = sum_gaussian (map, 1, x - center, y - center, Gsize * 2, Gsize * 2);
shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + x * (Gsize + 1) + y] shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + x * (Gsize + 1) + y]
= shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x]; = shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x];
for(opacity = 0; opacity < 25; opacity++) for (int opacity = 0; opacity < 25; opacity++)
{
shadowCorner[opacity * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x] shadowCorner[opacity * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x]
= shadowCorner[opacity * (Gsize + 1) * (Gsize + 1) + x * (Gsize + 1) + y] = shadowCorner[opacity * (Gsize + 1) * (Gsize + 1) + x * (Gsize + 1) + y]
= shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x] * opacity / 25; = shadowCorner[25 * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x] * opacity / 25;
}
} }
} }
} }
@ -530,7 +539,6 @@ make_shadow (Display *dpy, double opacity, int width, int height)
int swidth = width + gsize; int swidth = width + gsize;
int sheight = height + gsize; int sheight = height + gsize;
int center = gsize / 2; int center = gsize / 2;
int x, y;
unsigned char d; unsigned char d;
int x_diff; int x_diff;
int opacity_int = (int)(opacity * 25); int opacity_int = (int)(opacity * 25);
@ -572,8 +580,9 @@ make_shadow (Display *dpy, double opacity, int width, int height)
if (xlimit > swidth / 2) if (xlimit > swidth / 2)
xlimit = (swidth + 1) / 2; xlimit = (swidth + 1) / 2;
for (y = 0; y < ylimit; y++) for (int y = 0; y < ylimit; y++)
for (x = 0; x < xlimit; x++) {
for (int x = 0; x < xlimit; x++)
{ {
if (xlimit == Gsize && ylimit == Gsize) if (xlimit == Gsize && ylimit == Gsize)
d = shadowCorner[opacity_int * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x]; d = shadowCorner[opacity_int * (Gsize + 1) * (Gsize + 1) + y * (Gsize + 1) + x];
@ -584,6 +593,7 @@ make_shadow (Display *dpy, double opacity, int width, int height)
data[(sheight - y - 1) * swidth + (swidth - x - 1)] = d; data[(sheight - y - 1) * swidth + (swidth - x - 1)] = d;
data[y * swidth + (swidth - x - 1)] = d; data[y * swidth + (swidth - x - 1)] = d;
} }
}
/* /*
* top/bottom * top/bottom
@ -591,7 +601,7 @@ make_shadow (Display *dpy, double opacity, int width, int height)
x_diff = swidth - (gsize * 2); x_diff = swidth - (gsize * 2);
if (x_diff > 0 && ylimit > 0) if (x_diff > 0 && ylimit > 0)
{ {
for (y = 0; y < ylimit; y++) for (int y = 0; y < ylimit; y++)
{ {
if (ylimit == Gsize) if (ylimit == Gsize)
d = shadowTop[opacity_int * (Gsize + 1) + y]; d = shadowTop[opacity_int * (Gsize + 1) + y];
@ -606,13 +616,13 @@ make_shadow (Display *dpy, double opacity, int width, int height)
* sides * sides
*/ */
for (x = 0; x < xlimit; x++) for (int x = 0; x < xlimit; x++)
{ {
if (xlimit == Gsize) if (xlimit == Gsize)
d = shadowTop[opacity_int * (Gsize + 1) + x]; d = shadowTop[opacity_int * (Gsize + 1) + x];
else else
d = sum_gaussian (gaussianMap, opacity, x - center, center, width, height); d = sum_gaussian (gaussianMap, opacity, x - center, center, width, height);
for (y = gsize; y < sheight - gsize; y++) for (int y = gsize; y < sheight - gsize; y++)
{ {
data[y * swidth + x] = d; data[y * swidth + x] = d;
data[y * swidth + (swidth - x - 1)] = d; data[y * swidth + (swidth - x - 1)] = d;
@ -696,10 +706,12 @@ solid_picture (Display *dpy, Bool argb, double a, double r, double g, double b)
return None; return None;
} }
c.alpha = a * 0xffff; c = (XRenderColor) {
c.red = r * 0xffff; .alpha = a * 0xffff,
c.green = g * 0xffff; .red = r * 0xffff,
c.blue = b * 0xffff; .green = g * 0xffff,
.blue = b * 0xffff
};
XRenderFillRectangle (dpy, PictOpSrc, picture, &c, 0, 0, 1, 1); XRenderFillRectangle (dpy, PictOpSrc, picture, &c, 0, 0, 1, 1);
XFreePixmap (dpy, pixmap); XFreePixmap (dpy, pixmap);
return picture; return picture;
@ -729,8 +741,10 @@ set_ignore (Display *dpy, unsigned long sequence)
ignore *i = malloc (sizeof (ignore)); ignore *i = malloc (sizeof (ignore));
if (!i) if (!i)
return; return;
i->sequence = sequence; *i = (ignore) {
i->next = NULL; .sequence = sequence,
.next = NULL
};
*ignore_tail = i; *ignore_tail = i;
ignore_tail = &i->next; ignore_tail = &i->next;
} }
@ -745,11 +759,11 @@ should_ignore (Display *dpy, unsigned long sequence)
static win * static win *
find_win (Display *dpy, Window id) find_win (Display *dpy, Window id)
{ {
win *w; for (win *w = list; w; w = w->next)
{
for (w = list; w; w = w->next)
if (w->id == id) if (w->id == id)
return w; return w;
}
return NULL; return NULL;
} }
@ -771,10 +785,9 @@ root_tile (Display *dpy)
unsigned char *prop; unsigned char *prop;
Bool fill; Bool fill;
XRenderPictureAttributes pa; XRenderPictureAttributes pa;
int p;
pixmap = None; pixmap = None;
for (p = 0; backgroundProps[p]; p++) for (int p = 0; backgroundProps[p]; p++)
{ {
if (XGetWindowProperty (dpy, root, XInternAtom (dpy, backgroundProps[p], False), if (XGetWindowProperty (dpy, root, XInternAtom (dpy, backgroundProps[p], False),
0, 4, False, AnyPropertyType, 0, 4, False, AnyPropertyType,
@ -799,10 +812,12 @@ root_tile (Display *dpy)
CPRepeat, &pa); CPRepeat, &pa);
if (fill) if (fill)
{ {
XRenderColor c; XRenderColor c = {
.red = 0x8080,
c.red = c.green = c.blue = 0x8080; .green = 0x8080,
c.alpha = 0xffff; .blue = 0x8080,
.alpha = 0xffff
};
XRenderFillRectangle (dpy, PictOpSrc, picture, &c, XRenderFillRectangle (dpy, PictOpSrc, picture, &c,
0, 0, 1, 1); 0, 0, 1, 1);
} }
@ -823,12 +838,13 @@ paint_root (Display *dpy)
static XserverRegion static XserverRegion
win_extents (Display *dpy, win *w) win_extents (Display *dpy, win *w)
{ {
XRectangle r; XRectangle r = {
.x = w->a.x,
.y = w->a.y,
.width = w->a.width + w->a.border_width * 2,
.height = w->a.height + w->a.border_width * 2
};
r.x = w->a.x;
r.y = w->a.y;
r.width = w->a.width + w->a.border_width * 2;
r.height = w->a.height + w->a.border_width * 2;
if (compMode != CompSimple && !(w->windowType == winDockAtom && excludeDockShadows)) if (compMode != CompSimple && !(w->windowType == winDockAtom && excludeDockShadows))
{ {
if (compMode == CompServerShadows || w->mode != WINDOW_ARGB) if (compMode == CompServerShadows || w->mode != WINDOW_ARGB)
@ -857,10 +873,12 @@ win_extents (Display *dpy, win *w)
&w->shadow_width, &w->shadow_height); &w->shadow_width, &w->shadow_height);
} }
} }
sr.x = w->a.x + w->shadow_dx; sr = (XRectangle) {
sr.y = w->a.y + w->shadow_dy; .x = w->a.x + w->shadow_dx,
sr.width = w->shadow_width; .y = w->a.y + w->shadow_dy,
sr.height = w->shadow_height; .width = w->shadow_width,
.height = w->shadow_height
};
if (sr.x < r.x) if (sr.x < r.x)
{ {
r.width = (r.x + r.width) - sr.x; r.width = (r.x + r.width) - sr.x;
@ -909,11 +927,12 @@ paint_all (Display *dpy, XserverRegion region)
if (!region) if (!region)
{ {
XRectangle r; XRectangle r = {
r.x = 0; .x = 0,
r.y = 0; .y = 0,
r.width = root_width; .width = root_width,
r.height = root_height; .height = root_height
};
region = XFixesCreateRegion (dpy, &r, 1); region = XFixesCreateRegion (dpy, &r, 1);
} }
#if MONITOR_REPAINT #if MONITOR_REPAINT
@ -1504,8 +1523,10 @@ restack_win (Display *dpy, win *w, Window new_above)
/* unhook */ /* unhook */
for (prev = &list; *prev; prev = &(*prev)->next) for (prev = &list; *prev; prev = &(*prev)->next)
{
if ((*prev) == w) if ((*prev) == w)
break; break;
}
*prev = w->next; *prev = w->next;
/* rehook */ /* rehook */
@ -1617,6 +1638,7 @@ finish_destroy_win (Display *dpy, Window id, Bool gone)
win **prev, *w; win **prev, *w;
for (prev = &list; (w = *prev); prev = &w->next) for (prev = &list; (w = *prev); prev = &w->next)
{
if (w->id == id) if (w->id == id)
{ {
if (gone) if (gone)
@ -1653,6 +1675,7 @@ finish_destroy_win (Display *dpy, Window id, Bool gone)
free (w); free (w);
break; break;
} }
}
} }
#if HAS_NAME_WINDOW_PIXMAP #if HAS_NAME_WINDOW_PIXMAP
@ -1769,7 +1792,7 @@ shape_kind(int kind)
case ShapeInput: case ShapeInput:
return "ShapeInput"; return "ShapeInput";
default: default:
sprintf (buf, "Shape %d", kind); snprintf (buf, sizeof(buf), "Shape %d", kind);
return buf; return buf;
} }
} }
@ -1920,7 +1943,7 @@ ev_name (XEvent *ev)
{ {
return "Shape"; return "Shape";
} }
sprintf (buf, "Event %d", ev->type); snprintf (buf, sizeof(buf), "Event %d", ev->type);
return buf; return buf;
} }
} }
@ -2287,21 +2310,32 @@ main (int argc, char **argv)
{ {
if (expose_rects) if (expose_rects)
{ {
expose_rects = realloc (expose_rects, XRectangle *old = expose_rects;
(size_expose + more) *
sizeof (XRectangle)); expose_rects = reallocarray (old,
size_expose += more; (size_expose + more),
sizeof (XRectangle));
if (expose_rects == NULL) {
expose_rects = old;
expose_root (dpy, root, expose_rects, n_expose);
n_expose = 0;
} else {
size_expose += more;
}
} }
else else
{ {
expose_rects = malloc (more * sizeof (XRectangle)); expose_rects = reallocarray (NULL, more,
sizeof (XRectangle));
size_expose = more; size_expose = more;
} }
} }
expose_rects[n_expose].x = ev.xexpose.x; expose_rects[n_expose] = (XRectangle) {
expose_rects[n_expose].y = ev.xexpose.y; .x = ev.xexpose.x,
expose_rects[n_expose].width = ev.xexpose.width; .y = ev.xexpose.y,
expose_rects[n_expose].height = ev.xexpose.height; .width = ev.xexpose.width,
.height = ev.xexpose.height
};
n_expose++; n_expose++;
if (ev.xexpose.count == 0) if (ev.xexpose.count == 0)
{ {

View file

@ -1,3 +1,73 @@
commit fc79791bd8ec7adb88e206158484b940343c6765
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Dec 4 13:19:49 2024 -0800
xkbevd 1.1.6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit df09a8bd9d4692612647c5054d8113f7b83ce961
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Nov 11 11:06:39 2024 -0800
Use _stricmp() instead of strcasecmp() on Windows
v2: Exclude include of <strings.h> as well
Fixes: e4bae5f ("Assume target platforms have strcasecmp now")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/7>
commit 53fc60d2eb2c6e3847d2e6cb6e3d3f48eaa8e0d8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 15:44:00 2024 -0700
Accept --help & --version as aliases to -help & -version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
commit ab1024ef4bd01324d8506d069b465dacc9579165
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 15:23:33 2024 -0700
evargs.c: constify pointer arguments that aren't modified
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
commit 1176594f37734c3f60a0932c1e666edb5179a702
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 15:12:49 2024 -0700
evargs.c: Use standard strchr() instead of deprecated index()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
commit 7685c5d538067e726723dd99ef8108d303a9ee1a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 12:58:01 2024 -0700
Remove detectableRepeat variable
The only uses of it were in the code in the '#ifdef notyet' bits
removed a decade ago in commit 01774fb58330733858ff41ceabe2d646d127d4f3.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/6>
commit e4bae5f23e2c12d2771b93adc7c686d8f600b3a9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Apr 22 10:26:01 2024 -0700
Assume target platforms have strcasecmp now
It has been required since Unix98/SUSv2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbevd/-/merge_requests/5>
commit ca8e535970c7bec44e02141113e31a42bb0a1c5e commit ca8e535970c7bec44e02141113e31a42bb0a1c5e
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Nov 12 15:47:00 2022 -0800 Date: Sat Nov 12 15:47:00 2022 -0800
@ -871,7 +941,7 @@ Date: Wed Jul 20 19:31:57 2005 +0000
configure cache, you cache it, and the cached value is probably wrong. configure cache, you cache it, and the cached value is probably wrong.
commit 6b1df45952ed9088b8f9db18afbd62f1ee84f59d commit 6b1df45952ed9088b8f9db18afbd62f1ee84f59d
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Wed Jul 6 20:38:28 2005 +0000 Date: Wed Jul 6 20:38:28 2005 +0000
build system for xkbevd build system for xkbevd

View file

@ -213,7 +213,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -224,11 +223,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

166
app/xkbevd/aclocal.m4 vendored
View file

@ -13,13 +13,13 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2) # serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
@ -107,7 +107,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS], AC_DEFUN([PKG_CHECK_EXISTS],
@ -176,14 +176,14 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR( m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met: [Package requirements ($2) were not met:
$$1_PKG_ERRORS $$1_PKG_ERRORS
@ -195,7 +195,7 @@ _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config. path to pkg-config.
@ -205,10 +205,10 @@ _PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
]) ])
else else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
$3 $3
fi[]dnl fi[]dnl
])dnl PKG_CHECK_MODULES ])dnl PKG_CHECK_MODULES
@ -295,6 +295,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR ])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2012 Free Software Foundation, Inc. # Copyright (C) 2002-2012 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
@ -1318,7 +1386,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1423,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1444,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1470,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1754,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1968,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +2038,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2122,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2230,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2324,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2379,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2412,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2445,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2920,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2940,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2956,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3101,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3210,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -3,18 +3,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
@ -60,7 +57,9 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */

6569
app/xkbevd/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xkbevd], [1.1.5], AC_INIT([xkbevd], [1.1.6],
[https://gitlab.freedesktop.org/xorg/app/xkbevd/-/issues], [xkbevd]) [https://gitlab.freedesktop.org/xorg/app/xkbevd/-/issues], [xkbevd])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
@ -44,8 +44,6 @@ if test ! -f "cfgparse.c"; then
fi fi
fi fi
AC_CHECK_FUNCS([strcasecmp])
# Checks for pkg-config packages # Checks for pkg-config packages
PKG_CHECK_MODULES(XKBEVD, xkbfile x11) PKG_CHECK_MODULES(XKBEVD, xkbfile x11)

View file

@ -29,7 +29,7 @@
/***====================================================================***/ /***====================================================================***/
static char * static char *
AppendBellNotifyArg(char *sink, char *arg, XkbEvent *ev) AppendBellNotifyArg(char *sink, const char *arg, const XkbEvent *ev)
{ {
if (uStringEqual(arg, "device") || uStringEqual(arg, "D")) if (uStringEqual(arg, "device") || uStringEqual(arg, "D"))
sprintf(sink, "%d", ev->bell.device); sprintf(sink, "%d", ev->bell.device);
@ -51,7 +51,7 @@ AppendBellNotifyArg(char *sink, char *arg, XkbEvent *ev)
} }
static char * static char *
AppendAccessXNotifyArg(char *sink, char *arg, XkbEvent *ev) AppendAccessXNotifyArg(char *sink, const char *arg, const XkbEvent *ev)
{ {
if (uStringEqual(arg, "device") || uStringEqual(arg, "D")) if (uStringEqual(arg, "device") || uStringEqual(arg, "D"))
sprintf(sink, "%d", ev->accessx.device); sprintf(sink, "%d", ev->accessx.device);
@ -70,7 +70,7 @@ AppendAccessXNotifyArg(char *sink, char *arg, XkbEvent *ev)
} }
static char * static char *
AppendActionMessageArg(char *sink, char *arg, XkbEvent *ev) AppendActionMessageArg(char *sink, const char *arg, const XkbEvent *ev)
{ {
if (uStringEqual(arg, "device") || uStringEqual(arg, "D")) if (uStringEqual(arg, "device") || uStringEqual(arg, "D"))
sprintf(sink, "%d", ev->message.device); sprintf(sink, "%d", ev->message.device);
@ -88,7 +88,7 @@ AppendActionMessageArg(char *sink, char *arg, XkbEvent *ev)
} }
static char * static char *
AppendEventArg(char *sink, char *arg, XkbEvent *ev) AppendEventArg(char *sink, const char *arg, const XkbEvent *ev)
{ {
switch (ev->any.xkb_type) { switch (ev->any.xkb_type) {
case XkbBellNotify: case XkbBellNotify:
@ -108,10 +108,11 @@ AppendEventArg(char *sink, char *arg, XkbEvent *ev)
} }
static void static void
CopyEventArg(char **sink_inout, char **source_inout, XkbEvent *ev) CopyEventArg(char **sink_inout, const char **source_inout, const XkbEvent *ev)
{ {
char buf[1024]; char buf[1024];
char *source, *sink; const char *source;
char *sink;
char *arg; char *arg;
arg = buf; arg = buf;
@ -150,13 +151,14 @@ CopyEventArg(char **sink_inout, char **source_inout, XkbEvent *ev)
return; return;
} }
char * const char *
SubstituteEventArgs(char *cmd, XkbEvent *ev) SubstituteEventArgs(const char *cmd, const XkbEvent *ev)
{ {
static char buf[1024]; static char buf[1024];
char *source, *sink; const char *source;
char *sink;
if (index(cmd, '$') == NULL) if (strchr(cmd, '$') == NULL)
return cmd; return cmd;
buf[0] = '\0'; buf[0] = '\0';
sink = buf; sink = buf;

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
# Protect names problematic for 'test' and other utilities. shift;;
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # With -d, create the new directory with the user-specified mode.
# This is like FreeBSD 'install' as of 1997-10-28. # Otherwise, rely on $mkdir_umask.
umask=`umask` if test -n "$dir_arg"; then
case $stripcmd.$umask in mkdir_mode=-m$mode
# Optimize common cases. else
*[2367][2367]) mkdir_umask=$umask;; mkdir_mode=
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; fi
*[0-7]) posix_mkdir=false
mkdir_umask=`expr $umask + 22 \ # The $RANDOM variable is not portable (e.g., dash). Use it
- $umask % 100 % 40 + $umask % 20 \ # here however when possible just to lower collision chance.
- $umask % 10 % 4 + $umask % 2 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. trap '
# Otherwise, rely on $mkdir_umask. ret=$?
if test -n "$dir_arg"; then rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
mkdir_mode=-m$mode exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
mkdir_mode= # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;;
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

View file

@ -125,7 +125,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -136,11 +135,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@

View file

@ -125,32 +125,3 @@ uInternalError(const char *s, ...)
/***====================================================================***/ /***====================================================================***/
#ifndef HAVE_STRCASECMP
int
uStrCaseCmp(const char *str1, const char *str2)
{
char buf1[512], buf2[512];
char c, *s;
register int n;
for (n = 0, s = buf1; (c = *str1++); n++) {
if (isupper(c))
c = tolower(c);
if (n > 510)
break;
*s++ = c;
}
*s = '\0';
for (n = 0, s = buf2; (c = *str2++); n++) {
if (isupper(c))
c = tolower(c);
if (n > 510)
break;
*s++ = c;
}
*s = '\0';
return (strcmp(buf1, buf2));
}
#endif

View file

@ -39,6 +39,9 @@
#include <X11/Xfuncs.h> #include <X11/Xfuncs.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h> #include <stddef.h>
#if !defined(_MSC_VER)
#include <strings.h>
#endif
_XFUNCPROTOBEGIN _XFUNCPROTOBEGIN
@ -87,6 +90,10 @@ extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
/***====================================================================***/ /***====================================================================***/
#if defined(_MSC_VER)
#define strcasecmp _stricmp
#endif
#define NullString ((char *)NULL) #define NullString ((char *)NULL)
#define uStringText(s) ((s)==NullString?"<NullString>":(s)) #define uStringText(s) ((s)==NullString?"<NullString>":(s))
@ -94,11 +101,7 @@ extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
#define uStringPrefix(p,s) (strncmp(p,s,strlen(p))==0) #define uStringPrefix(p,s) (strncmp(p,s,strlen(p))==0)
#define uStringCompare(s1,s2) (strcmp(s1,s2)) #define uStringCompare(s1,s2) (strcmp(s1,s2))
#define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) #define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0)
#ifdef HAVE_STRCASECMP
#define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) #define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2))
#else
extern int uStrCaseCmp(const char *s1, const char *s2);
#endif
#define uStringDup(s1) (strdup(s1)) #define uStringDup(s1) (strdup(s1))
/***====================================================================***/ /***====================================================================***/

View file

@ -57,7 +57,6 @@ Display * dpy = NULL;
static const char *cfgFileName = NULL; static const char *cfgFileName = NULL;
int xkbOpcode = 0; int xkbOpcode = 0;
int xkbEventCode = 0; int xkbEventCode = 0;
Bool detectableRepeat = False;
static CfgEntryPtr config = NULL; static CfgEntryPtr config = NULL;
static unsigned long eventMask = 0; static unsigned long eventMask = 0;
@ -192,12 +191,14 @@ parseArgs(int argc, char *argv[])
else if (strcmp(argv[i], "-v") == 0) { else if (strcmp(argv[i], "-v") == 0) {
verbose++; verbose++;
} }
else if (strcmp(argv[i], "-version") == 0) { else if ((strcmp(argv[i], "-version") == 0) ||
(strcmp(argv[i], "--version") == 0)) {
puts(PACKAGE_STRING); puts(PACKAGE_STRING);
exit(0); exit(0);
} }
else if ((strcmp(argv[i], "-?") == 0) || else if ((strcmp(argv[i], "-?") == 0) ||
(strcmp(argv[i], "-help") == 0)) { (strcmp(argv[i], "-help") == 0) ||
(strcmp(argv[i], "--help") == 0)) {
Usage(argc, argv); Usage(argc, argv);
exit(0); exit(0);
} }
@ -403,7 +404,8 @@ static Bool
ProcessMatchingConfig(XkbEvent * ev) ProcessMatchingConfig(XkbEvent * ev)
{ {
CfgEntryPtr cfg; CfgEntryPtr cfg;
char buf[1024], *cmd; char buf[1024];
const char *cmd;
int ok; int ok;
cfg = FindMatchingConfig(ev); cfg = FindMatchingConfig(ev);

View file

@ -47,7 +47,6 @@ extern int scanStrLine;
extern Display * dpy; extern Display * dpy;
extern int xkbOpcode; extern int xkbOpcode;
extern int xkbEventCode; extern int xkbEventCode;
extern Bool detectableRepeat;
extern XkbDescPtr xkb; extern XkbDescPtr xkb;
@ -83,9 +82,9 @@ extern void InterpretConfigs(
CfgEntryPtr /* cfgs */ CfgEntryPtr /* cfgs */
); );
extern char *SubstituteEventArgs( extern const char *SubstituteEventArgs(
char * /* cmd */, const char * /* cmd */,
XkbEvent * /* ev */ const XkbEvent * /* ev */
); );
extern void PrintXkbEvent( extern void PrintXkbEvent(

View file

@ -1,3 +1,270 @@
commit 8ea4c3e22a2ff79d373f8a364309c5a4a0c01ced
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 12 11:04:07 2024 -0700
xkbprint 1.0.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 3ce73201e3d808e5e4f6c20e22d6e6e86e3b81e8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 16:53:26 2024 -0700
Use C99 struct initializers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbprint/-/merge_requests/6>
commit 4868f37f09843432b261371875b2f433f2a1f7fa
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 16:38:24 2024 -0700
Variable scope reductions
Some recommended by cppcheck, others found by manual inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbprint/-/merge_requests/6>
commit 823cecf574645cd26ed43b18c9c68a06dc25f95a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 16:20:59 2024 -0700
FindKeysymsByName: avoid NULL pointer dereference
Clears warning from cppcheck:
psgeom.c:1645:15: warning: Either the condition 'state->args!=0L' is
redundant or there is possible null pointer dereference: state->args.
[nullPointerRedundantCheck]
if ((state->args->wantDiffs) && (eG >= XkbKeyNumGroups(xkb, kc)))
^
psgeom.c:1635:21: note: Assuming that condition 'state->args!=0L' is not
redundant
if (state->args != NULL) {
^
psgeom.c:1645:15: note: Null pointer dereference
if ((state->args->wantDiffs) && (eG >= XkbKeyNumGroups(xkb, kc)))
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbprint/-/merge_requests/6>
commit ed190ca257c808b5d76babf01a5dd57c7d749c9d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 16:18:02 2024 -0700
ClearFontStuff: avoid NULL pointer dereference
Clears warning from cppcheck:
psgeom.c:400:5: warning: Either the condition 'stuff' is redundant or there
is possible null pointer dereference: stuff. [nullPointerRedundantCheck]
bzero(stuff, sizeof(FontStuff));
^
psgeom.c:398:9: note: Assuming that condition 'stuff' is not redundant
if (stuff && stuff->foundry)
^
psgeom.c:400:5: note: Null pointer dereference
bzero(stuff, sizeof(FontStuff));
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbprint/-/merge_requests/6>
commit 75a78342999f5c98ba5e0d154a1c506497daac5d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 28 16:13:11 2024 -0700
configure: Use AC_SYS_LARGEFILE to enable large file support
While keymap files or generated output should never be more than 2gb in
size, they may be stored on filesystems with inodes or timestamps outside
of the 32-bit range.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbprint/-/merge_requests/6>
commit 1a4c0388e5a8c938544e0e6c5ccdb92a51de1b84
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Feb 11 12:31:51 2023 -0800
unifdef -Usgi
SGI's End of Support Life for Irix was December 2013
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7500b59a3ce665fa53c476fe26a01db96dc994be
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 15 10:26:33 2022 -0700
xkbprint 1.0.6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 69deaf13057d3a8b9c01350e2cdfc40080f5433a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 16 11:56:06 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit f586ae4a0a8d081c46f10f4cb4c27840d611edec
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 16 11:51:37 2022 -0700
Stop leaking XkbAtomGetString allocations
XkbAtomGetString is a wrapper around XGetAtomName, and like XGetAtomName
returns a newly allocated string (or NULL) on every call, so we should
free those strings when done instead of leaking them.
Reported by Oracle Parfait static analyser:
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(state->dpy, state->geom->name)
at line 720 of app/xkbprint/psgeom.c in function 'PSProlog'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 612 of app/xkbprint/psgeom.c in function 'PSProlog' with XkbAtomGetString(state->dpy, state->geom->name)
pointer leaks when (i + 1) >= state->geom->num_colors at line 694
and (i + 1) >= state->geom->num_shapes at line 712.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(state->dpy, state->geom->name)
at line 720 of app/xkbprint/psgeom.c in function 'PSProlog'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 657 of app/xkbprint/psgeom.c in function 'PSProlog' with XkbAtomGetString(state->dpy, state->geom->name)
pointer leaks when (i + 1) >= state->geom->num_colors at line 694
and (i + 1) >= state->geom->num_shapes at line 712.
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer name allocated with XkbAtomGetString(state->dpy, geom->name)
at line 962 of app/xkbprint/psgeom.c in function 'PSPageTrailer'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
name allocated at line 845 of app/xkbprint/psgeom.c in function 'PSPageTrailer' with XkbAtomGetString(state->dpy, geom->name)
name leaks when (p + 1) >= state->args->copies at line 926.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer sName allocated with XkbAtomGetString(state->dpy, sAtom)
at line 962 of app/xkbprint/psgeom.c in function 'PSPageTrailer'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
sName allocated at line 877 of app/xkbprint/psgeom.c in function 'PSPageTrailer' with XkbAtomGetString(state->dpy, sAtom)
sName leaks when (p + 1) >= state->args->copies at line 926.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer sName allocated with XkbAtomGetString(state->dpy, sAtom)
at line 962 of app/xkbprint/psgeom.c in function 'PSPageTrailer'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
sName allocated at line 910 of app/xkbprint/psgeom.c in function 'PSPageTrailer' with XkbAtomGetString(state->dpy, sAtom)
sName leaks when (p + 1) >= state->args->copies at line 926.
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer dname allocated with XkbAtomGetString(xkb->dpy, doodad.any.name)
at line 1068 of app/xkbprint/psgeom.c in function 'PSDoodad'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
dname allocated at line 974 of app/xkbprint/psgeom.c in function 'PSDoodad' with XkbAtomGetString(xkb->dpy, doodad.any.name)
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer name allocated with XkbAtomGetString(...)
at line 1068 of app/xkbprint/psgeom.c in function 'PSDoodad'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
name allocated at line 980 of app/xkbprint/psgeom.c in function 'PSDoodad' with XkbAtomGetString(...)
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer name allocated with XkbAtomGetString(...)
at line 1068 of app/xkbprint/psgeom.c in function 'PSDoodad'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
name allocated at line 1044 of app/xkbprint/psgeom.c in function 'PSDoodad' with XkbAtomGetString(...)
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer name allocated with XkbAtomGetString(...)
at line 1068 of app/xkbprint/psgeom.c in function 'PSDoodad'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
name allocated at line 1058 of app/xkbprint/psgeom.c in function 'PSDoodad' with XkbAtomGetString(...)
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(dpy, section->name)
at line 2063 of app/xkbprint/psgeom.c in function 'PSSection'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 1907 of app/xkbprint/psgeom.c in function 'PSSection' with XkbAtomGetString(dpy, section->name)
pointer leaks when (k + 1) >= (section->rows + <pointer arithmetic>)->num_keys at line 1936
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(dpy, shape->name)
at line 2063 of app/xkbprint/psgeom.c in function 'PSSection'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 1945 of app/xkbprint/psgeom.c in function 'PSSection' with XkbAtomGetString(dpy, shape->name)
pointer leaks when (k + 1) >= (section->rows + <pointer arithmetic>)->num_keys at line 1936
and (r + 1) >= section->num_rows at line 1925.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(dpy, shape->name)
at line 2063 of app/xkbprint/psgeom.c in function 'PSSection'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 1951 of app/xkbprint/psgeom.c in function 'PSSection' with XkbAtomGetString(dpy, shape->name)
pointer leaks when (k + 1) >= (section->rows + <pointer arithmetic>)->num_keys at line 1936
and (r + 1) >= section->num_rows at line 1925.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(dpy, shape->name)
at line 2063 of app/xkbprint/psgeom.c in function 'PSSection'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 1960 of app/xkbprint/psgeom.c in function 'PSSection' with XkbAtomGetString(dpy, shape->name)
pointer leaks when (k + 1) >= (section->rows + <pointer arithmetic>)->num_keys at line 1936
and (r + 1) >= section->num_rows at line 1925.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer pointer allocated with XkbAtomGetString(dpy, shape->name)
at line 2063 of app/xkbprint/psgeom.c in function 'PSSection'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
pointer allocated at line 1966 of app/xkbprint/psgeom.c in function 'PSSection' with XkbAtomGetString(dpy, shape->name)
pointer leaks when (k + 1) >= (section->rows + <pointer arithmetic>)->num_keys at line 1936
and (r + 1) >= section->num_rows at line 1925.
Error: Memory leak
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer name allocated with XkbAtomGetString(...)
at line 2131 of app/xkbprint/psgeom.c in function 'GeometryToPostScript'.
Allocated value returned to caller at line 207 of lib/libxkbfile/src/xkbatom.c in function 'XkbAtomGetString'
name allocated at line 2110 of app/xkbprint/psgeom.c in function 'GeometryToPostScript' with XkbAtomGetString(...)
name leaks when name != NULL at line 2111.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit cc85e7b233613633a5496f0fa27bf49b409c33e4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 2 12:57:58 2022 -0700
man page: remove out-of-date COPYRIGHT section
The information previously listed here didn't match what is present in
the source code or the COPYING file, and the X(7) man page doesn't list
any license information as this had claimed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit df4b45b62fafb218b613baade4a831522effdfcc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Dec 6 15:01:12 2021 -0800
Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 963fd74b2c425e700e9a15942963fd78c9dcd447
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Dec 6 15:01:09 2021 -0800
gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7defa9ddfd5f5d1853b9f404af854b0f42fa6ee5 commit 7defa9ddfd5f5d1853b9f404af854b0f42fa6ee5
Author: Matt Turner <mattst88@gmail.com> Author: Matt Turner <mattst88@gmail.com>
Date: Sun Nov 3 14:20:07 2019 -0800 Date: Sun Nov 3 14:20:07 2019 -0800

View file

@ -180,9 +180,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \ done; \
reldir="$$dir2" reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
GZIP_ENV = --best GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip DIST_TARGETS = dist-xz dist-gzip
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@ -203,7 +203,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
@ -214,11 +213,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@ INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
@ -300,6 +297,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@ -649,6 +647,7 @@ distdir: $(DISTFILES)
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir) $(am__post_remove_distdir)
@ -656,7 +655,6 @@ dist-bzip2: distdir
dist-lzip: distdir dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-xz: distdir dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir) $(am__post_remove_distdir)

View file

@ -13,15 +13,15 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1) # serial 12 (pkg-config-0.29.2)
dnl
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl dnl
@ -62,7 +62,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require. dnl of the macros you require.
m4_defun([PKG_PREREQ], m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1]) [m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ ])dnl PKG_PREREQ
@ -163,7 +163,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no pkg_failed=no
AC_MSG_CHECKING([for $1]) AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@ -173,7 +173,7 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.]) See the pkg-config man page for more details.])
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED _PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
@ -194,7 +194,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl _PKG_TEXT])[]dnl
]) ])
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE( m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it [The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full is in your PATH or set the PKG_CONFIG environment variable to the full
@ -1318,7 +1318,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1376,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -1686,7 +1686,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -1900,7 +1900,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -1970,7 +1970,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -2054,7 +2054,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -2162,7 +2162,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -2256,7 +2256,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -2311,7 +2311,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2344,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2377,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2852,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2872,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2888,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -3025,7 +3033,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3142,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*) MINGW*)
file_conv=mingw file_conv=mingw
;; ;;
CYGWIN*) CYGWIN* | MSYS*)
file_conv=cygwin file_conv=cygwin
;; ;;
*) *)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*) mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;; ;;
cygwin/*) cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"` file=`cygpath -m "$file" || echo "$file"`
;; ;;
wine/*) wine/*)
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'. # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1 eat=1
case $2 in case $2 in
*.o | *.[oO][bB][jJ]) *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2" func_file_conv "$2"
set x "$@" -Fo"$file" set x "$@" -Fo"$file"
shift shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'. right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF EOF
exit $? exit $?
;; ;;
-v | --v*) -v | --v*)
echo "compile $scriptversion" echo "compile (GNU Automake) $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;

View file

@ -6,12 +6,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -30,6 +33,9 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE
@ -60,40 +66,104 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */ /* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
# undef _ALL_SOURCE # undef _ALL_SOURCE
#endif #endif
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable GNU extensions on systems that have them. */ /* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Enable threading extensions on Solaris. */ /* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS
#endif #endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */ /* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE #ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE # undef _TANDEM_SOURCE
#endif #endif
/* Enable general extensions on Solaris. */ /* Enable X/Open extensions. Define to 500 only if necessary
#ifndef __EXTENSIONS__ to make mbstate_t available. */
# undef __EXTENSIONS__ #ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif #endif
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* Define to 1 if on MINIX. */ /* Number of bits in a file offset, on hosts where this is settable. */
#undef _MINIX #undef _FILE_OFFSET_BITS
/* Define to 2 if the system does not provide POSIX.1 features except with /* Define for large files, on AIX-style hosts. */
this defined. */ #undef _LARGE_FILES
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

Some files were not shown because too many files have changed in this diff Show more