Skip to content

Commit cc9d72b

Browse files
committed
Fixes name collisions on Windows
Undefines min/max macros to avoid potential name collisions with standard library functions, specifically on Windows. Also, it corrects an include path for CRandom.h to ensure proper compilation.
1 parent a9b5890 commit cc9d72b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

copasi/randomGenerator/CRandom.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019 - 2025 by Pedro Mendes, Rector and Visitors of the
1+
// Copyright (C) 2019 - 2026 by Pedro Mendes, Rector and Visitors of the
22
// University of Virginia, University of Heidelberg, and University
33
// of Connecticut School of Medicine.
44
// All rights reserved.
@@ -31,6 +31,12 @@
3131
# define WIN32_LEAN_AND_MEAN
3232
# endif // WIN32_LEAN_AND_MEAN
3333
# include <windows.h>
34+
# ifdef min
35+
# undef min
36+
# endif // min
37+
# ifdef max
38+
# undef max
39+
# endif // max
3440
#else
3541
# include <unistd.h>
3642
# include <sys/syscall.h>
@@ -41,7 +47,7 @@
4147
#include <string.h>
4248

4349
#include "copasi/copasi.h"
44-
#include "CRandom.h"
50+
#include "copasi/randomGenerator/CRandom.h"
4551
#include "copasi/utilities/CCopasiMessage.h"
4652
#include "copasi/utilities/CopasiTime.h"
4753

0 commit comments

Comments
 (0)