24 #define pg_log_warning(...) elog(WARNING, __VA_ARGS__)
52 filenames = (
char **)
palloc(fnsize *
sizeof(
char *));
54 while (errno = 0, (file =
readdir(dir)) != NULL)
56 if (strcmp(file->
d_name,
".") != 0 && strcmp(file->
d_name,
"..") != 0)
58 if (numnames + 1 >= fnsize)
61 filenames = (
char **)
repalloc(filenames,
62 fnsize *
sizeof(
char *));
71 filenames[numnames] = NULL;
90 for (
fn = filenames; *
fn;
fn++)
struct dirent * readdir(DIR *)
DIR * opendir(const char *)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * repalloc(void *pointer, Size size)
void pgfnames_cleanup(char **filenames)
char ** pgfnames(const char *path)
#define pg_log_warning(...)
static void * fn(void *arg)