This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

alpha bug



The attached code will cause the compiler to abort.

alpha-dec-osf4 configuration, no flags to pass to the compiler.

This prevents the alpha-osf port from bootstrapping.

/home/law/egcs/libiberty/fnmatch.c: In function `fnmatch':
/home/law/egcs/libiberty/fnmatch.c:223: Internal compiler error in `get_aligned_mem', at config/alpha/alpha.c:939
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.


RTH, you can save a little time by just using the compiler on
/horton/law/egcs-alpha-osf/gcc  and the testcase in /home/law/fnmatch.i


# 1 "/home/law/egcs/libiberty/fnmatch.c"
 


























# 1 "config.h" 1
 
 

 
 

 

 

 


 


 


 
 

 
 

 
 

 






 

 


 
 

 


 


 


 


 
 

 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 
 

 
 

 


 


 


 


 


 


 


 


 


 


 


 


 
 

 


 


 


 


 


 


 


 
 

 


 


 


 


 


 


 


 


 


 


 

# 28 "/home/law/egcs/libiberty/fnmatch.c" 2









 








# 1 "/usr/include/errno.h" 1 3
 





















 


 

 
 



 


 
 







                                                                   



# 1 "/usr/include/standards.h" 1 3
 





















 


 

 
 



 


 













 












                                                                   



 
















 



 





 




 







 







 
















 







 









 






 


 

 











 
















 
 















# 223 "/usr/include/standards.h" 3


 












 
 






# 254 "/usr/include/standards.h" 3



# 49 "/usr/include/errno.h" 2 3


 








 

 










 






extern int *_errno  (void)  ;
extern int _Geterrno  (void)  ;
extern int _Seterrno  (int)  ;




extern int errno;













































 


			 

 





 

	 













	 













	 



 




 




 















 



 







 


 



 













 










 








 
 



























extern void perror  (const char *)  ;
extern char *sys_errlist[];
extern int sys_nerr;








# 46 "/home/law/egcs/libiberty/fnmatch.c" 2

# 1 "/home/law/egcs/libiberty/../include/fnmatch.h" 1
 







































 





 










 


 

extern int fnmatch  (const char *__pattern, const char *__string,
			 int __flags)  ;






# 47 "/home/law/egcs/libiberty/fnmatch.c" 2

# 1 "/usr/include/ctype.h" 1 3
 





















 


 

 
 



 


 





































 




extern int	isalpha  (int)  ;
extern int	isalnum  (int)  ;
extern int	iscntrl  (int)  ;
extern int	isdigit  (int)  ;
extern int	isgraph  (int)  ;
extern int	islower  (int)  ;
extern int	isprint  (int)  ;
extern int	ispunct  (int)  ;
extern int	isspace  (int)  ;
extern int	isupper  (int)  ;
extern int	isxdigit  (int)  ;
extern int	toupper  (int)  ;
extern int	tolower  (int)  ;





extern int	isascii  (int)  ;
extern int	toascii  (int)  ;

extern int	(_toupper)  (int)  ;
extern int	(_tolower)  (int)  ;


# 1 "/horton/law/egcs-alpha-osf/gcc/include/sys/types.h" 1 3
 





















 


 

 
 

 



 


 














 













 














 








typedef long int ptrdiff_t;









# 115 "/horton/law/egcs-alpha-osf/gcc/include/sys/types.h" 3





    typedef unsigned int wchar_t;







typedef unsigned int wctype_t;




typedef long            fpos_t;




typedef int            time_t;




typedef int             clock_t;









typedef long unsigned int size_t;









typedef long                    ssize_t;  


 


typedef	unsigned char	uchar_t;
typedef	unsigned short	ushort_t;
typedef	unsigned int	uint_t;
typedef unsigned long	ulong_t;
typedef	volatile unsigned char	vuchar_t;
typedef	volatile unsigned short	vushort_t;
typedef	volatile unsigned int	vuint_t;
typedef volatile unsigned long	vulong_t;




typedef	struct	{ long r[1]; } *physadr_t;
 



typedef	struct	label_t	{
	long	val[10];
} label_t;


# 200 "/horton/law/egcs-alpha-osf/gcc/include/sys/types.h" 3
































typedef int		level_t;
typedef	int		daddr_t;	 
typedef	char *		caddr_t;	 
typedef long *		qaddr_t;         
typedef char *          addr_t;
typedef	uint_t		ino_t;		 
typedef short		cnt_t;
typedef int		dev_t;		 
typedef	int		chan_t;		 




typedef long    off_t;			 


typedef unsigned long	rlim_t;		 
typedef	int		paddr_t;
typedef	ushort_t	nlink_t;



typedef int    		key_t;		 




typedef	uint_t		mode_t;		 







typedef uint_t		uid_t;		 





typedef uint_t		gid_t;		 




typedef	void *		mid_t;		 




typedef	int		pid_t;		 


typedef char		slab_t[12];	 

