implement and use a platform neutral abstraction of unsetenv(3)

This commit is contained in:
Axel Kohlmeyer
2021-11-03 10:53:10 -04:00
parent 515ef7bece
commit 50f39cd752
5 changed files with 41 additions and 9 deletions

View File

@ -363,11 +363,7 @@ TEST(LAMMPS_init, NoOpenMP)
FILE *fp = fopen("in.lammps_class_noomp", "w");
fputs("\n", fp);
fclose(fp);
#if defined(__WIN32)
_putenv("OMP_NUM_THREADS");
#else
unsetenv("OMP_NUM_THREADS");
#endif
platform::unsetenv("OMP_NUM_THREADS");
const char *args[] = {"LAMMPS_init", "-in", "in.lammps_class_noomp", "-log", "none", "-nocite"};
char **argv = (char **)args;