[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sys_errlist (Re: gcc (Re: porting?))

On Tue, 10 Feb 1998, Mikko Larjava wrote:

> I was just wondering can the sys_errlist[] be declared as 
> extern const char *const sys_errlist[]; 
> or is there some kind of standard for it? That would give as a chance to 
> keep the whole array on text section which would save that valuable data 
> and bss for other things with baserel. There's probably other similar 
> things in the mintlib. e.g. localtim.c has two too big static arrays. 

In function  strerror(), sys_errlist is declared:

#ifndef __MBASE__
        extern char const *const sys_errlist[];
        extern char const *sys_errlist[];

but in PL46/47 MiNTlib, the initial array declaration at the
beginning of strerror.c is simply: 

char *sys_errlist[] = 
	{ ...

In PL48 if have ifdef'd it so that it comforms to the "extern"
declaration in the function.  I did this rather blindly... so I
would appreciate corrections if necessary. 

When the trees are seen to be moving, the enemy is advancing.
                                              Sun Tzu 9:20