[GRASS5] winGRASS: mingw32 and execl (g.list)

Glynn Clements glynn at gclements.plus.com
Sun Jan 22 04:39:59 EST 2006


Markus Neteler wrote:

> Now a question: While 'g.list' compiled, it just does not display
> anything and exits. May execl() be the problem?
> general/manage/cmd/list.c

Possibly. mon.start uses spawnl() instead:

	#ifdef __W98__
	
	#include <process.h>
	
	#define execl(fullpath,path,name,bg,link,nul)			\
	do {								\
		spawnl(_P_DETACH,fullpath,path,name,"-",link,nul);	\
		return 0;						\
	} while (0)
	
	#endif /* __W98__ */

However, if list.c compiles and links, something is providing an
execl() function.

It seems more likely that the access() check is failing. Maybe the
lister program has a ".exe" suffix cauing it not to be found?

Ideally, libgis needs a standard interface for command execution. 
There is already a (mostly untested) Unix implementation in
lib/gis/spawn.c. A Windows implementation would need to use
CreateProcess instead.

> Or do we have to implement some .../path/... vs ...\path\...
> tricks there?

Nope; it isn't related to path handling.

FWIW, I will be able to help on Windows issues shortly. The reason why
I haven't been around much is that I've just got a new PC (running
Windows XP Pro), and I've been rather busy setting it up and
re-learning how to use Windows.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list