diff options
| author | Tom Lane | 2016-04-23 20:53:15 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-04-23 20:53:15 +0000 |
| commit | 2a715371c44399f8ec538b3c8df0590400c75678 (patch) | |
| tree | 32f466037ba81698b26f91881c085fb69b78aa5b /src/interfaces | |
| parent | b39938f01208d2860239792aa9e802a9cf8c286b (diff) | |
Rename strtoi() to strtoint().
NetBSD has seen fit to invent a libc function named strtoi(), which
conflicts with the long-established static functions of the same name in
datetime.c and ecpg's interval.c. While muttering darkly about intrusions
on application namespace, we'll rename our functions to avoid the conflict.
Back-patch to all supported branches, since this would affect attempts
to build any of them on recent NetBSD.
Thomas Munro
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/pgtypeslib/interval.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index dce8a14d88a..8c091eca9cd 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -16,7 +16,7 @@ /* copy&pasted from .../src/backend/utils/adt/datetime.c */ static int -strtoi(const char *nptr, char **endptr, int base) +strtoint(const char *nptr, char **endptr, int base) { long val; @@ -448,7 +448,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */ } errno = 0; - val = strtoi(field[i], &cp, 10); + val = strtoint(field[i], &cp, 10); if (errno == ERANGE) return DTERR_FIELD_OVERFLOW; @@ -457,7 +457,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */ /* SQL "years-months" syntax */ int val2; - val2 = strtoi(cp + 1, &cp, 10); + val2 = strtoint(cp + 1, &cp, 10); if (errno == ERANGE || val2 < 0 || val2 >= MONTHS_PER_YEAR) return DTERR_FIELD_OVERFLOW; if (*cp != '\0') |
