diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/c.c | 8 | ||||
-rw-r--r-- | src/fpm_filesystem.F90 | 4 |
2 files changed, 2 insertions, 10 deletions
@@ -1,9 +1,3 @@ -/* FIXME: fpm --flag '-DENABLE_C_WRAPPER' currently doesn't work with .c files. Use #if..#endif below for the time being. */ -#if ((defined(_WIN32) && (defined(__MINGW32__) || defined(__MINGW64__))) || defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)) -#define ENABLE_C_WRAPPER -#endif - -#ifdef ENABLE_C_WRAPPER #include <sys/stat.h> #include <dirent.h> @@ -18,5 +12,3 @@ const char *get_d_name(struct dirent *d) { return (const char *) d->d_name; } - -#endif diff --git a/src/fpm_filesystem.F90 b/src/fpm_filesystem.F90 index 7d21e31..7b70ebe 100644 --- a/src/fpm_filesystem.F90 +++ b/src/fpm_filesystem.F90 @@ -17,7 +17,7 @@ use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, stdout=>output_unit, integer, parameter :: LINE_BUFFER_LEN = 1000 -#ifdef ENABLE_C_WRAPPER +#ifndef FPM_BOOTSTRAP interface function c_opendir(dir) result(r) bind(c, name="opendir") import c_char, c_ptr @@ -345,7 +345,7 @@ subroutine mkdir(dir) end if end subroutine mkdir -#ifdef ENABLE_C_WRAPPER +#ifndef FPM_BOOTSTRAP !> Get file & directory names in directory `dir` using iso_c_binding. !! !! - File/directory names return are relative to cwd, ie. preprended with `dir` |