Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions games/NXDoom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config GAMES_NXDOOM
depends on ALLOW_GPL_COMPONENTS
depends on VIDEO_FB
depends on CRYPTO
depends on LIBC_LOCALE
Comment thread
acassis marked this conversation as resolved.
---help---
Play DOOM on NuttX!

Expand Down
40 changes: 3 additions & 37 deletions games/NXDoom/src/i_glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@
#include "i_glob.h"
#include "m_misc.h"

#if defined(HAVE_DIRENT_H)
#include <dirent.h>

#include <dirent.h>
#include <sys/stat.h>
#elif defined(__WATCOMC__)
/* Watcom has the same API in a different header. */
#include <direct.h>
#else
#define NO_DIRENT_IMPLEMENTATION
#endif

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -72,8 +67,6 @@ struct glob_s
* Private Functions
****************************************************************************/

#ifndef NO_DIRENT_IMPLEMENTATION

/* Only the fields d_name and (as an XSI extension) d_ino are specified
* in POSIX.1. Other than Linux, the d_type field is available mainly
* only on BSD systems. The remaining fields are available on many, but
Expand All @@ -95,7 +88,7 @@ static boolean is_directory(char *dir, struct dirent *de)
int result;

filename = m_string_join(dir, DIR_SEPARATOR_S, de->d_name, NULL);
result = m_stat(filename, &sb);
result = stat(filename, &sb);
free(filename);

if (result != 0)
Expand Down Expand Up @@ -402,30 +395,3 @@ const char *i_next_glob(glob_t *glob)
++glob->next_index;
return result;
}

#else /* #ifdef NO_DIRENT_IMPLEMENTATION */

#warning "No native implementation of file globbing."

glob_t *i_start_glob(const char *directory, const char *glob, int flags)
{
return NULL;
}

void i_end_glob(glob_t *glob)
{
return;
}

const char *i_next_glob(glob_t *glob)
{
return "";
}

glob_t *i_start_multi_glob(const char *directory, int flags,
const char *glob, ...)
{
return NULL;
}

#endif /* NO_DIRENT_IMPLEMENTATION */
Loading