[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_ope
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper |
Date: |
Wed, 3 Mar 2021 12:29:57 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36 |
Follow-up Comment #1, bug #60162 (project octave):
The issue is that iconv-wrappers.c #includes "iconv.h" while iconv-wrappers.h
does not.
In iconv-wrappers.c, because it has included the iconv.h header file it can
make use of the iconv_t definition which is a typedef. On Linux systems, the
definition in /usr/include/iconv.h is
typedef void *iconv_t;
which is a pointer to void.
Hence, in iconv-wrapers.h it is okay to directly write
void *
where one wants iconv_t.
Apparently Solaris defines iconv_t to a different value.
I'm adding jwe to the CC list as he knows more about why these wrappers are
written the way they are.
Possible solution #1
Add '#include "iconv.h"' to the file iconv-wrapper.h and then use iconv_t to
define functions.
This seems cleanest, but maybe there is a reason not to expose system header
files? On the other hand, several of the header files in the
liboctave/wrappers directory use '#include <sys/types.h>'.
Possible solution #2
Use #ifdef based on OS (Solaris vs. NOT Solaris) in iconv-wrapper.h to choose
between using a pointer to void or the data type used on Solaris for iconv_t.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60162>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Michele, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper,
Rik <=
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Rik, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Markus Mützel, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Rik, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Markus Mützel, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, John W. Eaton, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Rik, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Michele, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Michele, 2021/03/03
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Markus Mützel, 2021/03/04
- [Octave-bug-tracker] [bug #60162] Conflicting types for octave_iconv_open_wrapper and octave_iconv_close_wrapper, Markus Mützel, 2021/03/04