typedef ulong_t		shmatt_t;	 
typedef ulong_t		msgqnum_t;	 
typedef ulong_t		msglen_t;	 



        typedef unsigned int wint_t;          


 


typedef unsigned long	sigset_t;


 












typedef struct __pthread_attr_t {
    long		__valid  ;
    char*		__name  ;
    unsigned long	__arg  ;
    unsigned long	__reserved  [19];
    } pthread_attr_t;

typedef struct __pthread_mutexattr_t {
    long		__valid  ;
    unsigned long	__reserved  [15];
    } pthread_mutexattr_t;

typedef struct __pthread_condattr_t {
    long		__valid  ;
    unsigned long	__reserved  [13];
    } pthread_condattr_t;

typedef struct __pthread_t {
    void*		__reserved1  ;
    void*		__reserved2  ;
    unsigned short	__size  ;
    unsigned char	__reserved3  [2];
    unsigned char	__reserved4  [4];
    unsigned long	__sequence  ;
    unsigned long	__reserved5  [2];
    void*		__per_kt_area  ;
    void*		__stack_base  ;
    void*		__stack_reserve  ;
    void*		__stack_yellow  ;
    void*		__stack_guard  ;
    unsigned long	__stack_size  ;
    void**		__tsd_values  ;
    unsigned long	__tsd_count  ;
    unsigned int	__reserved6  ;
    unsigned int	__reserved7  ;
    unsigned int	__thread_flags  ;
    } *pthread_t;

typedef volatile struct __pthread_mutex_t {
    unsigned int	__lock  ;
    unsigned int	__valid  ;
    char*		__name  ;
    unsigned int	__arg  ;
    unsigned int	__depth  ;
    unsigned long	__sequence  ;
    unsigned long	__owner  ;
    void*		__block  ;
    } pthread_mutex_t;

typedef volatile struct __pthread_cond_t {
    unsigned int	__state  ;
    unsigned int	__valid  ;
    char*		__name  ;
    unsigned int	__arg  ;
    unsigned long	__sequence  ;
    void*		__block  ;
    } pthread_cond_t;

typedef unsigned int	pthread_key_t;

typedef volatile struct __pthread_once_t {
    long	__state  ;
    long	__reserved  [10];
    } pthread_once_t;




 




typedef long            timer_t;         



















typedef void (*sig_t)  (int,void (*)(int))  ;





 






typedef pid_t		id_t;		 
					 
					 
					 
					 
typedef unsigned int	useconds_t;	 





 


typedef uint_t	major_t;       
typedef uint_t	minor_t;       
typedef uint_t	devs_t;        
typedef uint_t	unit_t;        

 






 










# 1 "/usr/include/mach/machine/vm_types.h" 1 3
 





















 


 

 
 





















 



 



 






 






typedef	unsigned long	vm_offset_t;
typedef	unsigned long	vm_size_t;



# 459 "/horton/law/egcs-alpha-osf/gcc/include/sys/types.h" 2 3


 


typedef	uchar_t		uchar;
typedef	ushort_t	ushort;
typedef	uint_t		uint;
typedef ulong_t		ulong;

typedef	physadr_t	physadr;


 
typedef	uchar_t		u_char;
typedef	ushort_t 	u_short;
typedef	uint_t		u_int;
typedef	ulong_t		u_long;
typedef	vuchar_t	vu_char;
typedef	vushort_t 	vu_short;
typedef	vuint_t		vu_int;
typedef	vulong_t	vu_long;





typedef struct  _quad { int val[2]; } quad;


typedef	long	swblk_t;
typedef u_long	fixpt_t;

# 1 "/usr/include/sys/select.h" 1 3
 





















 


 

 
 

 



 




 











# 118 "/usr/include/sys/select.h" 3




 








# 144 "/usr/include/sys/select.h" 3


typedef int	fd_mask;



 



















typedef	struct fd_set {
	fd_mask	fds_bits[(((  4096     )+((    (sizeof(fd_mask) * 8 )    )-1))/(    (sizeof(fd_mask) * 8 )    ))  ];
} fd_set;





# 202 "/usr/include/sys/select.h" 3











 









extern void bzero  (char *, int)  ;






struct timeval;
int select  (int, fd_set *, fd_set *, fd_set *, struct timeval *)  ;








# 492 "/horton/law/egcs-alpha-osf/gcc/include/sys/types.h" 2 3




 
typedef unsigned char sa_family_t;

 
typedef	unsigned int	in_addr_t;
 
typedef	unsigned short	in_port_t;






# 104 "/usr/include/ctype.h" 2 3







# 1 "/usr/include/sys/localedef.h" 1 3
 





















 


 


 



 


 

















 





 





 



typedef struct _LC_charmap_t 	_LC_charmap_t;
typedef struct _LC_monetary_t 	_LC_monetary_t;
typedef struct _LC_numeric_t	_LC_numeric_t;
typedef struct _LC_resp_t	_LC_resp_t;
typedef struct _LC_time_t	_LC_time_t;
typedef struct _LC_collate_t	_LC_collate_t;
typedef struct _LC_ctype_t	_LC_ctype_t;
typedef struct _LC_locale_t	_LC_locale_t;

