$OpenBSD$ --- src/cmdlib.cpp.orig Sat May 14 17:56:00 2011 +++ src/cmdlib.cpp Sat May 14 18:03:00 2011 @@ -951,7 +951,8 @@ void ScanDirectory(TArray &list, const char } } -#elif defined(__sun) || defined(linux) +//#elif defined(__sun) || defined(linux) +#else //========================================================================== // @@ -993,49 +994,4 @@ void ScanDirectory(TArray &list, const char closedir(directory); } -#else - -//========================================================================== -// -// ScanDirectory -// 4.4BSD version -// -//========================================================================== - -void ScanDirectory(TArray &list, const char *dirpath) -{ - const char **argv[] = {dirpath, NULL }; - FTS *fts; - FTSENT *ent; - - fts = fts_open(argv, FTS_LOGICAL, NULL); - if (fts == NULL) - { - I_Error("Failed to start directory traversal: %s\n", strerror(errno)); - return; - } - while ((ent = fts_read(fts)) != NULL) - { - if (ent->fts_info == FTS_D && ent->fts_name[0] == '.') - { - // Skip hidden directories. (Prevents SVN bookkeeping - // info from being included.) - fts_set(fts, ent, FTS_SKIP); - } - if (ent->fts_info == FTS_D && ent->fts_level == 0) - { - FFileList *fl = &list[list.Reserve(1)]; - fl->Filename = ent->fts_path; - fl->isDirectory = true; - } - if (ent->fts_info == FTS_F) - { - // We're only interested in remembering files. - FFileList *fl = &list[list.Reserve(1)]; - fl->Filename = ent->fts_path; - fl->isDirectory = false; - } - } - fts_close(fts); -} #endif