From 8c9208bc5764dada175aceff9d0b1938978d7db6 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Mon, 6 Apr 1998 20:21:20 +0000 Subject: [win32] make old DomainName() implementation the default (so Win95 is happy) p4raw-id: //depot/win32/perl@883 --- win32/win32.c | 8 +++++--- 1 file 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; -- cgit v1.2.1