# 1 "/horton/law/egcs-alpha-osf/gcc/include/sys/lc_core.h" 1 3
 





















 


 


 



 


 



















# 1 "/usr/include/locale.h" 1 3
 





















 


 

 
 



 


 





















struct lconv {
   char *decimal_point;		 
   char *thousands_sep;		 
   char *grouping;		 
   char *int_curr_symbol;	 
   char *currency_symbol;	 
   char *mon_decimal_point;	 
   char *mon_thousands_sep;	 
   char *mon_grouping;		 
   char *positive_sign;		 
   char *negative_sign;		 
   char int_frac_digits;	 
   char frac_digits;		 
   char p_cs_precedes;		 
   char p_sep_by_space;		 
   char n_cs_precedes;		 
   char n_sep_by_space;		 
   char p_sign_posn;		 
   char n_sign_posn;		 

   char *left_parenthesis;	 
   char *right_parenthesis;	 





};





















struct lconv *localeconv  (void)  ;
char   *setlocale  (int, const char *)  ;





# 56 "/horton/law/egcs-alpha-osf/gcc/include/sys/lc_core.h" 2 3


 
 

# 1 "/usr/include/nl_types.h" 1 3
 





















 


 

 
 



 


 





















typedef int __nl_item;


typedef struct __catalog_descriptor *nl_catd;



typedef __nl_item nl_item;




extern nl_catd catopen  (const char *, int )  ;
extern char  *catgets  (nl_catd , int , int , const char *)  ;
extern int catclose  (nl_catd )  ;



typedef struct __catalog_descriptor CATD;

extern nl_catd NLcatopen  (char *, int)  ;
extern char *NLgetamsg  (char *, int, int, char *)  ;
extern char *NLcatgets  (nl_catd, int, int, const char *)  ;

# 1 "/usr/include/mesg.h" 1 3
 





















 


 



 

 
 

 



















# 1 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 1 3

# 1 "/horton/law/egcs-alpha-osf/gcc/include/stdarg.h" 1 3
 


































# 1 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 1 3
 

 




 




 





typedef struct {
  char *__base;			 
  int __offset;			 
} __gnuc_va_list;




 


# 128 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 3

# 36 "/horton/law/egcs-alpha-osf/gcc/include/stdarg.h" 2 3

# 133 "/horton/law/egcs-alpha-osf/gcc/include/stdarg.h" 3









# 209 "/horton/law/egcs-alpha-osf/gcc/include/stdarg.h" 3




# 2 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 2 3

 





















 


 

 
 



 


 









                                                                   






 










 


















 








 










 













# 1 "/usr/include/sys/seek.h" 1 3
 





















 


 


 



 






 











# 119 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 2 3


typedef struct {
	int	_cnt;
	unsigned int	_flag2;
	unsigned char	*_ptr;
	unsigned char	*_base;
	int	_bufsiz;
	short	_flag;
	short	_file;




	char	*__newbase;
	void	*_lock;			 
	unsigned char	*_bufendp;
} FILE;

extern FILE	_iob[];












 
extern size_t	fread  (void *, size_t, size_t, FILE *)  ;
extern size_t	fwrite  (const void *, size_t, size_t, FILE *)  ;
 


 
extern int	_flsbuf  (int, FILE *)  ;
extern int	_filbuf  (FILE *)  ;
extern int 	ferror  (FILE *)  ;
extern int 	feof  (FILE *)  ;
extern void 	clearerr  (FILE *)  ;
extern int 	putchar  (int)  ;
extern int 	getchar  (void)  ;
extern int 	putc  (int, FILE *)  ;
extern int 	getc  (FILE *)  ;
extern int	remove  (const char *)  ;
extern int	rename  (const char *, const char *)  ;
extern FILE 	*tmpfile  (void)  ;
extern char 	*tmpnam  (char *)  ;
extern int 	fclose  (FILE *)  ;
extern int 	fflush  (FILE *)  ;
extern FILE	*fopen  (const char *, const char *)  ;
extern FILE 	*freopen  (const char *, const char *, FILE *)  ;
extern void 	setbuf  (FILE *, char *)  ;
extern int 	setvbuf  (FILE *, char *, int, size_t)  ;
extern int	fprintf  (FILE *, const char *, ...)  ;
extern int	fscanf  (FILE *, const char *, ...)  ;
extern int	printf  (const char *, ...)  ;
extern int	scanf  (const char *, ...)  ;
extern int	sprintf  (char *, const char *, ...)  ;
extern int	sscanf  (const char *, const char *, ...)  ;








# 1 "/horton/law/egcs-alpha-osf/gcc/include/va_list.h" 1 3
 

# 1 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 1 3
 

 




 

# 25 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 3


 


