summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-04-06 20:21:20 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-04-06 20:21:20 +0000
commit8c9208bc5764dada175aceff9d0b1938978d7db6 (patch)
treed5765170f8b57dc50458323ce3287bf4a52afb07
parentfc80cf79f6ce54c5e5487bc877eda643ef0d8104 (diff)
downloadperl-8c9208bc5764dada175aceff9d0b1938978d7db6.tar.gz
[win32] make old DomainName() implementation the default (so Win95
is happy) p4raw-id: //depot/win32/perl@883
-rw-r--r--win32/win32.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c
index af7c4a8616..82b45b98b1 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1913,8 +1913,8 @@ static
XS(w32_DomainName)
{
dXSARGS;
-#ifdef __MINGW32__
- /* mingw32 doesn't have NetWksta*() yet, so do it the old way */
+#ifndef HAS_NETWKSTAGETINFO
+ /* mingw32 (and Win95) don't have NetWksta*(), so do it the old way */
char name[256];
DWORD size = sizeof(name);
if (GetUserName(name,&size)) {
@@ -1929,7 +1929,9 @@ XS(w32_DomainName)
}
}
#else
- /* this way is more reliable, in case user has a local account */
+ /* this way is more reliable, in case user has a local account.
+ * XXX need dynamic binding of netapi32.dll symbols or this will fail on
+ * Win95. Probably makes more sense to move it into libwin32. */
char dname[256];
DWORD dnamelen = sizeof(dname);
PWKSTA_INFO_100 pwi;