mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
libast/comp/conf.sh: apply limits detection fixes for Linux
This is another patch from OpenSUSE: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-limits.dif
This commit is contained in:
parent
fa3a3d7955
commit
7a6980a380
1 changed files with 32 additions and 4 deletions
|
@ -144,7 +144,7 @@ main()
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
#else
|
||||||
_ast_intmax_t s = 0x7fffffffffffffffLL;
|
_ast_intmax_t s = 0x7fffffffffffffffLL;
|
||||||
unsigned _ast_intmax_t u = 0xffffffffffffffffLL;
|
unsigned _ast_intmax_t u = 0xffffffffffffffffULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -817,7 +817,11 @@ defined() # list-file
|
||||||
cat <<!
|
cat <<!
|
||||||
${head}
|
${head}
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
#undef conf
|
#undef conf
|
||||||
|
@ -845,7 +849,11 @@ unsigned int conf[] = {
|
||||||
cat <<!
|
cat <<!
|
||||||
${head}
|
${head}
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
#undef conf
|
#undef conf
|
||||||
|
@ -886,7 +894,11 @@ done
|
||||||
cat <<!
|
cat <<!
|
||||||
${head}
|
${head}
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
#undef conf
|
#undef conf
|
||||||
|
@ -1064,7 +1076,7 @@ do eval name=\"'$'CONF_name_$key\"
|
||||||
case $flags in
|
case $flags in
|
||||||
*[Ll]*) d=
|
*[Ll]*) d=
|
||||||
case ${conf_name} in
|
case ${conf_name} in
|
||||||
LONG_MAX|SSIZE_MAX)
|
LONG_MAX|UINT_MAX|INT_MAX|SHRT_MAX|SSIZE_MAX|WORD_BIT|LONG_BIT|PTHREAD_*)
|
||||||
x=
|
x=
|
||||||
;;
|
;;
|
||||||
*) eval x='$'CONF_const_${conf_name}
|
*) eval x='$'CONF_const_${conf_name}
|
||||||
|
@ -1124,7 +1136,11 @@ do eval name=\"'$'CONF_name_$key\"
|
||||||
${head}
|
${head}
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
int
|
int
|
||||||
|
@ -1139,7 +1155,11 @@ main()
|
||||||
${head}
|
${head}
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
${script}
|
${script}
|
||||||
|
@ -1286,7 +1306,11 @@ printf("#endif\n");
|
||||||
*) cat > $tmp.c <<!
|
*) cat > $tmp.c <<!
|
||||||
${head}
|
${head}
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
${script}
|
${script}
|
||||||
|
@ -1365,7 +1389,7 @@ ${script}
|
||||||
*[lLuU])
|
*[lLuU])
|
||||||
case $LL_suffix in
|
case $LL_suffix in
|
||||||
??) case $conf_limit in
|
??) case $conf_limit in
|
||||||
*[!lL][lL]|*[!lL][lL][uU])
|
*[0-9a-fA-F][lL]|*[0-9a-fA-F][uU][lL])
|
||||||
conf_limit=${conf_limit}L
|
conf_limit=${conf_limit}L
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1400,7 +1424,7 @@ ${script}
|
||||||
*[lLuU])
|
*[lLuU])
|
||||||
case $LL_suffix in
|
case $LL_suffix in
|
||||||
??) case $conf_minmax in
|
??) case $conf_minmax in
|
||||||
*[!lL][lL]|*[!lL][lL][uU])
|
*[0-9a-fA-F][lL]|*[0-9a-fA-F][uU][lL])
|
||||||
conf_minmax=${conf_minmax}L
|
conf_minmax=${conf_minmax}L
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1577,7 +1601,11 @@ esac
|
||||||
cat <<!
|
cat <<!
|
||||||
${head}
|
${head}
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>$systeminfo$headers
|
#include <unistd.h>$systeminfo$headers
|
||||||
${tail}
|
${tail}
|
||||||
#include "${base}.h"
|
#include "${base}.h"
|
||||||
|
|
Loading…
Reference in a new issue