# 128 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 3

# 3 "/horton/law/egcs-alpha-osf/gcc/include/va_list.h" 2 3




typedef __gnuc_va_list va_list;









# 191 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 2 3

extern int  vfprintf  (FILE *, const char *, __gnuc_va_list)  ;
extern int  vprintf  (const char *, __gnuc_va_list)  ;
extern int  vsprintf  (char *, const char *, __gnuc_va_list)  ;
# 203 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 3



extern int 	fgetc  (FILE *)  ;
extern char 	*fgets  (char *, int, FILE *)  ;
extern int 	fputc  (int, FILE *)  ;
extern int 	fputs  (const char *, FILE *)  ;
extern char 	*gets  (char *)  ;
extern int 	puts  (const char *)  ;
extern int	ungetc  (int, FILE *)  ;
extern int	fgetpos  (FILE *, fpos_t *)  ;
extern int 	fseek  (FILE *, long, int)  ;
extern int	fsetpos  (FILE *, const fpos_t *)  ;
extern long	ftell  (FILE *)  ;
extern void	rewind  (FILE *)  ;
extern void 	perror  (const char *)  ;










 













 

# 284 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 3


# 337 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 3















 














 
extern int 	fileno  (FILE *)  ;
extern FILE 	*fdopen  (int, const char *)  ;




extern char *cuserid  (char *)  ;
 













 
# 1 "/home/law/egcs/libiberty/../include/getopt.h" 1
 



























 





extern char *optarg;

 











extern int optind;

 


extern int opterr;

 

extern int optopt;

 




















struct option
{

  const char *name;



   

  int has_arg;
  int *flag;
  int val;
};

 












extern int getopt ();

extern int getopt_long (int argc, char *const *argv, const char *shortopts,
		        const struct option *longopts, int *longind);
extern int getopt_long_only (int argc, char *const *argv,
			     const char *shortopts,
		             const struct option *longopts, int *longind);

 
extern int _getopt_internal (int argc, char *const *argv,
			     const char *shortopts,
		             const struct option *longopts, int *longind,
			     int long_only);













# 390 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 2 3

 



 
extern char	*ctermid  (char *)  ;
extern int 	getw  (FILE *)  ;
extern int 	pclose  (FILE *)  ;
extern int 	putw  (int, FILE*)  ;
extern FILE 	*popen  (const char *, const char *)  ;
extern char 	*tempnam  (const char*, const char*)  ;
 






# 1 "/usr/include/sys/limits.h" 1 3
 





















 


 

 
 



 


 
















 









                                                                   





 










# 1 "/usr/include/machine/machlimits.h" 1 3
 





















 


 

 
 



 


 


 

































					 



					 







 



# 80 "/usr/include/sys/limits.h" 2 3





 










 















 










 













 



# 1 "/usr/include/sys/syslimits.h" 1 3
 





















 


 

 
 

 



 


 











































# 141 "/usr/include/sys/limits.h" 2 3








 









 







					 
 





























































# 1 "/usr/include/machine/machtime.h" 1 3
 





















 


 

 
 





















 



 


 



 









# 230 "/usr/include/sys/limits.h" 2 3












 




# 1 "/usr/include/sys/rt_limits.h" 1 3
 





















 


 


 















































# 247 "/usr/include/sys/limits.h" 2 3




 









 


# 409 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 2 3


 









 


















 
extern void 	setbuffer  (FILE *, char*, int)  ;
extern void 	setlinebuf  (FILE *)  ;
 



# 488 "/horton/law/egcs-alpha-osf/gcc/include/stdio.h" 3





# 55 "/usr/include/mesg.h" 2 3

# 1 "/usr/include/nl_types.h" 1 3
 





















 


 

 
 



 


 













# 88 "/usr/include/nl_types.h" 3

# 56 "/usr/include/mesg.h" 2 3

# 1 "/horton/law/egcs-alpha-osf/gcc/include/limits.h" 1 3
 


 





 
# 1 "/horton/law/egcs-alpha-osf/gcc/include/syslimits.h" 1 3
 





















 


 

 
 



 


 
















 









                                                                   

# 271 "/horton/law/egcs-alpha-osf/gcc/include/syslimits.h" 3

# 11 "/horton/law/egcs-alpha-osf/gcc/include/limits.h" 2 3



# 109 "/horton/law/egcs-alpha-osf/gcc/include/limits.h" 3


 









# 57 "/usr/include/mesg.h" 2 3







struct _message {
	unsigned short 	_set,
			_msg;
	char 		*_text;
	unsigned	_old;
};

struct _header {
	int 		_magic;
	unsigned short	_n_sets,
			_setmax;
	char		_filler[20];
};
struct _msgptr {
	unsigned short 	_msgno,
			_msglen;
	unsigned int	_offset;
};

struct _catset {
	unsigned short 	_setno,
			_n_msgs;
	struct _msgptr 	*_mp;
	int		_msgs_expanded;
};


