Skip to content

Commit 9d584c7

Browse files
committed
Change some config macros to have SAMRAI_ prefix to avoid name conflicts
1 parent 8e4e00a commit 9d584c7

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

cmake/CMakeConfigureFile.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ check_function_exists(mallinfo HAVE_MALLINFO)
4848
#HAVE_MALLOC_H
4949
check_include_files(malloc.h HAVE_MALLOC_H)
5050

51-
#HAVE_SYS_TIMES_H
52-
check_include_files(sys/times.h HAVE_SYS_TIMES_H)
51+
#SAMRAI_HAVE_SYS_TIMES_H
52+
check_include_files(sys/times.h SAMRAI_HAVE_SYS_TIMES_H)
5353

54-
#HAVE_UNISTD_H
55-
check_include_files(unistd.h HAVE_UNISTD_H)
54+
#SAMRAI_HAVE_UNISTD_H
55+
check_include_files(unistd.h SAMRAI_HAVE_UNISTD_H)
5656

5757
#IOMANIP_HEADER_FILE
5858
set(IOSTREAM_HEADER_FILE "<iomanip>")

config/SAMRAI_config.h.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
#cmakedefine HAVE_SYS_STAT_H
192192

193193
/* Define to 1 if you have the <sys/times.h> header file. */
194-
#cmakedefine HAVE_SYS_TIMES_H
194+
#cmakedefine SAMRAI_HAVE_SYS_TIMES_H
195195

196196
/* Define to 1 if you have the <sys/types.h> header file. */
197197
#cmakedefine HAVE_SYS_TYPES_H
@@ -206,7 +206,7 @@
206206
#undef HAVE_TEMPLATE_COMPLEX
207207

208208
/* Define to 1 if you have the <unistd.h> header file. */
209-
#cmakedefine HAVE_UNISTD_H
209+
#cmakedefine SAMRAI_HAVE_UNISTD_H
210210

211211
/* HAVE_VAMPIR */
212212
#undef HAVE_VAMPIR

source/SAMRAI/tbox/Clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace SAMRAI {
1616
namespace tbox {
1717

18-
#ifdef HAVE_SYS_TIMES_H
18+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
1919
struct tms Clock::s_tms_buffer;
2020
#endif
2121
clock_t Clock::s_null_clock_t;

source/SAMRAI/tbox/Clock.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include <ctime>
2020
#endif
2121

22-
#ifdef HAVE_SYS_TIMES_H
22+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
2323
#include <sys/times.h>
2424
#endif
2525

26-
#ifdef HAVE_UNISTD_H
26+
#ifdef SAMRAI_HAVE_UNISTD_H
2727
#include <unistd.h>
2828
#endif
2929

@@ -79,7 +79,7 @@ struct Clock {
7979
initialize(
8080
clock_t& clock)
8181
{
82-
#ifdef HAVE_SYS_TIMES_H
82+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
8383
clock = times(&s_tms_buffer);
8484
#endif
8585
}
@@ -105,7 +105,7 @@ struct Clock {
105105
clock_t& sys,
106106
double& wall)
107107
{
108-
#ifdef HAVE_SYS_TIMES_H
108+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
109109
s_null_clock_t = times(&s_tms_buffer);
110110
wall = SAMRAI_MPI::Wtime();
111111
sys = s_tms_buffer.tms_stime;
@@ -128,7 +128,7 @@ struct Clock {
128128
}
129129

130130
private:
131-
#ifdef HAVE_SYS_TIMES_H
131+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
132132
static struct tms s_tms_buffer;
133133
#endif
134134
static clock_t s_null_clock_t;

source/SAMRAI/tbox/SAMRAI_MPI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
#include "SAMRAI/tbox/SAMRAI_MPI.h"
1212

13-
#ifdef HAVE_SYS_TIMES_H
13+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
1414
#include <sys/times.h>
1515
#endif
1616

17-
#ifdef HAVE_UNISTD_H
17+
#ifdef SAMRAI_HAVE_UNISTD_H
1818
#include <unistd.h>
1919
#endif
2020

@@ -598,7 +598,7 @@ SAMRAI_MPI::Wtime()
598598
{
599599
double rval = 0.0;
600600
if (!s_mpi_is_initialized) {
601-
#ifdef HAVE_SYS_TIMES_H
601+
#ifdef SAMRAI_HAVE_SYS_TIMES_H
602602
// Without MPI, use POSIX time.
603603
struct tms tmp_tms;
604604
clock_t clock_ticks_since_reference = times(&tmp_tms);

source/SAMRAI/tbox/Scanner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#define YY_FLEX_MINOR_VERSION 5
4343

4444
#include <stdio.h>
45-
#ifdef HAVE_UNISTD_H
45+
#ifdef SAMRAI_HAVE_UNISTD_H
4646
#include <unistd.h>
4747
#endif
4848

source/SAMRAI/tbox/scanner_fixup.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
s/.*Date:.*//;
1616
s/.*Header:.*//;
1717

18-
s/#include <unistd.h>/#ifdef HAVE_UNISTD_H\n#include <unistd.h>\n#endif/;
18+
s/#include <unistd.h>/#ifdef SAMRAI_HAVE_UNISTD_H\n#include <unistd.h>\n#endif/;
1919

2020
# substitution to replace [yylval] with SAMRAI_[yylval]
2121
s/yylval/SAMRAI_yylval/g;

tools/restart/main.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <string>
2626
#include <cstring>
2727

28-
#ifdef HAVE_UNISTD_H
28+
#ifdef SAMRAI_HAVE_UNISTD_H
2929
#include <unistd.h>
3030
#endif
3131

0 commit comments

Comments
 (0)