Skip to content

Commit 52cb72f

Browse files
author
Carlos Une
committed
Use C wrapper by default
1 parent db869aa commit 52cb72f

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/c.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/* FIXME: fpm --flag '-DENABLE_C_WRAPPER' currently doesn't work with .c files. Use #if..#endif below for the time being. */
2-
#if ((defined(_WIN32) && (defined(__MINGW32__) || defined(__MINGW64__))) || defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__))
3-
#define ENABLE_C_WRAPPER
4-
#endif
5-
6-
#ifdef ENABLE_C_WRAPPER
71
#include <sys/stat.h>
82
#include <dirent.h>
93

@@ -18,5 +12,3 @@ const char *get_d_name(struct dirent *d)
1812
{
1913
return (const char *) d->d_name;
2014
}
21-
22-
#endif

src/fpm_filesystem.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module fpm_filesystem
1717

1818
integer, parameter :: LINE_BUFFER_LEN = 1000
1919

20-
#ifdef ENABLE_C_WRAPPER
20+
#ifndef FPM_BOOTSTRAP
2121
interface
2222
function c_opendir(dir) result(r) bind(c, name="opendir")
2323
import c_char, c_ptr
@@ -345,7 +345,7 @@ subroutine mkdir(dir)
345345
end if
346346
end subroutine mkdir
347347

348-
#ifdef ENABLE_C_WRAPPER
348+
#ifndef FPM_BOOTSTRAP
349349
!> Get file & directory names in directory `dir` using iso_c_binding.
350350
!!
351351
!! - File/directory names return are relative to cwd, ie. preprended with `dir`

0 commit comments

Comments
 (0)