Skip to content

Commit d8eb308

Browse files
committed
Fix xtrans version.
When libxtrans was updated to 1.5.0 this part was missed.
1 parent ad0446a commit d8eb308

File tree

5 files changed

+2511
-2193
lines changed

5 files changed

+2511
-2193
lines changed

lib/libxtrans/aclocal.m4

+13-24
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ dnl DEALINGS IN THE SOFTWARE.
13551355
# See the "minimum version" comment for each macro you use to see what
13561356
# version you require.
13571357
m4_defun([XORG_MACROS_VERSION],[
1358-
m4_define([vers_have], [1.20.0])
1358+
m4_define([vers_have], [1.20.2])
13591359
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
13601360
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
13611361
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1402,10 +1402,10 @@ rm -f conftest.$ac_ext
14021402
14031403
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
14041404
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
1405-
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1405+
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
14061406
AC_MSG_RESULT([no])
14071407
else
1408-
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
1408+
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
14091409
TRADITIONALCPPFLAGS="-traditional"
14101410
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
14111411
AC_MSG_RESULT([yes])
@@ -2693,30 +2693,20 @@ AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
26932693
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
26942694
# malloc(0) returns NULL. Packages should add one of these cflags to
26952695
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
2696+
#
2697+
# No longer actually tests since there is no guarantee applications will
2698+
# run with the same malloc implementation we tested against, and the cost
2699+
# of always ensuring the size passed to malloc is non-zero is minimal now.
2700+
# Still allows builders to override when they have complete control over
2701+
# which malloc implementation will be used.
26962702
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
26972703
AC_ARG_ENABLE(malloc0returnsnull,
26982704
AS_HELP_STRING([--enable-malloc0returnsnull],
2699-
[malloc(0) returns NULL (default: auto)]),
2705+
[assume malloc(0) can return NULL (default: yes)]),
27002706
[MALLOC_ZERO_RETURNS_NULL=$enableval],
2701-
[MALLOC_ZERO_RETURNS_NULL=auto])
2702-
2703-
AC_MSG_CHECKING([whether malloc(0) returns NULL])
2704-
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
2705-
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
2706-
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
2707-
#include <stdlib.h>
2708-
],[
2709-
char *m0, *r0, *c0, *p;
2710-
m0 = malloc(0);
2711-
p = malloc(10);
2712-
r0 = realloc(p,0);
2713-
c0 = calloc(0,10);
2714-
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
2715-
])],
2716-
[xorg_cv_malloc0_returns_null=yes],
2717-
[xorg_cv_malloc0_returns_null=no])])
2718-
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
2719-
fi
2707+
[MALLOC_ZERO_RETURNS_NULL=yes])
2708+
2709+
AC_MSG_CHECKING([whether to act as if malloc(0) can return NULL])
27202710
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
27212711
27222712
if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
@@ -3013,7 +3003,6 @@ AC_LANG_CASE(
30133003
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
30143004
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
30153005
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
3016-
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
30173006
]
30183007
)
30193008

0 commit comments

Comments
 (0)