On Tue, 22 Dec 2009, Tamas TEVESZ wrote: Hi,
> preparing a platform that has no S_IFSOCK/S_ISSOCK, i protected the > hb alikes like this: > > include/hbapifs.h: > > #if defined( S_ISSOCK ) > # define HB_FA_SOCKET HB_FA_SPARSE /* S_ISSOCK() */ > #endif This is not necessary. HB_FA_SOCKET is Harbour internal attribute which should be always defined even if platform does not support it. > src/common/hbffind.c: > #if defined( S_ISSOCK ) > if( S_ISSOCK( raw_attr ) ) ulAttr |= HB_FA_SOCKET; > #endif Only S_ISSOCK() and S_IFSOCK usage should be protected so this is OK and should be enough. In theory it's possible that some platforms do not support also S_ISFIFO()/S_IFIFO and S_ISLNK()/S_IFLNK but before we will add such protection like above I strongly suggest to check if above macros are not covered in header files by some global feature set macros, i.e. S_ISSOCK() can be defined only when some BSD compatibility macros are enabled. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
