int app_isdir(const char *name)
	{
#if defined(S_ISDIR)
	struct stat st;

	if (stat(name,&st)==0)	return S_ISDIR(st.st_mode);
	else			return -1;
#else
	return -1;
#endif
	}
int app_isdir(const char *name)
	{
#if defined(S_ISDIR)
	struct stat st;

	if (stat(name,&st)==0)	return S_ISDIR(st.st_mode);
	else			return -1;
#else
	return -1;
#endif
	}