Skip to content

Commit 3055d29

Browse files
committed
newlib has aligned_alloc
1 parent 953e7b6 commit 3055d29

2 files changed

Lines changed: 29 additions & 14 deletions

File tree

libstdc++-v3/configure

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ infodir
893893
docdir
894894
oldincludedir
895895
includedir
896+
runstatedir
896897
localstatedir
897898
sharedstatedir
898899
sysconfdir
@@ -1027,6 +1028,7 @@ datadir='${datarootdir}'
10271028
sysconfdir='${prefix}/etc'
10281029
sharedstatedir='${prefix}/com'
10291030
localstatedir='${prefix}/var'
1031+
runstatedir='${localstatedir}/run'
10301032
includedir='${prefix}/include'
10311033
oldincludedir='/usr/include'
10321034
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1279,6 +1281,15 @@ do
12791281
| -silent | --silent | --silen | --sile | --sil)
12801282
silent=yes ;;
12811283

1284+
-runstatedir | --runstatedir | --runstatedi | --runstated \
1285+
| --runstate | --runstat | --runsta | --runst | --runs \
1286+
| --run | --ru | --r)
1287+
ac_prev=runstatedir ;;
1288+
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1289+
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1290+
| --run=* | --ru=* | --r=*)
1291+
runstatedir=$ac_optarg ;;
1292+
12821293
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
12831294
ac_prev=sbindir ;;
12841295
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1416,7 +1427,7 @@ fi
14161427
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
14171428
datadir sysconfdir sharedstatedir localstatedir includedir \
14181429
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1419-
libdir localedir mandir
1430+
libdir localedir mandir runstatedir
14201431
do
14211432
eval ac_val=\$$ac_var
14221433
# Remove trailing slashes.
@@ -1569,6 +1580,7 @@ Fine tuning of the installation directories:
15691580
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
15701581
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
15711582
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1583+
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
15721584
--libdir=DIR object code libraries [EPREFIX/lib]
15731585
--includedir=DIR C header files [PREFIX/include]
15741586
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -5080,7 +5092,7 @@ else
50805092
We can't simply define LARGE_OFF_T to be 9223372036854775807,
50815093
since some C++ compilers masquerading as C compilers
50825094
incorrectly reject 9223372036854775807. */
5083-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5095+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
50845096
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
50855097
&& LARGE_OFF_T % 2147483647 == 1)
50865098
? 1 : -1];
@@ -5126,7 +5138,7 @@ else
51265138
We can't simply define LARGE_OFF_T to be 9223372036854775807,
51275139
since some C++ compilers masquerading as C compilers
51285140
incorrectly reject 9223372036854775807. */
5129-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5141+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
51305142
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
51315143
&& LARGE_OFF_T % 2147483647 == 1)
51325144
? 1 : -1];
@@ -5150,7 +5162,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51505162
We can't simply define LARGE_OFF_T to be 9223372036854775807,
51515163
since some C++ compilers masquerading as C compilers
51525164
incorrectly reject 9223372036854775807. */
5153-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5165+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
51545166
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
51555167
&& LARGE_OFF_T % 2147483647 == 1)
51565168
? 1 : -1];
@@ -5195,7 +5207,7 @@ else
51955207
We can't simply define LARGE_OFF_T to be 9223372036854775807,
51965208
since some C++ compilers masquerading as C compilers
51975209
incorrectly reject 9223372036854775807. */
5198-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5210+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
51995211
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
52005212
&& LARGE_OFF_T % 2147483647 == 1)
52015213
? 1 : -1];
@@ -5219,7 +5231,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52195231
We can't simply define LARGE_OFF_T to be 9223372036854775807,
52205232
since some C++ compilers masquerading as C compilers
52215233
incorrectly reject 9223372036854775807. */
5222-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5234+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
52235235
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
52245236
&& LARGE_OFF_T % 2147483647 == 1)
52255237
? 1 : -1];
@@ -12280,7 +12292,7 @@ else
1228012292
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1228112293
lt_status=$lt_dlunknown
1228212294
cat > conftest.$ac_ext <<_LT_EOF
12283-
#line 12283 "configure"
12295+
#line 12295 "configure"
1228412296
#include "confdefs.h"
1228512297

1228612298
#if HAVE_DLFCN_H
@@ -12386,7 +12398,7 @@ else
1238612398
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1238712399
lt_status=$lt_dlunknown
1238812400
cat > conftest.$ac_ext <<_LT_EOF
12389-
#line 12389 "configure"
12401+
#line 12401 "configure"
1239012402
#include "confdefs.h"
1239112403

1239212404
#if HAVE_DLFCN_H
@@ -16182,7 +16194,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
1618216194
# Fake what AC_TRY_COMPILE does.
1618316195

1618416196
cat > conftest.$ac_ext << EOF
16185-
#line 16185 "configure"
16197+
#line 16197 "configure"
1618616198
int main()
1618716199
{
1618816200
typedef bool atomic_type;
@@ -16217,7 +16229,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
1621716229
rm -f conftest*
1621816230

1621916231
cat > conftest.$ac_ext << EOF
16220-
#line 16220 "configure"
16232+
#line 16232 "configure"
1622116233
int main()
1622216234
{
1622316235
typedef short atomic_type;
@@ -16252,7 +16264,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
1625216264
rm -f conftest*
1625316265

1625416266
cat > conftest.$ac_ext << EOF
16255-
#line 16255 "configure"
16267+
#line 16267 "configure"
1625616268
int main()
1625716269
{
1625816270
// NB: _Atomic_word not necessarily int.
@@ -16288,7 +16300,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
1628816300
rm -f conftest*
1628916301

1629016302
cat > conftest.$ac_ext << EOF
16291-
#line 16291 "configure"
16303+
#line 16303 "configure"
1629216304
int main()
1629316305
{
1629416306
typedef long long atomic_type;
@@ -16444,7 +16456,7 @@ $as_echo "mutex" >&6; }
1644416456
# unnecessary for this test.
1644516457

1644616458
cat > conftest.$ac_ext << EOF
16447-
#line 16447 "configure"
16459+
#line 16459 "configure"
1644816460
int main()
1644916461
{
1645016462
_Decimal32 d1;
@@ -16486,7 +16498,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1648616498
# unnecessary for this test.
1648716499

1648816500
cat > conftest.$ac_ext << EOF
16489-
#line 16489 "configure"
16501+
#line 16501 "configure"
1649016502
template<typename T1, typename T2>
1649116503
struct same
1649216504
{ typedef T2 type; };
@@ -28575,6 +28587,8 @@ _ACEOF
2857528587

2857628588
$as_echo "#define HAVE_MEMALIGN 1" >>confdefs.h
2857728589

28590+
$as_echo "#define HAVE_ALIGNED_ALLOC 1" >>confdefs.h
28591+
2857828592

2857928593
case "${target}" in
2858028594
*-rtems*)

libstdc++-v3/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ dnl # rather than hardcoding that information.
378378

379379
AC_DEFINE(HAVE_ICONV)
380380
AC_DEFINE(HAVE_MEMALIGN)
381+
AC_DEFINE(HAVE_ALIGNED_ALLOC)
381382

382383
case "${target}" in
383384
*-rtems*)

0 commit comments

Comments
 (0)