summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-03-23 00:29:38 (GMT)
committerGitHub <noreply@github.com>2023-03-23 00:29:38 (GMT)
commit98728706dd800e365cee6f601873b515e5f8822c (patch)
tree59f0d330a2543a9aaddf7de2dd2e7a939d2a810e
parent7ed1deb00f6fdc49aa48632096a8596f55cdf57f (diff)
downloadhdf5-98728706dd800e365cee6f601873b515e5f8822c.zip
hdf5-98728706dd800e365cee6f601873b515e5f8822c.tar.gz
hdf5-98728706dd800e365cee6f601873b515e5f8822c.tar.bz2
Remove getlogin work-arounds (#2620)
Unused in the library
-rwxr-xr-xbin/checkposix2
-rw-r--r--src/H5private.h3
-rw-r--r--src/H5system.c16
-rw-r--r--src/H5win32defs.h2
4 files changed, 1 insertions, 22 deletions
diff --git a/bin/checkposix b/bin/checkposix
index c8dc18a..fc01a49 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -134,7 +134,7 @@ foreach $arg (@ARGV) {
# These are Windows system calls. Ignore them.
next if $name =~ /^(_get_osfhandle|GetFileInformationByHandle|SetFilePointer|GetLastError|SetEndOfFile)$/;
- next if $name =~ /^(FindNextFile|FindClose|_tzset|Wgettimeofday|GetSystemTimeAsFileTime|Wgetlogin|GetUserName)$/;
+ next if $name =~ /^(FindNextFile|FindClose|_tzset|Wgettimeofday|GetSystemTimeAsFileTime|GetUserName)$/;
next if $name =~ /^(DeleteCriticalSection|TlsFree|TlsGetValue|CreateThread)$/;
next if $name =~ /^(ExpandEnvironmentStringsA|LockFileEx|UnlockFileEx)$/;
next if $name =~ /^(DllMain|LocalAlloc|LocalFree)$/;
diff --git a/src/H5private.h b/src/H5private.h
index ecb7726..42a605e 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -890,9 +890,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDgethostname
#define HDgethostname(N, L) gethostname(N, L)
#endif
-#ifndef HDgetlogin
-#define HDgetlogin() getlogin()
-#endif
#ifndef HDgetpgrp
#define HDgetpgrp() getpgrp()
#endif
diff --git a/src/H5system.c b/src/H5system.c
index d74bfcf..08a039b 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -442,22 +442,6 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
} /* end H5_get_win32_times() */
#endif
-#define WloginBuffer_count 256
-static char Wlogin_buffer[WloginBuffer_count];
-
-char *
-Wgetlogin(void)
-{
-
-#ifdef H5_HAVE_WIN32_API
- DWORD bufferCount = WloginBuffer_count;
- if (GetUserName(Wlogin_buffer, &bufferCount) != 0)
- return (Wlogin_buffer);
- else
-#endif
- return NULL;
-}
-
/*-------------------------------------------------------------------------
* Function: Wflock
*
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 95829de..659adf1 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -53,7 +53,6 @@ struct timezone {
#define HDgetcwd(S, Z) _getcwd(S, Z)
#define HDgetdcwd(D, S, Z) _getdcwd(D, S, Z)
#define HDgetdrive() _getdrive()
-#define HDgetlogin() Wgetlogin()
#define HDgettimeofday(V, Z) Wgettimeofday(V, Z)
#define HDisatty(F) _isatty(F)
#define HDlseek(F, O, W) _lseeki64(F, O, W)
@@ -100,7 +99,6 @@ extern "C" {
H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
H5_DLL int Wsetenv(const char *name, const char *value, int overwrite);
H5_DLL int Wflock(int fd, int operation);
-H5_DLL char *Wgetlogin(void);
H5_DLL herr_t H5_expand_windows_env_vars(char **env_var);
H5_DLL wchar_t *H5_get_utf16_str(const char *s);
H5_DLL int Wopen_utf8(const char *path, int oflag, ...);