struct __catalog_descriptor {
	char		*_mem;
	char		*_name;
	int 		_fd;		 
	struct _header 	*_hd;
	int		_catlen;	 
	struct _catset 	*_set;
	int		_setmax;	 
	int		_count;
	int		_magic;		 
	char		*_lc_message;
	char		*_nlspath;
	int		_n_sets;	 
	int		_sets_expanded;
};


 

extern struct _catset *__cat_get_catset(nl_catd, int);

extern struct _msgptr *__cat_get_msgptr(struct _catset *, int);
 


# 82 "/usr/include/nl_types.h" 2 3







# 61 "/horton/law/egcs-alpha-osf/gcc/include/sys/lc_core.h" 2 3

# 1 "/horton/law/egcs-alpha-osf/gcc/include/va_list.h" 1 3
 

# 1 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 1 3
 

 




 

# 25 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 3


 


# 128 "/horton/law/egcs-alpha-osf/gcc/include/va-alpha.h" 3

# 3 "/horton/law/egcs-alpha-osf/gcc/include/va_list.h" 2 3


# 16 "/horton/law/egcs-alpha-osf/gcc/include/va_list.h" 3

# 62 "/horton/law/egcs-alpha-osf/gcc/include/sys/lc_core.h" 2 3






 



 


typedef enum __lc_type_id_t {
    _LC_CAR=1,
    _LC_LOCALE=2,
    _LC_CHARMAP=3,
    _LC_CTYPE=4,
    _LC_COLLATE=5,
    _LC_NUMERIC=6,
    _LC_MONETARY=7,
    _LC_TIME=8,
    _LC_RESP=9 } __lc_type_id_t;

 



typedef struct {
    __lc_type_id_t
	type_id;
    unsigned short
	magic;
    unsigned short
	format;
    unsigned long
	version;
    
    unsigned long  size;

} _LC_object_t;


 
struct _LC_charmap_t;
struct _LC_ctype_t;
struct _LC_collate_t;
struct _LC_time_t;
struct _LC_monetary_t;
struct _LC_numeric_t;
struct _LC_resp_t;
struct _LC_locale_t;

 




 






