Mercurial > gnulib
annotate lib/iconv_close.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 |
---|---|
9341
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Character set conversion. |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. |
9341
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software; you can redistribute it and/or modify |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 2, or (at your option) |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 any later version. |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License along |
19190 | 15 with this program; if not, see <https://www.gnu.org/licenses/>. */ |
9341
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 #include <config.h> |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 /* Specification. */ |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 #include <iconv.h> |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 #include <stdint.h> |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 #ifndef uintptr_t |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 # define uintptr_t unsigned long |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 #endif |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 int |
9349
0c6048a8aaed
Use rpl_ prefix for functions, so as to avoid endless recursions in weird cases.
Bruno Haible <bruno@clisp.org>
parents:
9341
diff
changeset
|
28 rpl_iconv_close (iconv_t cd) |
9341
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 #undef iconv_close |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 { |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 #if REPLACE_ICONV_UTF |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 switch ((uintptr_t) cd) |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 { |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 case (uintptr_t) _ICONV_UTF8_UTF16BE: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 case (uintptr_t) _ICONV_UTF8_UTF16LE: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 case (uintptr_t) _ICONV_UTF8_UTF32BE: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 case (uintptr_t) _ICONV_UTF8_UTF32LE: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 case (uintptr_t) _ICONV_UTF16BE_UTF8: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 case (uintptr_t) _ICONV_UTF16LE_UTF8: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 case (uintptr_t) _ICONV_UTF32BE_UTF8: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 case (uintptr_t) _ICONV_UTF32LE_UTF8: |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 return 0; |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 } |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 #endif |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 return iconv_close (cd); |
212d6f041290
New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 } |