Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
- specific vc15
- fix bad cast
- partially revert patched files
  • Loading branch information
weltling committed Mar 13, 2017
1 parent c9735bc commit 887dc1c
Show file tree
Hide file tree
Showing 10 changed files with 537 additions and 494 deletions.
2 changes: 2 additions & 0 deletions source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@


/* Define to a type if <wchar.h> does not define. */
#if _MSC_VER < 1910
#define mbstate_t int
#endif

/* Define to a replacement function name for realpath(). */
#define realpath rpl_realpath
Expand Down
33 changes: 33 additions & 0 deletions source/include/iconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,39 @@ extern LIBICONV_DLL_EXPORTED int iconv_close (iconv_t cd);

/* Nonstandard extensions. */

#if USE_MBSTATE_T
#if BROKEN_WCHAR_H
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if USE_MBSTATE_T
mbstate_t dummy2;
#endif
} iconv_allocation_t;

/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
encoding ‘tocode’ into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);

/* Control of attributes. */
#define iconvctl libiconvctl
extern LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument);
Expand Down
706 changes: 357 additions & 349 deletions source/lib/aliases.h

Large diffs are not rendered by default.

222 changes: 111 additions & 111 deletions source/lib/canonical.h
Original file line number Diff line number Diff line change
@@ -1,111 +1,111 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str258,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str285,
(int)(long)&((struct stringpool_t *)0)->stringpool_str222,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str361,
(int)(long)&((struct stringpool_t *)0)->stringpool_str567,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str512,
(int)(long)&((struct stringpool_t *)0)->stringpool_str690,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str689,
(int)(long)&((struct stringpool_t *)0)->stringpool_str320,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str732,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str811,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str236,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str580,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str248,
(int)(long)&((struct stringpool_t *)0)->stringpool_str749,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str702,
(int)(long)&((struct stringpool_t *)0)->stringpool_str796,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str446,
(int)(long)&((struct stringpool_t *)0)->stringpool_str312,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str121,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str206,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str536,
(int)(long)&((struct stringpool_t *)0)->stringpool_str651,
(int)(long)&((struct stringpool_t *)0)->stringpool_str683,
(int)(long)&((struct stringpool_t *)0)->stringpool_str613,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str344,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str548,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str661,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str634,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str443,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str78,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str710,
(int)(long)&((struct stringpool_t *)0)->stringpool_str692,
(int)(long)&((struct stringpool_t *)0)->stringpool_str700,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str869,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str392,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str389,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str258,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str436,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str285,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str222,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str418,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str267,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str361,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str567,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str416,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str512,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str690,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str539,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str689,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str320,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str750,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str302,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str732,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str64,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str811,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str134,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str186,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str324,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str150,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str154,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str130,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str466,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str166,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str170,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str322,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str142,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str332,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str158,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str162,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str138,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str236,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str574,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str580,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str268,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str88,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str140,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str278,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str104,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str108,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str84,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str420,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str120,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str250,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str110,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str54,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str147,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str476,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str463,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str442,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str562,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str813,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str248,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str749,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str591,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str702,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str796,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str680,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str430,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str448,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str311,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str391,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str446,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str312,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str286,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str121,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str176,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str375,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str337,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str282,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str242,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str206,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str211,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str536,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str651,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str683,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str613,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str329,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str426,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str89,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str344,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str479,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str548,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str209,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str661,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str608,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str634,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str610,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str72,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str388,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str153,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str443,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str254,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str281,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str78,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str437,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str210,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str252,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str710,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str692,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str700,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str495,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str243,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str106,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str869,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str425,
30 changes: 15 additions & 15 deletions source/lib/canonical_dos.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_0,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_4,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_5,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_8,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_12,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_13,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_17,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_21,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_22,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_26,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_31,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_35,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_38,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_42,
(int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_dos_47,
4 changes: 2 additions & 2 deletions source/lib/canonical_local.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str496,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str193,
(int)(INT_PTR)&((struct stringpool_t *)0)->stringpool_str496,
10 changes: 5 additions & 5 deletions source/lib/hz.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ hz_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
for (;;) {
c = *s;
if (c == '~') {
if ((unsigned int)n < count+2)
if (n < count+2)
goto none;
c = s[1];
if (state == 0) {
Expand All @@ -48,21 +48,21 @@ hz_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
if (c == '{') {
state = 1;
s += 2; count += 2;
if ((unsigned int)n < count+1)
if (n < count+1)
goto none;
continue;
}
if (c == '\n') {
s += 2; count += 2;
if ((unsigned int)n < count+1)
if (n < count+1)
goto none;
continue;
}
} else {
if (c == '}') {
state = 0;
s += 2; count += 2;
if ((unsigned int)n < count+1)
if (n < count+1)
goto none;
continue;
}
Expand All @@ -77,7 +77,7 @@ hz_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
return count+1;
} else {
int ret;
if ((unsigned int)n < count+2)
if (n < count+2)
goto none;
ret = gb2312_mbtowc(conv,pwc,s,2);
if (ret == RET_ILSEQ)
Expand Down
4 changes: 2 additions & 2 deletions source/lib/iconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static const struct stringpool2_t stringpool2_contents = {
};
#define stringpool2 ((const char *) &stringpool2_contents)
static const struct alias sysdep_aliases[] = {
#define S(tag,name,encoding_index) { (int)(long)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index },
#define S(tag,name,encoding_index) { (int)(INT_PTR)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index },
#include "aliases2.h"
#undef S
};
Expand Down Expand Up @@ -431,7 +431,7 @@ void iconvlist (int (*do_one) (unsigned int namescount,
namesbuf[i++] = aliasbuf[j++].name;
while (j < num_aliases && aliasbuf[j].encoding_index == ei);
if (i > 1)
qsort((char *)namesbuf, i, sizeof(const char *), compare_by_name);
qsort(namesbuf, i, sizeof(const char *), compare_by_name);
/* Call the callback. */
if (do_one(i,namesbuf,data))
break;
Expand Down
Loading

0 comments on commit 887dc1c

Please sign in to comment.