mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Make liblist an extern to fix dtksh compile (#108)
The liblist variable needs to be an extern for dtksh to build. Quote from CDE developer Chase: we use an old function that no longer appears in kornshell, sh_getliblist, it seems to be replaced by the function sh_getlib, which is fine, but it seems to return a "Shbltin_f" type, which I can't seem to find any information on what it is. We need the void pointer dlsym provides for some widget init stuff, I tried making liblist an extern, but it kept giving me an error about libcomp_t being undefined. src/cmd/ksh93/bltins/typeset.c, src/cmd/ksh93/include/shell.h: - Fix the compiler error reported above by moving the type definition for Libcomp_t to shell.h. - Make liblist an extern since findsym.c in dtksh needs it to build. The old sh_getliblist function doesn't need to be reintroduced since the only purpose it served was to workaround the problem of liblist being a static variable. Now that liblist is an extern, dtksh fsym can use liblist directly to avoid sh_getliblist. dtksh findsym.c: https://sourceforge.net/p/cdesktopenv/code/ci/2.3.2/tree/cde/programs/dtksh/findsym.c
This commit is contained in:
		
							parent
							
								
									ac8991e525
								
							
						
					
					
						commit
						49ae483574
					
				
					 2 changed files with 12 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -904,18 +904,9 @@ static int     setall(char **argv,register int flag,Dt_t *troot,struct tdata *tp
 | 
			
		|||
 | 
			
		||||
typedef void (*Libinit_f)(int,void*);
 | 
			
		||||
 | 
			
		||||
typedef struct Libcomp_s
 | 
			
		||||
{
 | 
			
		||||
	void*		dll;
 | 
			
		||||
	char*		lib;
 | 
			
		||||
	dev_t		dev;
 | 
			
		||||
	ino_t		ino;
 | 
			
		||||
	unsigned int	attr;
 | 
			
		||||
} Libcomp_t;
 | 
			
		||||
 | 
			
		||||
#define GROWLIB	4
 | 
			
		||||
 | 
			
		||||
static Libcomp_t	*liblist;
 | 
			
		||||
Libcomp_t	*liblist;
 | 
			
		||||
static int		nlib;
 | 
			
		||||
static int		maxlib;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,6 +150,17 @@ struct Shell_s
 | 
			
		|||
#endif /* _SH_PRIVATE */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* used for builtins */
 | 
			
		||||
typedef struct Libcomp_s
 | 
			
		||||
{
 | 
			
		||||
	void*		dll;
 | 
			
		||||
	char*		lib;
 | 
			
		||||
	dev_t		dev;
 | 
			
		||||
	ino_t		ino;
 | 
			
		||||
	unsigned int	attr;
 | 
			
		||||
} Libcomp_t;
 | 
			
		||||
extern Libcomp_t *liblist;
 | 
			
		||||
 | 
			
		||||
/* flags for sh_parse */
 | 
			
		||||
#define SH_NL		1	/* Treat new-lines as ; */
 | 
			
		||||
#define SH_EOF		2	/* EOF causes syntax error */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue