diff --git a/BUGS b/BUGS index 58f949d01d..85fd19d81d 100644 --- a/BUGS +++ b/BUGS @@ -1,7 +1,7 @@ List of known bugs (certainly very incomplete) ---------------------------------------------- -Time-stamp: <00/07/14 11:39:22 aj> +Time-stamp: <2000-11-08T09:14:07 drepper> This following list contains those bugs which I'm aware of. Please make sure that bugs you report are not listed here. If you can fix one @@ -77,6 +77,11 @@ Severity: [ *] to [***] on top of the generic specification can be made without duplication of the whole LC_COLLATE description. +[ *] Some of the functions which also handled IPv6 are currently broken. + This includes getaddrinfo() and getnameinfo(). IPv4 handling of + these functions is OK though and there are patches available to fix + the IPv6 code as well. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ulrich Drepper drepper@cygnus.com diff --git a/ChangeLog b/ChangeLog index ec6aa702b8..e49ccb2250 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,34 @@ 2000-11-08 Ulrich Drepper + * catgets/gencat.c (main): Don't use exit() to avoid warnings with + broken compilers. + + * include/features.h (__STDC_ISO_10646__): Correct value to be + 200009L. Patch by Markus Kuhn . + +2000-11-08 H.J. Lu + + * pwd/Versions (GLIBC_2.1.2): Add getpwnam_r. + +2000-11-08 Jakub Jelinek + + * string/bits/string2.h: Check if _USE_STRING_ARCH_ macros are + defined, not _HAVE_STRING_ARCH_. + * sysdeps/i386/bits/string.h (_USE_STRING_ARCH_memset, + _USE_STRING_ARCH_strchr): Define. + * sysdeps/i386/i486/bits/string.h (_USE_STRING_ARCH_memset, + _USE_STRING_ARCH_strchr): Define. + * sysdeps/sparc/bits/string.h: New file. + +2000-11-08 Bruno Haible + + * locale/C-translit.h.in: Tweak result. + * locale/C-translit.h: Regenerated. + +2000-11-08 Ulrich Drepper + + * posix/unistd.h: Add attribute((const)) to sysconf prototype. + * iconvdata/euc-kr.c (euckr_from_ucs4): Map 0x20a9 to \xa3dc. (BODY from direction): Remove special handling of \x5c. * iconvdata/EUC-KR.irreversible: Adjust for this change. diff --git a/FAQ.in b/FAQ.in index 80a52212e9..2a87a6daca 100644 --- a/FAQ.in +++ b/FAQ.in @@ -150,19 +150,19 @@ Binutils 2.9.1.0.16 or later is also required. * lots of disk space (~400MB for i?86-linux; more for RISC platforms). * plenty of time. Compiling just the shared and static libraries for - i?86-linux takes approximately 1h on an AMD-K6@225MHz w/ 96MB of RAM, - 45mins on a Celeron@400MHz w/ 128MB, and 55mins on a Alpha@533MHz w/ 256MB. - Multiply this by 1.5 or 2.0 if you build profiling and/or the highly - optimized version as well. For Hurd systems times are much higher. + 35mins on a 2xPIII@550Mhz w/ 512MB RAM. On a 2xUltraSPARC-II@360Mhz + w/ 1GB RAM it takes about 14 minutes. Multiply this by 1.5 or 2.0 + if you build profiling and/or the highly optimized version as well. + For Hurd systems times are much higher. You should avoid compiling in a NFS mounted filesystem. This is very slow. - James Troup reports a compile time of - 45h34m for a full build (shared, static, and profiled) on Atari - Falcon (Motorola 68030 @ 16 Mhz, 14 Mb memory) and Jan Barte - reports 22h48m on Atari TT030 - (Motorola 68030 @ 32 Mhz, 34 Mb memory) + James Troup reports a compile time for + an earlier (and smaller!) version of glibc of 45h34m for a full build + (shared, static, and profiled) on Atari Falcon (Motorola 68030 @ 16 Mhz, + 14 Mb memory) and Jan Barte reports + 22h48m on Atari TT030 (Motorola 68030 @ 32 Mhz, 34 Mb memory) A full build of the PowerPC library took 1h on a PowerPC 750@400Mhz w/ 64MB of RAM, and about 9h on a 601@60Mhz w/ 72Mb. diff --git a/catgets/gencat.c b/catgets/gencat.c index e8bf368eea..de6bdf65d8 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -188,7 +188,7 @@ main (int argc, char *argv[]) if (result != NULL) write_out (result, output_name, header_name); - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/include/features.h b/include/features.h index dc30b13fe3..b24528e596 100644 --- a/include/features.h +++ b/include/features.h @@ -243,8 +243,8 @@ #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 -/* wchar_t uses ISO 10646-1:2000 / Unicode 3.0 */ -#define __STDC_ISO_10646__ 200010L +/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.0. */ +#define __STDC_ISO_10646__ 200009L /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 5bfee849b5..685f8ef04f 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,10 @@ +2000-11-08 Bruce Mitchener + + * linuxthreads.texi: Add documentation for pthreads attributes + guardsize, stackaddr, stacksize, and stack. Fix typo in previous + patch. Document pthread_[sg]etconcurrency(). Mark + pthread_mutexattr_[sg]ettype() as POSIX rather than GNU. + 2000-11-07 Ulrich Drepper * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING): @@ -19,7 +26,7 @@ 2000-10-29 Ulrich Drepper * attr.c (__pthread_attr_setguardsize): Don't round guardsize - here. Reported by Bruce . + here. Reported by Bruce Mitchener . * linuxthreads.texi: Changes terminology to 'type' from 'kind' when discussing mutexes. (As per the Unix98 name for the API.) @@ -30,7 +37,7 @@ PTHREAD_MUTEXATTR_ADAPTIVE_NP. Begins to introduce discussion of the ``timed'' mutex type. This discussion is currently incomplete. - Patch by Bruce . + Patch by Bruce Mitchener . 2000-10-26 Kazumoto Kojima Yutaka Niibe diff --git a/linuxthreads/linuxthreads.texi b/linuxthreads/linuxthreads.texi index a3096b0c1f..1f2d1a2fac 100644 --- a/linuxthreads/linuxthreads.texi +++ b/linuxthreads/linuxthreads.texi @@ -181,10 +181,15 @@ left in an undefined state, and you must not use it again in a call to any pthreads function until it has been reinitialized. @end deftypefun +@findex pthread_attr_setdetachstate +@findex pthread_attr_setguardsize @findex pthread_attr_setinheritsched @findex pthread_attr_setschedparam @findex pthread_attr_setschedpolicy @findex pthread_attr_setscope +@findex pthread_attr_setstack +@findex pthread_attr_setstackaddr +@findex pthread_attr_setstacksize @comment pthread.h @comment POSIX @deftypefun int pthread_attr_setattr (pthread_attr_t *@var{obj}, int @var{value}) @@ -198,10 +203,15 @@ for the @var{attr} being modified, they will return the error code below. @end deftypefun +@findex pthread_attr_getdetachstate +@findex pthread_attr_getguardsize @findex pthread_attr_getinheritsched @findex pthread_attr_getschedparam @findex pthread_attr_getschedpolicy @findex pthread_attr_getscope +@findex pthread_attr_getstack +@findex pthread_attr_getstackaddr +@findex pthread_attr_getstacksize @comment pthread.h @comment POSIX @deftypefun int pthread_attr_getattr (const pthread_attr_t *@var{obj}, int *@var{value}) @@ -279,8 +289,45 @@ interpreted relative to the priorities of the other threads of the process, regardless of the priorities of other processes. @code{PTHREAD_SCOPE_PROCESS} is not supported in LinuxThreads. If you -try to set the scope to this value @code{pthread_attr_setscope} will +try to set the scope to this value, @code{pthread_attr_setscope} will fail and return @code{ENOTSUP}. + +@item stackaddr +Provide an address for an application managed stack. The size of the +stack must be at least @code{PTHREAD_STACK_MIN}. + +@item stacksize +Change the size of the stack created for the thread. The value defines +the minimum stack size, in bytes. + +If the value exceeds the system's maximum stack size, or is smaller +than @code{PTHREAD_STACK_MIN}, @code{pthread_attr_setstacksize} will +fail and return @code{EINVAL}. + +@item stack +Provide both the address and size of an application managed stack to +use for the new thread. The base of the memory area is @var{stackaddr} +with the size of the memory area, @var{stacksize}, measured in bytes. + +If the value of @var{stacksize} is less than @code{PTHREAD_STACK_MIN}, +or greater than the system's maximum stack size, or if the value of +@var{stackaddr} lacks the proper alignment, @code{pthread_attr_setstack} +will fail and return @code{EINVAL}. + +@item guardsize +Change the minimum size in bytes of the guard area for the thread's +stack. The default size is a single page. If this value is set, it +will be rounded up to the nearest page size. If the value is set to 0, +a guard area will not be created for this thread. The space allocated +for the guard area is used to catch stack overflow. Therefore, when +allocating large structures on the stack, a larger guard area may be +required to catch a stack overflow. + +If the caller is managing their own stacks (if the @code{stackaddr} +attribute has been set), then the @code{guardsize} attribute is ignored. + +If the value exceeds the @code{stacksize}, @code{pthread_atrr_setguardsize} +will fail and return @code{EINVAL}. @end table @node Cancellation @@ -722,9 +769,9 @@ The default mutex type is ``timed'', that is, @code{PTHREAD_MUTEX_TIMED_NP}. @c This doesn't describe how a ``timed'' mutex behaves. FIXME @comment pthread.h -@comment GNU +@comment POSIX @deftypefun int pthread_mutexattr_settype (pthread_mutexattr_t *@var{attr}, int @var{type}) -@code{pthread_mutexattr_settyp3} sets the mutex type attribute in +@code{pthread_mutexattr_settype} sets the mutex type attribute in @var{attr} to the value specified by @var{type}. If @var{type} is not @code{PTHREAD_MUTEX_ADAPTIVE_NP}, @@ -739,7 +786,7 @@ and @code{PTHREAD_MUTEX_ERRORCHECK} are also permitted. @end deftypefun @comment pthread.h -@comment GNU +@comment POSIX @deftypefun int pthread_mutexattr_gettype (const pthread_mutexattr_t *@var{attr}, int *@var{type}) @code{pthread_mutexattr_gettype} retrieves the current value of the mutex type attribute in @var{attr} and stores it in the location pointed @@ -1561,3 +1608,23 @@ The @var{target_thread} is invalid or has already terminated. @end table @end deftypefun + +@comment pthread.h +@comment POSIX +@deftypefun int pthread_setconcurrency (int @var{level}) +@code{pthread_setconcurrency} is unused in LinuxThreads due to the lack +of a mapping of user threads to kernel threads. It exists for source +compatibility. It does store the value @var{level} so that it can be +returned by a subsequent call to @code{pthread_getconcurrency}. It takes +no other action however. +@end deftypefun + +@comment pthread.h +@comment POSIX +@deftypefun int pthread_getconcurrency () +@code{pthread_getconcurrency} is unused in LinuxThreads due to the lack +of a mapping of user threads to kernel threads. It exists for source +compatibility. However, it will return the value that was set by the +last call to @code{pthread_setconcurrency}. +@end deftypefun + diff --git a/locale/C-translit.h b/locale/C-translit.h index 04600ebb56..c0df6762b3 100644 --- a/locale/C-translit.h +++ b/locale/C-translit.h @@ -160,43 +160,43 @@ static const uint32_t translit_to_idx[] = 55, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, - 180, 183, 186, 189, 192, 195, 198, 201, 204, 207, 210, 213, - 216, 220, 223, 226, 229, 232, 236, 241, 244, 247, 251, 256, - 259, 262, 266, 270, 274, 278, 283, 288, 293, 296, 301, 306, - 309, 312, 315, 318, 321, 324, 327, 330, 333, 336, 340, 343, - 346, 349, 352, 355, 360, 366, 369, 374, 377, 380, 383, 386, - 389, 392, 395, 398, 401, 404, 411, 418, 425, 432, 439, 446, - 453, 460, 467, 474, 481, 488, 493, 496, 500, 505, 509, 512, - 516, 521, 527, 531, 534, 538, 543, 546, 549, 552, 555, 558, - 562, 567, 571, 574, 578, 583, 589, 593, 596, 600, 605, 608, - 611, 614, 617, 621, 625, 630, 634, 638, 643, 646, 649, 652, - 655, 658, 661, 664, 668, 672, 676, 680, 685, 690, 695, 700, - 705, 710, 715, 720, 725, 730, 734, 738, 742, 746, 750, 754, - 758, 762, 767, 772, 777, 782, 787, 792, 797, 802, 807, 811, - 816, 821, 825, 829, 833, 837, 841, 846, 849, 853, 858, 863, - 868, 873, 878, 883, 888, 893, 898, 904, 910, 916, 922, 928, - 934, 940, 946, 952, 958, 964, 969, 974, 979, 984, 989, 994, - 999, 1004, 1009, 1015, 1021, 1027, 1033, 1039, 1045, 1051, 1057, 1063, - 1069, 1075, 1079, 1083, 1087, 1091, 1095, 1099, 1103, 1107, 1111, 1116, - 1121, 1126, 1131, 1136, 1141, 1146, 1151, 1156, 1161, 1166, 1171, 1176, - 1181, 1186, 1191, 1196, 1201, 1206, 1211, 1216, 1221, 1226, 1231, 1236, - 1241, 1246, 1251, 1256, 1261, 1266, 1271, 1276, 1281, 1286, 1291, 1296, - 1301, 1306, 1311, 1316, 1321, 1326, 1331, 1336, 1341, 1346, 1351, 1356, - 1361, 1366, 1371, 1376, 1381, 1386, 1391, 1396, 1401, 1406, 1411, 1416, - 1421, 1426, 1431, 1436, 1441, 1446, 1451, 1456, 1461, 1466, 1471, 1476, - 1481, 1486, 1491, 1496, 1501, 1506, 1511, 1516, 1521, 1526, 1531, 1536, - 1541, 1546, 1551, 1556, 1561, 1564, 1567, 1570, 1573, 1576, 1579, 1582, - 1585, 1588, 1591, 1594, 1597, 1600, 1604, 1608, 1612, 1617, 1622, 1626, - 1629, 1632, 1635, 1638, 1641, 1644, 1647, 1650, 1653, 1656, 1659, 1662, - 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 1689, 1692, 1695, 1698, - 1701, 1704, 1706, 1709, 1712, 1715, 1718, 1721, 1724, 1727, 1730, 1733, - 1736, 1739, 1742, 1745, 1748, 1751, 1754, 1757, 1760, 1763, 1766, 1769, - 1772, 1775, 1778, 1781, 1784, 1787, 1790, 1793, 1796, 1799, 1802, 1805, - 1808, 1811, 1814, 1817, 1820, 1823, 1826, 1829, 1832, 1835, 1838, 1841, - 1844, 1847, 1850, 1853, 1856, 1859, 1862, 1865, 1868, 1871, 1874, 1877, - 1880, 1883, 1886, 1889, 1892, 1895, 1898, 1901, 1904, 1907, 1910, 1913, - 1916, 1919, 1922, 1925, 1928, 1931, 1934, 1937, 1940, 1943, 1946, 1949, - 1952, 1955, 1958, 1961, 1964, 1967, 1970, 1973, 1976, 1979, 1982, 1985 + 180, 183, 186, 189, 192, 196, 199, 202, 205, 208, 211, 214, + 217, 221, 224, 227, 230, 233, 237, 242, 245, 248, 252, 257, + 260, 263, 267, 271, 275, 279, 284, 289, 294, 297, 302, 307, + 310, 313, 316, 319, 322, 325, 328, 331, 334, 337, 341, 344, + 347, 350, 353, 356, 361, 367, 370, 375, 378, 381, 384, 387, + 390, 393, 396, 399, 402, 405, 412, 419, 426, 433, 440, 447, + 454, 461, 468, 475, 482, 489, 494, 497, 501, 506, 510, 513, + 517, 522, 528, 532, 535, 539, 544, 547, 550, 553, 556, 559, + 563, 568, 572, 575, 579, 584, 590, 594, 597, 601, 606, 609, + 612, 615, 618, 622, 626, 631, 635, 639, 644, 647, 650, 653, + 656, 659, 662, 665, 669, 673, 677, 681, 686, 691, 696, 701, + 706, 711, 716, 721, 726, 731, 735, 739, 743, 747, 751, 755, + 759, 763, 768, 773, 778, 783, 788, 793, 798, 803, 808, 812, + 817, 822, 826, 830, 834, 838, 842, 847, 850, 854, 859, 864, + 869, 874, 879, 884, 889, 894, 899, 905, 911, 917, 923, 929, + 935, 941, 947, 953, 959, 965, 970, 975, 980, 985, 990, 995, + 1000, 1005, 1010, 1016, 1022, 1028, 1034, 1040, 1046, 1052, 1058, 1064, + 1070, 1076, 1080, 1084, 1088, 1092, 1096, 1100, 1104, 1108, 1112, 1117, + 1122, 1127, 1132, 1137, 1142, 1147, 1152, 1157, 1162, 1167, 1172, 1177, + 1182, 1187, 1192, 1197, 1202, 1207, 1212, 1217, 1222, 1227, 1232, 1237, + 1242, 1247, 1252, 1257, 1262, 1267, 1272, 1277, 1282, 1287, 1292, 1297, + 1302, 1307, 1312, 1317, 1322, 1327, 1332, 1337, 1342, 1347, 1352, 1357, + 1362, 1367, 1372, 1377, 1382, 1387, 1392, 1397, 1402, 1407, 1412, 1417, + 1422, 1427, 1432, 1437, 1442, 1447, 1452, 1457, 1462, 1467, 1472, 1477, + 1482, 1487, 1492, 1497, 1502, 1507, 1512, 1517, 1522, 1527, 1532, 1537, + 1542, 1547, 1552, 1557, 1562, 1565, 1568, 1571, 1574, 1577, 1580, 1583, + 1586, 1589, 1592, 1595, 1598, 1601, 1605, 1609, 1613, 1618, 1623, 1627, + 1630, 1633, 1636, 1639, 1642, 1645, 1648, 1651, 1654, 1657, 1660, 1663, + 1666, 1669, 1672, 1675, 1678, 1681, 1684, 1687, 1690, 1693, 1696, 1699, + 1702, 1705, 1707, 1710, 1713, 1716, 1719, 1722, 1725, 1728, 1731, 1734, + 1737, 1740, 1743, 1746, 1749, 1752, 1755, 1758, 1761, 1764, 1767, 1770, + 1773, 1776, 1779, 1782, 1785, 1788, 1791, 1794, 1797, 1800, 1803, 1806, + 1809, 1812, 1815, 1818, 1821, 1824, 1827, 1830, 1833, 1836, 1839, 1842, + 1845, 1848, 1851, 1854, 1857, 1860, 1863, 1866, 1869, 1872, 1875, 1878, + 1881, 1884, 1887, 1890, 1893, 1896, 1899, 1902, 1905, 1908, 1911, 1914, + 1917, 1920, 1923, 1926, 1929, 1932, 1935, 1938, 1941, 1944, 1947, 1950, + 1953, 1956, 1959, 1962, 1965, 1968, 1971, 1974, 1977, 1980, 1983, 1986 }; static const wchar_t translit_to_tbl[] = L" \0" L"\0" L"(C)\0" L"\0" L"<<\0" L"\0" L"-\0" L"\0" L"(R)\0" L"\0" L"u\0" @@ -208,7 +208,7 @@ static const wchar_t translit_to_tbl[] = L"dz\0" L"\0" L"'\0" L"\0" L"^\0" L"\0" L"'\0" L"\0" L"`\0" L"\0" L"_\0" L"\0" L":\0" L"\0" L"~\0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L" \0" L"\0" L"\0" L"\0" - L"-\0" L"\0" L"-\0" L"\0" L"-\0" L"\0" L"-\0" L"\0" L"-\0" L"\0" L"-\0" + L"-\0" L"\0" L"-\0" L"\0" L"-\0" L"\0" L"-\0" L"\0" L"--\0" L"\0" L"-\0" L"\0" L"'\0" L"\0" L"'\0" L"\0" L",\0" L"\0" L"'\0" L"\0" L"\"\0" L"\0" L"\"\0" L"\0" L",,\0" L"\0" L"\"\0" L"\0" L"+\0" L"\0" L"o\0" L"\0" L".\0" L"\0" L"..\0" L"\0" L"...\0" L"\0" L" \0" L"\0" L"`\0" L"\0" L"``\0" L"\0" diff --git a/locale/C-translit.h.in b/locale/C-translit.h.in index 986d5ed1d7..ea12583818 100644 --- a/locale/C-translit.h.in +++ b/locale/C-translit.h.in @@ -72,7 +72,7 @@ "\x2011" "-" /* NON-BREAKING HYPHEN */ "\x2012" "-" /* FIGURE DASH */ "\x2013" "-" /* EN DASH */ -"\x2014" "-" /* EM DASH */ +"\x2014" "--" /* EM DASH */ "\x2015" "-" /* HORIZONTAL BAR */ "\x2018" "'" /* LEFT SINGLE QUOTATION MARK */ "\x2019" "'" /* RIGHT SINGLE QUOTATION MARK */ diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 69f349c3db..55c14f0bd3 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2000-11-08 Bruno Haible + + * locales/translit_neutral: Tweak , , . + Reported by Markus Kuhn. + 2000-11-08 Ulrich Drepper * charmaps/EUC-KR: Revert last change. Backslash maps to backslash. diff --git a/localedata/locales/translit_neutral b/localedata/locales/translit_neutral index b7edce069a..4b181b5e95 100644 --- a/localedata/locales/translit_neutral +++ b/localedata/locales/translit_neutral @@ -75,7 +75,7 @@ include "translit_wide";"" % EN DASH % EM DASH - + "" % HORIZONTAL BAR % LEFT SINGLE QUOTATION MARK @@ -137,7 +137,7 @@ include "translit_wide";"" % RIGHTWARDS DOUBLE ARROW "" % MINUS SIGN - + ; % DIVISION SLASH % SET MINUS @@ -145,7 +145,7 @@ include "translit_wide";"" % ASTERISK OPERATOR % BULLET OPERATOR - + ; % DIVIDES % RATIO diff --git a/posix/unistd.h b/posix/unistd.h index 6aa05d6b03..8669c7b61b 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -506,7 +506,7 @@ extern long int pathconf (__const char *__path, int __name) __THROW; extern long int fpathconf (int __fd, int __name) __THROW; /* Get the value of the system variable NAME. */ -extern long int sysconf (int __name) __THROW; +extern long int sysconf (int __name) __THROW __attribute__ ((__const__)); #ifdef __USE_POSIX2 /* Get the value of the string-valued system variable NAME. */ diff --git a/pwd/Versions b/pwd/Versions index 091fa86443..b56970019a 100644 --- a/pwd/Versions +++ b/pwd/Versions @@ -14,6 +14,6 @@ libc { } GLIBC_2.1.2 { # g* - getpwent_r; getpwuid_r; + getpwent_r; getpwuid_r; getpwnam_r; } } diff --git a/string/bits/string2.h b/string/bits/string2.h index a85add72b1..2cff87be12 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -698,7 +698,7 @@ __stpcpy_small (char *__dest, /* Copy no more than N characters of SRC to DEST. */ #ifndef _HAVE_STRING_ARCH_strncpy -# if defined _HAVE_STRING_ARCH_memset && defined _HAVE_STRING_ARCH_mempcpy +# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy # define strncpy(dest, src, n) \ (__extension__ ({ char *__dest = (dest); \ __builtin_constant_p (src) && __builtin_constant_p (n) \ @@ -721,7 +721,7 @@ __stpcpy_small (char *__dest, /* Append no more than N characters from SRC onto DEST. */ #ifndef _HAVE_STRING_ARCH_strncat -# ifdef _HAVE_STRING_ARCH_strchr +# ifdef _USE_STRING_ARCH_strchr # define strncat(dest, src, n) \ (__extension__ ({ char *__dest = (dest); \ __builtin_constant_p (src) && __builtin_constant_p (n) \ diff --git a/sysdeps/i386/bits/string.h b/sysdeps/i386/bits/string.h index eac8a36a22..1727261c7f 100644 --- a/sysdeps/i386/bits/string.h +++ b/sysdeps/i386/bits/string.h @@ -176,6 +176,7 @@ memmove (void *__dest, __const void *__src, size_t __n) /* Set N bytes of S to C. */ #define _HAVE_STRING_ARCH_memset 1 +#define _USE_STRING_ARCH_memset 1 #define memset(s, c, n) \ (__extension__ (__builtin_constant_p (c) \ ? (__builtin_constant_p (n) \ @@ -513,6 +514,7 @@ strncmp (__const char *__s1, __const char *__s2, size_t __n) /* Find the first occurrence of C in S. */ #define _HAVE_STRING_ARCH_strchr 1 +#define _USE_STRING_ARCH_strchr 1 #define strchr(s, c) \ (__extension__ (__builtin_constant_p (c) \ ? __strchr_c (s, ((c) & 0xff) << 8) \ diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h index 16e31bdd03..532dcc103c 100644 --- a/sysdeps/i386/i486/bits/string.h +++ b/sysdeps/i386/i486/bits/string.h @@ -192,6 +192,7 @@ memcmp (__const void *__s1, __const void *__s2, size_t __n) /* Set N bytes of S to C. */ #define _HAVE_STRING_ARCH_memset 1 +#define _USE_STRING_ARCH_memset 1 #define memset(s, c, n) \ (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ ? ((n) == 1 \ @@ -1188,6 +1189,7 @@ __strncmp_g (__const char *__s1, __const char *__s2, size_t __n) /* Find the first occurrence of C in S. */ #define _HAVE_STRING_ARCH_strchr 1 +#define _USE_STRING_ARCH_strchr 1 #define strchr(s, c) \ (__extension__ (__builtin_constant_p (c) \ ? ((c) == '\0' \ diff --git a/sysdeps/sparc/bits/string.h b/sysdeps/sparc/bits/string.h new file mode 100644 index 0000000000..a4c5ff10e2 --- /dev/null +++ b/sysdeps/sparc/bits/string.h @@ -0,0 +1,26 @@ +/* Optimized, inlined string functions. SPARC version. + Copyright (C) 2000 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* sparc32 and sparc64 strchr(x, '\0') perform better than + __rawmemchr(x, '\0'). */ +#define _HAVE_STRING_ARCH_strchr 1