typedef struct {

    _LC_object_t  hdr;

     
    char     *(*nl_langinfo)  (__nl_item, struct _LC_charmap_t *)  ;
    
     
    int   (*mbtowc)  (wchar_t *, const char *, size_t, struct _LC_charmap_t *)  ;
    size_t   (*mbstowcs)  (wchar_t *, const char *, size_t, struct _LC_charmap_t *)  ;
    int      (*wctomb)  (char *, wchar_t, struct _LC_charmap_t *)  ;
    size_t   (*wcstombs)  (char *, const wchar_t *, size_t, struct _LC_charmap_t *)  ;
    
     
    int      (*mblen)  (const char *, size_t, struct _LC_charmap_t *)  ;
    
     
    int   (*wcswidth)  (const wchar_t *, size_t, struct _LC_charmap_t *)  ;
    int   (*wcwidth)  (const wchar_t, struct _LC_charmap_t *)  ;
    
     
    int      (*__mbtopc)  (wchar_t *, char *, size_t, int *, struct _LC_charmap_t *)  ;
    int      (*__mbstopcs)  (wchar_t *, size_t, char *, size_t, int, char **, int *, struct _LC_charmap_t *)  ;
    int      (*__pctomb)  (char *, wchar_t *, size_t, int *, struct _LC_charmap_t *)  ;
    int      (*__pcstombs)  (char *, size_t, wchar_t *, size_t, char **, int *, struct _LC_charmap_t *)  ;
    
     
    struct _LC_charmap_t *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_charmap_t;


typedef struct {
 
    _LC_object_t  hdr; 
    
     
    wint_t  (*towupper)  (wint_t, struct _LC_ctype_t *)  ;
    wint_t  (*towlower)  (wint_t, struct _LC_ctype_t *)  ;
    
     
    wctype_t    (*wctype)  (char *, struct _LC_ctype_t *)  ;
    int      (*iswctype)  (wint_t, wctype_t, struct _LC_ctype_t *)  ;
    
     
    struct _LC_ctype_t   *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_ctype_t;


 










typedef struct {

    _LC_object_t  hdr;

     
    int      (*strcoll)  (const char *, const char *, struct _LC_collate_t *)  ;
    size_t   (*strxfrm)  (char *, const char *, size_t, struct _LC_collate_t *)  ;
    
     
    int      (*wcscoll)  (const wchar_t *, const wchar_t *, struct _LC_collate_t *)  ;
    size_t   (*wcsxfrm)  (wchar_t *, const wchar_t *, size_t, struct _LC_collate_t *)  ;
    
     
    int      (*fnmatch)  (const char *, const char *, const char *, int, struct _LC_collate_t *)  ;
    
     
    int      (*regcomp) () ;
    size_t   (*regerror) () ;
    int      (*regexec) () ;
    void     (*regfree) () ;

     
    struct _LC_collate_t *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_collate_t;


struct tm;
typedef struct {

    _LC_object_t  hdr;
    
     
    char     *(*nl_langinfo)  (__nl_item, struct _LC_time_t *)  ;
    
     
    size_t   (*strftime)  (char *, size_t, const char *, const struct tm *, struct _LC_time_t *)  ;
    char     *(*strptime)  (const char *, const char *, struct tm *, struct _LC_time_t *)  ;
    
     
    size_t   (*wcsftime)  (wchar_t *, size_t, const char *, const struct tm *, struct _LC_time_t *)  ;
    
     
    struct _LC_time_t    *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_time_t;


typedef struct {

    _LC_object_t  hdr;

     
    char     *(*nl_langinfo)  (__nl_item, struct _LC_monetary_t *)  ;
    
     
    ssize_t   (*strfmon)  (char *, size_t, const char *, va_list, struct _LC_monetary_t *)  ;
    
     
    struct _LC_monetary_t        *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_monetary_t;


typedef struct {

    _LC_object_t  hdr;

     
    char     *(*nl_langinfo)  (__nl_item, struct _LC_numeric_t *)  ;
    
     
    struct _LC_numeric_t *(*init)  (struct _LC_locale_t *)  ;
    void     *data;
} _LC_core_numeric_t;


typedef struct {

    _LC_object_t  hdr;
    
     
    char        *(*nl_langinfo)  (__nl_item, struct _LC_resp_t *)  ;
    
     
    int		(*rpmatch)  (const char *, struct _LC_resp_t *)  ;
    
     
    struct _LC_resp_t    *(*init)  (struct _LC_locale_t *)  ;
    void        *data;
} _LC_core_resp_t;

typedef struct {

    _LC_object_t hdr;

     
    char         *(*nl_langinfo)  (__nl_item, struct _LC_locale_t *)  ;
    struct lconv * (*localeconv)  (struct _LC_locale_t *)  ;
    
     
    struct _LC_locale_t  *(*init)  (struct _LC_locale_t *)  ;
    void         *data;
} _LC_core_locale_t;





# 79 "/usr/include/sys/localedef.h" 2 3















 




struct _LC_charmap_t {

    _LC_core_charmap_t core;
    
    char     *cm_csname;	 
    
    unsigned long   cm_mb_cur_max;  
    unsigned long   cm_mb_cur_min;  

    unsigned char
	     cm_max_disp_width;  
				 





};


 




struct _LC_monetary_t {

    _LC_core_monetary_t   core;
    
    char *int_curr_symbol;	    
    char *currency_symbol;	    
    char *mon_decimal_point;	    
    char *mon_thousands_sep;	    
    char *mon_grouping;		    
    char *positive_sign;	    
    char *negative_sign;	    
    signed  char int_frac_digits;    
    signed  char frac_digits;	    
    signed  char p_cs_precedes;	    
    signed  char p_sep_by_space;	    
    signed  char n_cs_precedes;	    
    signed  char n_sep_by_space;	    
    signed  char p_sign_posn;	    
    signed  char n_sign_posn;	    
    char *debit_sign;		    
    char *credit_sign;		    
    char *left_parenthesis;	    
    char *right_parenthesis;	    
    
};


 




struct _LC_numeric_t {

    _LC_core_numeric_t core;
    
    char     *decimal_point;
    char     *thousands_sep;
    unsigned
	char *grouping;
    
};


 




struct _LC_resp_t  {

    _LC_core_resp_t core;

    char    *yesexpr;	      
    char    *noexpr;	      
    char    *yesstr;	      
    char    *nostr;	      

};


 




struct _LC_time_t {

    _LC_core_time_t core;
    
    char *d_fmt;  
    char *t_fmt;  
    char *d_t_fmt;
    char *t_fmt_ampm;
    char *abday[7];  
    char *day[7];    
    char *abmon[12];  
    char *mon[12];    
    char *am_pm[2];
    char **era;			 
    char *era_year;
    char *era_d_fmt;
    char *alt_digits;
    char *m_d_recent;		 
    char *m_d_old;		 
    char *era_d_t_fmt;
    char *era_t_fmt;
};


 






typedef union {
    unsigned int n[(sizeof(unsigned int *)/sizeof(unsigned int)) ];
    		        
    		        
             
    const  unsigned int       
	  *p;	        
} _LC_weight_t;    
  
 




typedef struct {

    const  char         *ce_sym;  
    _LC_weight_t ce_wgt;	 
				 
} _LC_collel_t;


 




typedef struct {
    _LC_weight_t   ct_wgt;     
			       

    const  _LC_collel_t   *ct_collel; 
} _LC_coltbl_v1_t;

 





 
typedef char _LC_strpool_t, *_LC_strpool_ptr_t;

 








typedef struct {
	int          strpool_idx;
	unsigned int ce_wgt[1];
} _LC_collel_tbl_v2_t;

 



typedef _LC_collel_tbl_v2_t  _LC_collel_tbl_t;

 








typedef struct {
	unsigned int min;
	unsigned int max;
	unsigned int *tbl;
} _LC_collel_qidx_v2_t;

 




typedef _LC_collel_qidx_v2_t _LC_collel_qidx_t;

 




typedef struct {
        unsigned int         ce_tbl_bsize;     
	unsigned int         ce_tbl_cnt;       
	unsigned int         ce_strpool_cnt;   
	unsigned int         version_mask;     
	_LC_strpool_t        *ce_strpool;      
	_LC_collel_tbl_t     *ce_tbl;          
	_LC_collel_qidx_t    *ce_qidx;         
	unsigned int         *ct_wgt[1];       
} _LC_coltbl_v2_t;

 



typedef struct {
  int (*getcolval)  (_LC_collate_t *hdl, unsigned int *colval, unsigned int realwc, const char *str, int order)  ;
} _LC_coll_methods_t;

 








typedef union {
  _LC_coltbl_v1_t  ct_v1;
  _LC_coltbl_v2_t  ct_v2;
} _LC_coltbl_t;


 



typedef struct {

    _LC_weight_t ss_act;	 
				 
    const  char *ss_src;	 
    const  char *ss_tgt;	 

} _LC_subs_t;


 








struct _LC_collate_t {

    _LC_core_collate_t core;
    
    unsigned			             
	char    co_nord;	             
    
    unsigned			             
	char    version;	             
                                             
    
    unsigned			             
	char    ce_defined;	             
    
    _LC_weight_t co_sort;	             
					     
    
    unsigned int     co_wc_min;		     
    unsigned int     co_wc_max;		     
    unsigned int     co_hbound;		     

    unsigned int     co_col_min;	     
    unsigned int     co_col_max;	     

    const  _LC_coltbl_t *co_coltbl; 	     
				             
    unsigned
	char    co_nsubs;		     
    const  _LC_subs_t         *co_subs;      
    const  _LC_coll_methods_t *methods;      
};

 







  
 




  
 



typedef struct {

    char    *name;
    unsigned
	int mask;

} _LC_classnm_t;


 




struct _LC_ctype_t {

  _LC_core_ctype_t core;

   
  unsigned int      min_wc;
  unsigned int      max_wc;

  unsigned int      max_upper;	 
  unsigned int      max_lower;	 

   
  const  unsigned int      *_upper;	 
  const  unsigned int      *_lower;	 
  
   
  const  unsigned
      int      *_mask;        
  const  unsigned
      int      *qmask;	      
  const  unsigned
      char     *qidx;	      

  unsigned int	qidx_hbound;	 
   
  unsigned
      char     nclasses;
 const  _LC_classnm_t *classnms;
  
  unsigned int	num_rows;    
  unsigned int	num_qmasks;  
};

 



















 





 





 









 




struct _LC_locale_t {

    _LC_core_locale_t core;
    char           *nl_info[55 ];     
					       
    struct lconv   *nl_lconv;
    
    _LC_charmap_t  *lc_charmap;
    _LC_collate_t  *lc_collate;
    _LC_ctype_t    *lc_ctype;
    _LC_monetary_t *lc_monetary;
    _LC_numeric_t  *lc_numeric;
    _LC_resp_t     *lc_resp;
    _LC_time_t     *lc_time;
    char	   *nl_info2[61  - 55 ];
};




extern _LC_charmap_t  *__lc_charmap;
extern _LC_collate_t  *__lc_collate;
extern _LC_ctype_t    *__lc_ctype;
extern _LC_monetary_t *__lc_monetary;
extern _LC_numeric_t  *__lc_numeric;
extern _LC_resp_t     *__lc_resp;
extern _LC_time_t     *__lc_time;
extern _LC_locale_t   *__lc_locale;



































# 111 "/usr/include/ctype.h" 2 3































# 48 "/home/law/egcs/libiberty/fnmatch.c" 2



 














 

int
fnmatch (pattern, string, flags)
     const char *pattern;
     const char *string;
     int flags;
{
  register const char *p = pattern, *n = string;
  register unsigned char c;

 


  while ((c = *p++) != '\0')
    {
      c = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   c   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   c   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   c   ] : (*( __lc_ctype ->core.  towlower   ))  (   c   ,__lc_ctype)))   : ( c )) ;

      switch (c)
	{
	case '?':
	  if (*n == '\0')
	    return 1 ;
	  else if ((flags & (1 << 0)  ) && *n == '/')
	    return 1 ;
	  else if ((flags & (1 << 2) ) && *n == '.' &&
		   (n == string || ((flags & (1 << 0)  ) && n[-1] == '/')))
	    return 1 ;
	  break;

	case '\\':
	  if (!(flags & (1 << 1) ))
	    {
	      c = *p++;
	      c = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   c   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   c   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   c   ] : (*( __lc_ctype ->core.  towlower   ))  (   c   ,__lc_ctype)))   : ( c )) ;
	    }
	  if (((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   (unsigned char)*n   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   (unsigned char)*n   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   (unsigned char)*n   ] : (*( __lc_ctype ->core.  towlower   ))  (   (unsigned char)*n   ,__lc_ctype)))   : ( (unsigned char)*n ))  != c)
	    return 1 ;
	  break;

	case '*':
	  if ((flags & (1 << 2) ) && *n == '.' &&
	      (n == string || ((flags & (1 << 0)  ) && n[-1] == '/')))
	    return 1 ;

	  for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
	    if (((flags & (1 << 0)  ) && *n == '/') ||
		(c == '?' && *n == '\0'))
	      return 1 ;

	  if (c == '\0')
	    return 0;

	  {
	    unsigned char c1 = (!(flags & (1 << 1) ) && c == '\\') ? *p : c;
	    c1 = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   c1   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   c1   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   c1   ] : (*( __lc_ctype ->core.  towlower   ))  (   c1   ,__lc_ctype)))   : ( c1 )) ;
	    for (--p; *n != '\0'; ++n)
	      if ((c == '[' || ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   (unsigned char)*n   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   (unsigned char)*n   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   (unsigned char)*n   ] : (*( __lc_ctype ->core.  towlower   ))  (   (unsigned char)*n   ,__lc_ctype)))   : ( (unsigned char)*n ))  == c1) &&
		  fnmatch (p, n, flags & ~(1 << 2) ) == 0)
		return 0;
	    return 1 ;
	  }

	case '[':
	  {
	     
	    register int not;

	    if (*n == '\0')
	      return 1 ;

	    if ((flags & (1 << 2) ) && *n == '.' &&
		(n == string || ((flags & (1 << 0)  ) && n[-1] == '/')))
	      return 1 ;

	    not = (*p == '!' || *p == '^');
	    if (not)
	      ++p;

	    c = *p++;
	    for (;;)
	      {
		register unsigned char cstart = c, cend = c;

		if (!(flags & (1 << 1) ) && c == '\\')
		  cstart = cend = *p++;

		cstart = cend = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   cstart   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   cstart   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   cstart   ] : (*( __lc_ctype ->core.  towlower   ))  (   cstart   ,__lc_ctype)))   : ( cstart )) ;

		if (c == '\0')
		   
		  return 1 ;

		c = *p++;
		c = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   c   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   c   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   c   ] : (*( __lc_ctype ->core.  towlower   ))  (   c   ,__lc_ctype)))   : ( c )) ;

		if ((flags & (1 << 0)  ) && c == '/')
		   
		  return 1 ;

		if (c == '-' && *p != ']')
		  {
		    cend = *p++;
		    if (!(flags & (1 << 1) ) && cend == '\\')
		      cend = *p++;
		    if (cend == '\0')
		      return 1 ;
		    cend = ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   cend   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   cend   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   cend   ] : (*( __lc_ctype ->core.  towlower   ))  (   cend   ,__lc_ctype)))   : ( cend )) ;

		    c = *p++;
		  }

		if (((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   (unsigned char)*n   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   (unsigned char)*n   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   (unsigned char)*n   ] : (*( __lc_ctype ->core.  towlower   ))  (   (unsigned char)*n   ,__lc_ctype)))   : ( (unsigned char)*n ))  >= cstart
		    && ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   (unsigned char)*n   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   (unsigned char)*n   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   (unsigned char)*n   ] : (*( __lc_ctype ->core.  towlower   ))  (   (unsigned char)*n   ,__lc_ctype)))   : ( (unsigned char)*n ))  <= cend)
		  goto matched;

		if (c == ']')
		  break;
	      }
	    if (!not)
	      return 1 ;
	    break;

	  matched:;
	     
	    while (c != ']')
	      {
		if (c == '\0')
		   
		  return 1 ;

		c = *p++;
		if (!(flags & (1 << 1) ) && c == '\\')
		   
		  ++p;
	      }
	    if (not)
	      return 1 ;
	  }
	  break;

	default:
	  if (c != ((flags & (1 << 4) ) && (((*( __lc_ctype ->core.  iswctype   ))  == 0L) ? (int) (__lc_ctype->_mask[   (unsigned char)*n   ] & ( 0x400  )) : (*( __lc_ctype ->core.  iswctype   ))  (   (unsigned char)*n   , 0x400  ,__lc_ctype))   ? ((int) (((*( __lc_ctype ->core.  towlower   ))  == 0L) ? __lc_ctype->_lower[   (unsigned char)*n   ] : (*( __lc_ctype ->core.  towlower   ))  (   (unsigned char)*n   ,__lc_ctype)))   : ( (unsigned char)*n )) )
	    return 1 ;
	}

      ++n;
    }

  if (*n == '\0')
    return 0;

  if ((flags & (1 << 3) ) && *n == '/')
     
    return 0;

  return 1 ;
}








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]