implement platform abstraction of unsetenv()

This commit is contained in:
Axel Kohlmeyer
2021-10-22 11:05:32 -04:00
parent 69f5e1feac
commit 5c9a4f4be0
5 changed files with 41 additions and 6 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;