mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[build] Fix some config errors found by gcc 14
Or more realistically, attempting to use gcc 14 (it ICEs, so can't be used yet).
This commit is contained in:
parent
38b1d2d238
commit
2b70eaa85e
3 changed files with 6 additions and 6 deletions
|
@ -56,7 +56,7 @@ if test "x$GCC" = xyes; then
|
|||
shift
|
||||
args="$*"
|
||||
AC_MSG_CHECKING(for gcc version)
|
||||
CCVER="gcc `$CC --version | grep '[[0-9]]\.[[0-9]]' | sed -e 's/.*(GCC)//' -e 's/[[^0-9]]*\([[0-9.]]*\).*/\1/'`"
|
||||
CCVER="gcc `$CC --version | grep '[[0-9]]\.[[0-9]]' | sed -e 's/.*([[^)]]*)//' -e 's/[[^0-9]]*\([[0-9.]]*\).*/\1/'`"
|
||||
set $CCVER
|
||||
save_IFS="$IFS"
|
||||
IFS="."
|
||||
|
@ -341,7 +341,7 @@ if test "x$leave_cflags_alone" != xyes; then
|
|||
[[bool flag = true;]],
|
||||
[[return flag ? 1 : 0]])],
|
||||
[],
|
||||
[QF_CC_OPTION_TEST(-std=gnu23,[],QF_CC_OPTION(-std=gnu2x))]
|
||||
[QF_CC_OPTION_TEST(-std=gnu23,QF_CC_OPTION(-std=gnu23),QF_CC_OPTION(-std=gnu2x))]
|
||||
)
|
||||
fi
|
||||
AC_MSG_CHECKING([for c23])
|
||||
|
|
|
@ -37,16 +37,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "fnmatch.h"]], [[int (*foo)() = fn
|
|||
])
|
||||
|
||||
AC_MSG_CHECKING(for strnlen in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strnlen;]])],[AC_DEFINE(HAVE_STRNLEN_PROTO, 1, Define this if strnlen is prototyped in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[size_t (*foo)(const char *, size_t) = strnlen;]])],[AC_DEFINE(HAVE_STRNLEN_PROTO, 1, Define this if strnlen is prototyped in string.h)
|
||||
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for strndup in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strndup;]])],[AC_DEFINE(HAVE_STRNDUP_PROTO, 1, Define this if strndup is prototyped in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[char *(*foo)(const char *, size_t) = strndup;]])],[AC_DEFINE(HAVE_STRNDUP_PROTO, 1, Define this if strndup is prototyped in string.h)
|
||||
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for strcasestr in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strcasestr;]])],[AC_DEFINE(HAVE_STRCASESTR_PROTO, 1, Define this if strcasestr is prototyped in string.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[char *(*foo)(const char *, const char *) = strcasestr;]])],[AC_DEFINE(HAVE_STRCASESTR_PROTO, 1, Define this if strcasestr is prototyped in string.h)
|
||||
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
|
||||
])
|
||||
|
|
|
@ -96,7 +96,7 @@ size_t strnlen (const char *str, size_t len);
|
|||
#endif
|
||||
#ifdef HAVE_STRNDUP
|
||||
# ifndef HAVE_STRNDUP_PROTO
|
||||
size_t strndup (const char *str, size_t len);
|
||||
char *strndup (const char *str, size_t len);
|
||||
# endif
|
||||
#else
|
||||
# define strndup Q_strndup
|
||||
|
|
Loading…
Reference in a new issue