Mercurial > gnulib
annotate lib/stpcpy.c @ 40231:9b3c79fdfe0b
strtod: fix clash with strtold
Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
* lib/strtod.c (compute_minus_zero, minus_zero):
Simplify by remving the macro / external variable,
and having just a function. User changed. This avoids
the need for an external variable that might clash.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 11 Mar 2019 16:40:29 -0700 |
parents | b06060465f09 |
children |
rev | line source |
---|---|
1293
2bb4c9c36a9f
add descriptive first-line comment
Jim Meyering <jim@meyering.net>
parents:
1110
diff
changeset
|
1 /* stpcpy.c -- copy a string and return pointer to end of new string |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2019 Free Software |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
3 Foundation, Inc. |
1014 | 4 |
1110 | 5 NOTE: The canonical source of this file is maintained with the GNU C Library. |
6 Bugs can be reported to bug-glibc@prep.ai.mit.edu. | |
5 | 7 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7473
diff
changeset
|
8 This program is free software: you can redistribute it and/or modify it |
1110 | 9 under the terms of the GNU General Public License as published by the |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7473
diff
changeset
|
10 Free Software Foundation; either version 3 of the License, or any |
1110 | 11 later version. |
5 | 12 |
1110 | 13 This program is distributed in the hope that it will be useful, |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
5 | 17 |
1110 | 18 You should have received a copy of the GNU General Public License |
19190 | 19 along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
5 | 20 |
7304
1c4ed7637c24
Include <config.h> unconditionally.
Bruno Haible <bruno@clisp.org>
parents:
7025
diff
changeset
|
21 #include <config.h> |
1018 | 22 |
1014 | 23 #include <string.h> |
24 | |
1110 | 25 #undef __stpcpy |
7473
44fe37f21d92
Make it possible to alias stpcpy and strdup.
Bruno Haible <bruno@clisp.org>
parents:
7304
diff
changeset
|
26 #ifdef _LIBC |
44fe37f21d92
Make it possible to alias stpcpy and strdup.
Bruno Haible <bruno@clisp.org>
parents:
7304
diff
changeset
|
27 # undef stpcpy |
44fe37f21d92
Make it possible to alias stpcpy and strdup.
Bruno Haible <bruno@clisp.org>
parents:
7304
diff
changeset
|
28 #endif |
1110 | 29 |
1014 | 30 #ifndef weak_alias |
31 # define __stpcpy stpcpy | |
328 | 32 #endif |
33 | |
34 /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ | |
5 | 35 char * |
1557 | 36 __stpcpy (char *dest, const char *src) |
5 | 37 { |
1014 | 38 register char *d = dest; |
39 register const char *s = src; | |
40 | |
41 do | |
42 *d++ = *s; | |
43 while (*s++ != '\0'); | |
44 | |
45 return d - 1; | |
5 | 46 } |
1014 | 47 #ifdef weak_alias |
48 weak_alias (__stpcpy, stpcpy) | |
49 #endif |