|
50 | 50 | #include <ctype.h> |
51 | 51 | #include <float.h> |
52 | 52 | #include <sys/stat.h> |
53 | | -#include <signal.h> |
54 | | -#include <stdio.h> |
55 | | -#include <errno.h> |
| 53 | +#include <csignal> |
| 54 | +#include <cstdio> |
| 55 | +#include <cerrno> |
56 | 56 | #include <lm.h> |
57 | 57 | #include <dbghelp.h> |
58 | 58 | #include <Tlhelp32.h> |
|
61 | 61 | #include <list> |
62 | 62 | #include <shlobj.h> |
63 | 63 | #include <conio.h> |
64 | | -#include <time.h> |
| 64 | +#include <ctime> |
65 | 65 | #include <bcrypt.h> |
66 | 66 | #include <chrono> |
67 | 67 | #include <thread> |
@@ -827,7 +827,7 @@ namespace { |
827 | 827 | // determine the fileopen.C file path: |
828 | 828 | TString fileopen = "fileopen.C"; |
829 | 829 | TString rootmacrodir = "macros"; |
830 | | - sys->PrependPathName(getenv("ROOTSYS"), rootmacrodir); |
| 830 | + sys->PrependPathName(std::getenv("ROOTSYS"), rootmacrodir); |
831 | 831 | sys->PrependPathName(rootmacrodir.Data(), fileopen); |
832 | 832 |
|
833 | 833 | if (regROOTwrite) { |
@@ -1283,7 +1283,7 @@ Int_t TWinNTSystem::GetCryptoRandom(void *buf, Int_t len) |
1283 | 1283 | const char *TWinNTSystem::HostName() |
1284 | 1284 | { |
1285 | 1285 | if (fHostname == "") |
1286 | | - fHostname = ::getenv("COMPUTERNAME"); |
| 1286 | + fHostname = std::getenv("COMPUTERNAME"); |
1287 | 1287 | if (fHostname == "") { |
1288 | 1288 | // This requires a DNS query - but we need it for fallback |
1289 | 1289 | char hn[64]; |
@@ -2225,23 +2225,23 @@ std::string TWinNTSystem::GetHomeDirectory(const char *userName) const |
2225 | 2225 | void TWinNTSystem::FillWithHomeDirectory(const char *userName, char *mydir) const |
2226 | 2226 | { |
2227 | 2227 | const char *h = nullptr; |
2228 | | - if (!(h = ::getenv("home"))) h = ::getenv("HOME"); |
| 2228 | + if (!(h = std::getenv("home"))) h = std::getenv("HOME"); |
2229 | 2229 |
|
2230 | 2230 | if (h) { |
2231 | 2231 | strlcpy(mydir, h,kMAXPATHLEN); |
2232 | 2232 | } else { |
2233 | 2233 | // for Windows NT HOME might be defined as either $(HOMESHARE)/$(HOMEPATH) |
2234 | 2234 | // or $(HOMEDRIVE)/$(HOMEPATH) |
2235 | | - h = ::getenv("HOMESHARE"); |
2236 | | - if (!h) h = ::getenv("HOMEDRIVE"); |
| 2235 | + h = std::getenv("HOMESHARE"); |
| 2236 | + if (!h) h = std::getenv("HOMEDRIVE"); |
2237 | 2237 | if (h) { |
2238 | 2238 | strlcpy(mydir, h,kMAXPATHLEN); |
2239 | | - h = ::getenv("HOMEPATH"); |
| 2239 | + h = std::getenv("HOMEPATH"); |
2240 | 2240 | if(h) strlcat(mydir, h,kMAXPATHLEN); |
2241 | 2241 | } |
2242 | 2242 | // on Windows Vista HOME is usually defined as $(USERPROFILE) |
2243 | 2243 | if (!h) { |
2244 | | - h = ::getenv("USERPROFILE"); |
| 2244 | + h = std::getenv("USERPROFILE"); |
2245 | 2245 | if (h) strlcpy(mydir, h,kMAXPATHLEN); |
2246 | 2246 | } |
2247 | 2247 | } |
@@ -3861,7 +3861,7 @@ void TWinNTSystem::Setenv(const char *name, const char *value) |
3861 | 3861 |
|
3862 | 3862 | const char *TWinNTSystem::Getenv(const char *name) |
3863 | 3863 | { |
3864 | | - const char *env = ::getenv(name); |
| 3864 | + const char *env = std::getenv(name); |
3865 | 3865 | if (!env) { |
3866 | 3866 | if (::_stricmp(name,"home") == 0 ) { |
3867 | 3867 | env = HomeDirectory(); |
|
0 commit comments