mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
2000-11-27 Ulrich Drepper <drepper@redhat.com> * iconv/gconv.h (__gconv_info): Define __data element using __flexarr. * misc/sys/cdefs.h: Define __flexarr. Proposed by Joseph S. Myers <jsm28@cam.ac.uk>. * iconvdata/iso-2022-jp.c: Add prototypes to avoid warnings. * iconv/skeleton.c: Likewise. * iconvdata/iso8859-1.c (BODY to 8859-1): Add const to cast. * iconv/loop.c (get16): Add const to cast. (get32): Likewise.
This commit is contained in:
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2000-11-27 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* iconv/gconv.h (__gconv_info): Define __data element using __flexarr.
|
||||||
|
* misc/sys/cdefs.h: Define __flexarr.
|
||||||
|
Proposed by Joseph S. Myers <jsm28@cam.ac.uk>.
|
||||||
|
|
||||||
|
* iconvdata/iso-2022-jp.c: Add prototypes to avoid warnings.
|
||||||
|
* iconv/skeleton.c: Likewise.
|
||||||
|
* iconvdata/iso8859-1.c (BODY to 8859-1): Add const to cast.
|
||||||
|
* iconv/loop.c (get16): Add const to cast.
|
||||||
|
(get32): Likewise.
|
||||||
|
|
||||||
2000-11-27 Andreas Jaeger <aj@suse.de>
|
2000-11-27 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* login/programs/pt_chown.c (do_pt_chown): Mark function as static
|
* login/programs/pt_chown.c (do_pt_chown): Mark function as static
|
||||||
|
@ -168,7 +168,7 @@ typedef struct __gconv_info
|
|||||||
{
|
{
|
||||||
size_t __nsteps;
|
size_t __nsteps;
|
||||||
struct __gconv_step *__steps;
|
struct __gconv_step *__steps;
|
||||||
__extension__ struct __gconv_step_data __data[0];
|
__extension__ struct __gconv_step_data __data __flexarr;
|
||||||
} *__gconv_t;
|
} *__gconv_t;
|
||||||
|
|
||||||
#endif /* gconv.h */
|
#endif /* gconv.h */
|
||||||
|
@ -213,6 +213,7 @@ static int to_object;
|
|||||||
# error "CHARSET_NAME not defined"
|
# error "CHARSET_NAME not defined"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
extern int gconv_init (struct __gconv_step *step);
|
||||||
int
|
int
|
||||||
gconv_init (struct __gconv_step *step)
|
gconv_init (struct __gconv_step *step)
|
||||||
{
|
{
|
||||||
@ -273,6 +274,12 @@ gconv_init (struct __gconv_step *step)
|
|||||||
#define SINGLE2(fct) fct##_single
|
#define SINGLE2(fct) fct##_single
|
||||||
|
|
||||||
|
|
||||||
|
extern int FUNCTION_NAME (struct __gconv_step *step,
|
||||||
|
struct __gconv_step_data *data,
|
||||||
|
const unsigned char **inptrp,
|
||||||
|
const unsigned char *inend,
|
||||||
|
unsigned char **outbufstart, size_t *irreversible,
|
||||||
|
int do_flush, int consume_incomplete);
|
||||||
int
|
int
|
||||||
FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
|
FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
|
||||||
const unsigned char **inptrp, const unsigned char *inend,
|
const unsigned char **inptrp, const unsigned char *inend,
|
||||||
|
@ -111,6 +111,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern int gconv_init (struct __gconv_step *step);
|
||||||
int
|
int
|
||||||
gconv_init (struct __gconv_step *step)
|
gconv_init (struct __gconv_step *step)
|
||||||
{
|
{
|
||||||
@ -180,6 +181,7 @@ gconv_init (struct __gconv_step *step)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern void gconv_end (struct __gconv_step *data);
|
||||||
void
|
void
|
||||||
gconv_end (struct __gconv_step *data)
|
gconv_end (struct __gconv_step *data)
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#define LOOPFCT TO_LOOP
|
#define LOOPFCT TO_LOOP
|
||||||
#define BODY \
|
#define BODY \
|
||||||
{ \
|
{ \
|
||||||
uint32_t ch = *((uint32_t *) inptr); \
|
uint32_t ch = *((const uint32_t *) inptr); \
|
||||||
if (__builtin_expect (ch, 0) > 0xff) \
|
if (__builtin_expect (ch, 0) > 0xff) \
|
||||||
{ \
|
{ \
|
||||||
/* We have an illegal character. */ \
|
/* We have an illegal character. */ \
|
||||||
|
@ -93,6 +93,24 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Support for flexible arrays. */
|
||||||
|
#if __GNUC_PREREQ (2,97)
|
||||||
|
/* GCC 2.97 supports C99 flexible array members. */
|
||||||
|
# define __flexarr []
|
||||||
|
#else
|
||||||
|
# ifdef __GNUC__
|
||||||
|
# define __flexarr [0]
|
||||||
|
# else
|
||||||
|
# ifdef __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||||
|
# define __flexarr []
|
||||||
|
# else
|
||||||
|
/* Some other non-C99 compiler. Approximate with [1]. */
|
||||||
|
# define __flexarr [1]
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* __asm__ ("xyz") is used throughout the headers to rename functions
|
/* __asm__ ("xyz") is used throughout the headers to rename functions
|
||||||
at the assembly language level. This is wrapped by the __REDIRECT
|
at the assembly language level. This is wrapped by the __REDIRECT
|
||||||
macro, in order to support compilers that can do this some other
|
macro, in order to support compilers that can do this some other
|
||||||
|
Reference in New Issue
Block a user