From: Gurusamy Sarathy Date: Mon, 6 Apr 1998 20:21:20 +0000 (+0000) Subject: [win32] make old DomainName() implementation the default (so Win95 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c9208bc5764dada175aceff9d0b1938978d7db6;p=p5sagit%2Fp5-mst-13.2.git [win32] make old DomainName() implementation the default (so Win95 is happy) p4raw-id: //depot/win32/perl@883 --- diff --git a/win32/win32.c b/win32/win32.c index af7c4a8..82b45b9 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;