Skip to content

Commit

Permalink
unistd: add include guards for header (#2590)
Browse files Browse the repository at this point in the history
* unistd: add include guards for header
  • Loading branch information
matz-e authored Nov 1, 2023
1 parent 09a1db5 commit fa132e4
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ivoc/pwman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ void iv_display_scale(Coord, Coord); // Make if fit into the screen
char* hoc_back2forward(char*);
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#define IOS_OUT std::ios::out

#include <IV-look/kit.h>
Expand Down
2 changes: 2 additions & 0 deletions src/nrniv/nrncore_write/utils/nrncore_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#include "vrecitem.h" // for nrnbbcore_vecplay_write
#include "parse.hpp"
#include <string>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <algorithm>
#include <cerrno>
#include <filesystem>
Expand Down
2 changes: 2 additions & 0 deletions src/nrnoc/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "section.h"
#include "parse.hpp"
#include "nrniv_mf.h"
Expand Down
2 changes: 2 additions & 0 deletions src/nrnpython/rxd_intracellular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#include "grids.h"
#include "rxd.h"
#include <nrnwrap_Python.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <cmath>

Expand Down
2 changes: 2 additions & 0 deletions src/oc/code2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include "hocparse.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <ctype.h>
#include <errno.h>
#include "nrnfilewrap.h"
Expand Down
2 changes: 2 additions & 0 deletions src/oc/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <cstdarg>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "hoc.h"
#include "ocmisc.h"
#include "hocstr.h"
Expand Down
2 changes: 2 additions & 0 deletions src/oc/hoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include "equation.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <math.h>
#include <errno.h>
#include "parse.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/oc/mswinprt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

#ifdef MINGW

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
Expand Down
2 changes: 2 additions & 0 deletions src/oc/scoprand.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <../../nrnconf.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

/* this was removed from the scopmath library since there could be
multiple copies of the static value below. One in neuron.exe and the
Expand Down
2 changes: 2 additions & 0 deletions src/parallel/bbsclimpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <InterViews/resource.h>
#include "nrnpy.h"
#include "oc2iv.h"
Expand Down
2 changes: 2 additions & 0 deletions src/parallel/bbsdirectmpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#ifdef NRNMPI // to end of file
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <InterViews/resource.h>
#include "oc2iv.h"
#include "bbs.h"
Expand Down
2 changes: 2 additions & 0 deletions src/parallel/bbssrvmpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#include <nrnmpi.h>
#ifdef NRNMPI // to end of file
#include <stdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bbssrv2mpi.h"
#include "bbssrv.h"

Expand Down

0 comments on commit fa132e4

Please sign in to comment.