diff options
Diffstat (limited to 'REORG.TODO/sysdeps/wordsize-64')
32 files changed, 469 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/wordsize-64/Makefile b/REORG.TODO/sysdeps/wordsize-64/Makefile new file mode 100644 index 0000000000..2fa934751f --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),misc) +tests += tst-writev +endif diff --git a/REORG.TODO/sysdeps/wordsize-64/Versions b/REORG.TODO/sysdeps/wordsize-64/Versions new file mode 100644 index 0000000000..0d13186ace --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_2.3.3 { + # These were erroneously omitted for 64-bit platforms in 2.3. + strtoll_l; strtoull_l; + } +} diff --git a/REORG.TODO/sysdeps/wordsize-64/bits/wordsize.h b/REORG.TODO/sysdeps/wordsize-64/bits/wordsize.h new file mode 100644 index 0000000000..069fb52cb9 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/bits/wordsize.h @@ -0,0 +1,19 @@ +/* Copyright (C) 1999-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 64 +#define __WORDSIZE_TIME64_COMPAT32 0 diff --git a/REORG.TODO/sysdeps/wordsize-64/fts.c b/REORG.TODO/sysdeps/wordsize-64/fts.c new file mode 100644 index 0000000000..159dc1febe --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/fts.c @@ -0,0 +1,19 @@ +#define fts64_open __rename_fts64_open +#define fts64_close __rename_fts64_close +#define fts64_read __rename_fts64_read +#define fts64_set __rename_fts64_set +#define fts64_children __rename_fts64_children + +#include "../../io/fts.c" + +#undef fts64_open +#undef fts64_close +#undef fts64_read +#undef fts64_set +#undef fts64_children + +weak_alias (fts_open, fts64_open) +weak_alias (fts_close, fts64_close) +weak_alias (fts_read, fts64_read) +weak_alias (fts_set, fts64_set) +weak_alias (fts_children, fts64_children) diff --git a/REORG.TODO/sysdeps/wordsize-64/fts64.c b/REORG.TODO/sysdeps/wordsize-64/fts64.c new file mode 100644 index 0000000000..f2848fc3e4 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/fts64.c @@ -0,0 +1 @@ +/* Defined in fts.c. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/ftw.c b/REORG.TODO/sysdeps/wordsize-64/ftw.c new file mode 100644 index 0000000000..ca19903799 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/ftw.c @@ -0,0 +1,16 @@ +#define ftw64 __rename_ftw64 +#define nftw64 __rename_nftw64 + +#include "../../io/ftw.c" + +#undef ftw64 +#undef nftw64 + +weak_alias (ftw, ftw64) +strong_alias (__new_nftw, __new_nftw64) +versioned_symbol (libc, __new_nftw64, nftw64, GLIBC_2_3_3); + +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_3_3) +strong_alias (__old_nftw, __old_nftw64) +compat_symbol (libc, __old_nftw64, nftw64, GLIBC_2_1); +#endif diff --git a/REORG.TODO/sysdeps/wordsize-64/ftw64.c b/REORG.TODO/sysdeps/wordsize-64/ftw64.c new file mode 100644 index 0000000000..1cfcaadfd1 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/ftw64.c @@ -0,0 +1 @@ +/* Defined in ftw.c. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/glob.c b/REORG.TODO/sysdeps/wordsize-64/glob.c new file mode 100644 index 0000000000..082faf1c70 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/glob.c @@ -0,0 +1,8 @@ +#define glob64 __no_glob64_decl +#define globfree64 __no_globfree64_decl +#include <posix/glob.c> +#undef glob64 +#undef globfree64 +weak_alias (glob, glob64) +weak_alias (globfree, globfree64) +libc_hidden_ver (globfree, globfree64) diff --git a/REORG.TODO/sysdeps/wordsize-64/glob64.c b/REORG.TODO/sysdeps/wordsize-64/glob64.c new file mode 100644 index 0000000000..33918ea6a5 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/glob64.c @@ -0,0 +1 @@ +/* glob64 is in glob.c */ diff --git a/REORG.TODO/sysdeps/wordsize-64/labs.c b/REORG.TODO/sysdeps/wordsize-64/labs.c new file mode 100644 index 0000000000..bcd717ee67 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/labs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 1999-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <inttypes.h> + +#include <stdlib/labs.c> + +weak_alias (labs, imaxabs) diff --git a/REORG.TODO/sysdeps/wordsize-64/ldiv.c b/REORG.TODO/sysdeps/wordsize-64/ldiv.c new file mode 100644 index 0000000000..66cef8fa29 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/ldiv.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1999-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +/* Ugly trick ahead to make the alias work. */ +#define imaxdiv __libc_imaxdiv + +#include <inttypes.h> + +#include <stdlib/ldiv.c> + +#undef imaxdiv +weak_alias (ldiv, imaxdiv) diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoimax.c b/REORG.TODO/sysdeps/wordsize-64/strtoimax.c new file mode 100644 index 0000000000..4544f6db7e --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoimax.c @@ -0,0 +1,27 @@ +/* Convert string to maximal integer. + Copyright (C) 1997-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <inttypes.h> +#include <stdlib.h> + +intmax_t +strtoimax (const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtol_internal (nptr, endptr, base, 0); +} diff --git a/REORG.TODO/sysdeps/wordsize-64/strtol.c b/REORG.TODO/sysdeps/wordsize-64/strtol.c new file mode 100644 index 0000000000..ac17bbe4c8 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtol.c @@ -0,0 +1,16 @@ +/* We have to irritate the compiler a bit. */ +#define __strtoll_internal __strtoll_internal_XXX +#define strtoll strtoll_XXX +#define strtoq strtoq_XXX + +#include <stdlib/strtol.c> + +#undef __strtoll_internal +#undef strtoll +#undef strtoq +strong_alias (__strtol_internal, __strtoll_internal) +libc_hidden_ver (__strtol_internal, __strtoll_internal) +weak_alias (strtol, strtoll) +libc_hidden_ver (strtol, strtoll) +weak_alias (strtol, strtoq) +libc_hidden_ver (strtol, strtoq) diff --git a/REORG.TODO/sysdeps/wordsize-64/strtol_l.c b/REORG.TODO/sysdeps/wordsize-64/strtol_l.c new file mode 100644 index 0000000000..b2cd102add --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtol_l.c @@ -0,0 +1,14 @@ +/* We have to irritate the compiler a bit. */ +#define ____strtoll_l_internal ____strtoll_l_internal_XXX +#define __strtoll_l __strtoll_l_XXX +#define strtoll_l strtoll_l_XXX + +#include <stdlib/strtol_l.c> + +#undef ____strtoll_l_internal +#undef __strtoll_l +#undef strtoll_l +strong_alias (____strtol_l_internal, ____strtoll_l_internal) +libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal) +weak_alias (__strtol_l, __strtoll_l) +weak_alias (__strtol_l, strtoll_l) diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoll.c b/REORG.TODO/sysdeps/wordsize-64/strtoll.c new file mode 100644 index 0000000000..c943e6af34 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoll.c @@ -0,0 +1 @@ +/* Not needed, it's the same as strtol. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoll_l.c b/REORG.TODO/sysdeps/wordsize-64/strtoll_l.c new file mode 100644 index 0000000000..5a5d0d0c6b --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoll_l.c @@ -0,0 +1 @@ +/* Not needed, it's the same as __strtol_l. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoul.c b/REORG.TODO/sysdeps/wordsize-64/strtoul.c new file mode 100644 index 0000000000..401882ce0d --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoul.c @@ -0,0 +1,14 @@ +/* We have to irritate the compiler a bit. */ +#define __strtoull_internal __strtoull_internal_XXX +#define strtoull strtoull_XXX +#define strtouq strtouq_XXX + +#include <stdlib/strtoul.c> + +#undef __strtoull_internal +#undef strtoull +#undef strtouq +strong_alias (__strtoul_internal, __strtoull_internal) +libc_hidden_ver (__strtoul_internal, __strtoull_internal) +weak_alias (strtoul, strtoull) +weak_alias (strtoul, strtouq) diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoul_l.c b/REORG.TODO/sysdeps/wordsize-64/strtoul_l.c new file mode 100644 index 0000000000..80cca332b1 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoul_l.c @@ -0,0 +1,14 @@ +/* We have to irritate the compiler a bit. */ +#define ____strtoull_l_internal ____strtoull_l_internal_XXX +#define __strtoull_l __strtoull_l_XXX +#define strtoull_l strtoull_l_XXX + +#include <stdlib/strtoul_l.c> + +#undef ____strtoull_l_internal +#undef __strtoull_l +#undef strtoull_l +strong_alias (____strtoul_l_internal, ____strtoull_l_internal) +libc_hidden_ver (____strtoul_l_internal, ____strtoull_l_internal) +weak_alias (__strtoul_l, __strtoull_l) +weak_alias (__strtoul_l, strtoull_l) diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoull.c b/REORG.TODO/sysdeps/wordsize-64/strtoull.c new file mode 100644 index 0000000000..c472bde1ec --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoull.c @@ -0,0 +1 @@ +/* Not needed, it's the same as strtoul. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoull_l.c b/REORG.TODO/sysdeps/wordsize-64/strtoull_l.c new file mode 100644 index 0000000000..c33466bb0d --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoull_l.c @@ -0,0 +1 @@ +/* Not needed, it's the same as __strtoul_l. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/strtoumax.c b/REORG.TODO/sysdeps/wordsize-64/strtoumax.c new file mode 100644 index 0000000000..c20816fda5 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/strtoumax.c @@ -0,0 +1,27 @@ +/* Convert string to maximal unsigned integer. + Copyright (C) 1997-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <inttypes.h> +#include <stdlib.h> + +uintmax_t +strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtoul_internal (nptr, endptr, base, 0); +} diff --git a/REORG.TODO/sysdeps/wordsize-64/tst-writev.c b/REORG.TODO/sysdeps/wordsize-64/tst-writev.c new file mode 100644 index 0000000000..bda2b3fe74 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/tst-writev.c @@ -0,0 +1,117 @@ +/* Copyright (C) 2011-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ryan S. Arnold <rsa@us.ibm.com>, 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <fcntl.h> +#include <limits.h> +#include <paths.h> +#include <stdio.h> +#include <stdint.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/uio.h> + + +/* The purpose of this test is to verify that the INTERNAL_[V]SYSCALL_NCS + macros on 64-bit platforms don't cast the return type to (int) which would + erroneously sign extend the return value should the high bit of the bottom + half of the word be '1'. */ + +#if 0 +/* Used to test the non power-of-2 code path. */ +#undef IOV_MAX +#define IOV_MAX 1000 +#endif + +/* writev() should report that it has written EXPECTED number of bytes. */ +#define EXPECTED ((size_t) INT32_MAX + 1) + +static int +do_test (void) +{ + struct iovec iv[IOV_MAX]; + /* POSIX doesn't guarantee that IOV_MAX is pow of 2 but we're optimistic. */ + size_t bufsz = EXPECTED / IOV_MAX; + size_t bufrem = EXPECTED % IOV_MAX; + + /* If there's a remainder then IOV_MAX probably isn't a power of 2 and we + need to make bufsz bigger so that the last iovec, iv[IOV_MAX-1], is free + for the remainder. */ + if (bufrem) + { + bufsz = bufsz + 1; + bufrem = EXPECTED - (bufsz * (IOV_MAX - 1)); + } + + /* We writev to /dev/null since we're just testing writev's return value. */ + int fd = open (_PATH_DEVNULL, O_WRONLY); + if (fd == -1) + { + printf ("Unable to open /dev/null for writing.\n"); + return -1; + } + + iv[0].iov_base = malloc (bufsz); + if (iv[0].iov_base == NULL) + { + printf ("malloc (%zu) failed.\n", bufsz); + close (fd); + return -1; + } + iv[0].iov_len = bufsz; + + /* We optimistically presume that there isn't a remainder and set all iovec + instances to the same base and len as the first instance. */ + for (int i = 1; i < IOV_MAX; i++) + { + /* We don't care what the data is so reuse the allocation from iv[0]; */ + iv[i].iov_base = iv[0].iov_base; + iv[i].iov_len = iv[0].iov_len; + } + + /* If there is a remainder then we correct the last iov_len. */ + if (bufrem) + iv[IOV_MAX - 1].iov_len = bufrem; + + /* Write junk to /dev/null with the writev syscall in order to get a return + of INT32_MAX+1 bytes to verify that the INTERNAL_SYSCALL wrappers aren't + mangling the result if the signbit of a 32-bit number is set. */ + ssize_t ret = writev (fd, iv, IOV_MAX); + + free (iv[0].iov_base); + close (fd); + + if (ret != (ssize_t) EXPECTED) + { +#ifdef ARTIFICIAL_LIMIT + if (ret != (ssize_t) ARTIFICIAL_LIMIT) +#endif + { + printf ("writev() return value: %zd != EXPECTED: %zd\n", + ret, EXPECTED); + return 1; + } + } + + return 0; +} + +/* Time enough for a large writev syscall to complete. */ +#define TIMEOUT 20 + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoimax.c b/REORG.TODO/sysdeps/wordsize-64/wcstoimax.c new file mode 100644 index 0000000000..e0b4726d47 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoimax.c @@ -0,0 +1,28 @@ +/* Convert wide-character string to maximal integer. + Copyright (C) 1997-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <inttypes.h> +#include <wchar.h> + +intmax_t +wcstoimax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, + int base) +{ + return __wcstol_internal (nptr, endptr, base, 0); +} diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstol.c b/REORG.TODO/sysdeps/wordsize-64/wcstol.c new file mode 100644 index 0000000000..b10895a82b --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstol.c @@ -0,0 +1,14 @@ +/* We have to irritate the compiler a bit. */ +#define __wcstoll_internal __wcstoll_internal_XXX +#define wcstoll wcstoll_XXX +#define wcstoq wcstoq_XXX + +#include <wcsmbs/wcstol.c> + +#undef __wcstoll_internal +#undef wcstoll +#undef wcstoq +strong_alias (__wcstol_internal, __wcstoll_internal) +libc_hidden_ver (__wcstol_internal, __wcstoll_internal) +weak_alias (wcstol, wcstoll) +weak_alias (wcstol, wcstoq) diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstol_l.c b/REORG.TODO/sysdeps/wordsize-64/wcstol_l.c new file mode 100644 index 0000000000..4f48f60c65 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstol_l.c @@ -0,0 +1,13 @@ +/* We have to irritate the compiler a bit. */ +#define ____wcstoll_l_internal ____wcstoll_l_internal_XXX +#define __wcstoll_l ___wcstoll_l_XXX +#define wcstoll_l __wcstoll_l_XX + +#include <wcsmbs/wcstol_l.c> + +#undef ____wcstoll_l_internal +#undef __wcstoll_l +#undef wcstoll_l +strong_alias (____wcstol_l_internal, ____wcstoll_l_internal) +weak_alias (__wcstol_l, __wcstoll_l) +weak_alias (__wcstol_l, wcstoll_l) diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoll.c b/REORG.TODO/sysdeps/wordsize-64/wcstoll.c new file mode 100644 index 0000000000..476ce3e28c --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoll.c @@ -0,0 +1 @@ +/* Not needed, it's the same as wcstol. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoll_l.c b/REORG.TODO/sysdeps/wordsize-64/wcstoll_l.c new file mode 100644 index 0000000000..e47f6365f5 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoll_l.c @@ -0,0 +1 @@ +/* Not needed, it's the same as wcstol_l. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoul.c b/REORG.TODO/sysdeps/wordsize-64/wcstoul.c new file mode 100644 index 0000000000..2becb80744 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoul.c @@ -0,0 +1,14 @@ +/* We have to irritate the compiler a bit. */ +#define __wcstoull_internal __wcstoull_internal_XXX +#define wcstoull wcstoull_XXX +#define wcstouq wcstouq_XXX + +#include <wcsmbs/wcstoul.c> + +#undef __wcstoull_internal +#undef wcstoull +#undef wcstouq +strong_alias (__wcstoul_internal, __wcstoull_internal) +libc_hidden_ver (__wcstoul_internal, __wcstoull_internal) +weak_alias (wcstoul, wcstoull) +weak_alias (wcstoul, wcstouq) diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoul_l.c b/REORG.TODO/sysdeps/wordsize-64/wcstoul_l.c new file mode 100644 index 0000000000..c376fa0e81 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoul_l.c @@ -0,0 +1,13 @@ +/* We have to irritate the compiler a bit. */ +#define ____wcstoull_l_internal ____wcstoull_l_internal_XXX +#define __wcstoull_l ___wcstoull_l_XXX +#define wcstoull_l __wcstoull_l_XXX + +#include <wcsmbs/wcstoul_l.c> + +#undef ____wcstoull_l_internal +#undef __wcstoull_l +#undef wcstoull_l +strong_alias (____wcstoul_l_internal, ____wcstoull_l_internal) +weak_alias (__wcstoul_l, __wcstoull_l) +weak_alias (__wcstoul_l, wcstoull_l) diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoull.c b/REORG.TODO/sysdeps/wordsize-64/wcstoull.c new file mode 100644 index 0000000000..4776c3a07d --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoull.c @@ -0,0 +1 @@ +/* Not needed, it's the same as wcstoul. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoull_l.c b/REORG.TODO/sysdeps/wordsize-64/wcstoull_l.c new file mode 100644 index 0000000000..2c9aaa0735 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoull_l.c @@ -0,0 +1 @@ +/* Not needed, it's the same as wcstoul_l. */ diff --git a/REORG.TODO/sysdeps/wordsize-64/wcstoumax.c b/REORG.TODO/sysdeps/wordsize-64/wcstoumax.c new file mode 100644 index 0000000000..514c5e14b3 --- /dev/null +++ b/REORG.TODO/sysdeps/wordsize-64/wcstoumax.c @@ -0,0 +1,28 @@ +/* Convert wide-character string to maximal unsigned integer. + Copyright (C) 1997-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <inttypes.h> +#include <wchar.h> + +uintmax_t +wcstoumax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, + int base) +{ + return __wcstoul_internal (nptr, endptr, base, 0); +} |