Skip to content

Commit

Permalink
fixed a windows bug in make_dir_path
Browse files Browse the repository at this point in the history
  • Loading branch information
casper-boon committed Apr 26, 2024
1 parent 90c0f88 commit ca88004
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
# #
###############################################################################

ifeq ($(shell uname),Linux)
OSTYPE=$(shell uname -s)
else ifeq ($(shell uname),Darwin)
OSTYPE=$(shell uname -s)
else ifeq ($(shell uname),FreeBSD)
OSTYPE=$(shell uname -s)
else
OSTYPE=$(shell uname -o)
endif

srcdir=src
incdir=include

Expand Down Expand Up @@ -85,6 +95,9 @@ else
# we use std=f2008ts rather than f2008 because ts removes some type checking
# restrictions on interoperabilty routines (which were wrong anyway...)
FFLAGS=-fPIC -Wall -J ${moddir} -ffree-line-length-none -std=f2008ts
ifeq ($(OSTYPE),Msys)
FFLAGS+=-D_WIN32
endif
FFLAGS+=$(DEFINES) $(INCLUDES) -fall-intrinsics -Wno-unused -Wno-unused-dummy-argument
FFLAGS+=-fno-range-check -Wno-integer-division
ifeq ($(WITH_CHECKS),true)
Expand Down
4 changes: 4 additions & 0 deletions src/aed_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,11 @@ LOGICAL FUNCTION make_dir_path(dir)
INTEGER :: len, i, sys
CHARACTER(len=128) :: d
LOGICAL :: res = .TRUE.
#ifdef _WIN32
# define DIRSEP "\\"
#else
# define DIRSEP "/"
#endif
!BEGIN
!-------------------------------------------------------------------------------
len = LEN_TRIM(dir)
Expand Down

0 comments on commit ca88004

Please sign in to comment.