In lib/glob.c, the code: # undef opendir # undef closedir
causes this link error: glob.obj : error LNK2019: unresolved external symbol _closedir referenced in function _glob_in_dir glob.obj : error LNK2019: unresolved external symbol _opendir referenced in function _glob_in_dir I fixed it by instead (line 191): # ifndef _MSC_VER # undef opendir # undef closedir # endif No problem for MingW since it has closedir() etc. But maybe this should be: # ifdef HAVE_OPENDIR # undef opendir # endif # ifdef HAVE_CLOSEDIR # undef closedir # endif This brings up my confusion I have with stuff like what value REPLACE_CLOSEDIR etc. should have. (IMHO the value of REPLACE_CLOSEDIR shouldn't be important unless HAVE_CLOSEDIR is defined). Is it possible to make only 'rpl_closedir' visible to programs? I.e. have 'REPLACE_CLOSEDIR = '1 for both MingW and MSVC? Or are we supposed to generate two sets of all the headers; 1 for MingW and 1 for MSVC. Is so, that's too bad. Thanks. -- --gv