the compiler error looked like below, which was posted by Tim in the win32 testing thread.
> [exec] cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS > -FIsehmap.h -D_X86_=1 -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_WIN32_WINDOWS=0x0400 > /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400 -Zi -Od -WX -GF -Gs -MD > -Zm400 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS > -D_SCL_SECURE_NO_DEPRECATE -D_DLL -D_ > MT -D_WINSOCKAPI_ /ID:\java6\working_classlib\deploy\include > /ID:\java6\working_classlib\deploy\jdk\include /I. /I..\shared\ > -Fohelpers.obj helpers.c > [exec] helpers.c > [exec] helpers.c(65) : error C2365: 'IFTYPE' : redefinition; previous > definition was 'typedef' > [exec] C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\ipifcons.h(238) : see declaration of 'IFTYPE' > [exec] helpers.c(65) : error C2086: 'IFTYPE' : redefinition > [exec] helpers.c(65) : see declaration of 'IFTYPE' > [exec] helpers.c(737) : error C2275: 'IFTYPE' : illegal use of this type > as an expression > [exec] C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\ipifcons.h(238) : see declaration of 'IFTYPE' > [exec] helpers.c(737) : error C2046: illegal case > [exec] helpers.c(772) : error C2275: 'IFTYPE' : illegal use of this type > as an expression > [exec] C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\ipifcons.h(238) : see declaration of 'IFTYPE' > [exec] helpers.c(772) : error C2198: > 'getPlatformNetworkInterfaceAttribute' : too few arguments for call > [exec] helpers.c(777) : error C2275: 'IFTYPE' : illegal use of this type > as an expression > [exec] C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\ipifcons.h(238) : see declaration of 'IFTYPE' > [exec] helpers.c(777) : error C2198: > 'getPlatformNetworkInterfaceAttribute' : too few arguments for call > [exec] NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual > Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2' > [exec] Stop. On Tue, Dec 22, 2009 at 10:15 PM, Tony Wu <[email protected]> wrote: > Hi, > > This is a redefination error because VS2008 defines the IFTYPE too. > simply %s/IFTYPE/INTERFACTTYPE/g on helpers.c could fix it. > > Index: working_classlib/modules/luni/src/main/native/luni/windows/helpers.c > =================================================================== > --- working_classlib/modules/luni/src/main/native/luni/windows/helpers.c > (revision 893171) > +++ working_classlib/modules/luni/src/main/native/luni/windows/helpers.c > (working copy) > @@ -62,7 +62,7 @@ > I_32 getPlatformAttribute (JNIEnv * env, char *path, DWORD attribute); > typedef enum { > OPERSTAT, > - IFTYPE, > + INTERFACETYPE, > FLAGS, > MTU > }FLAGTYPE; > @@ -734,7 +734,7 @@ > case OPERSTAT: > isSet = > ((AdapterAddresses->Oper > Status & flag) == flag); > break; > - case IFTYPE: > + case INTERFACETYPE: > if(flag == IF_TYPE_PPP && > isIPv6 > ) > isSet = > ((AdapterAddress > es->IfType & IF_TYPE_TUNNEL) == IF_TYPE_TUNNEL); > else > @@ -769,12 +769,12 @@ > > jboolean getPlatformIsLoopback(JNIEnv * env, jstring ifname, jint jindex) > { > - return > getPlatformNetworkInterfaceAttribute(env,IFTYPE,jindex,IF_TYPE_SO > FTWARE_LOOPBACK); > + return > getPlatformNetworkInterfaceAttribute(env,INTERFACETYPE,jindex,IF_ > TYPE_SOFTWARE_LOOPBACK); > } > > jboolean getPlatformIsPoint2Point(JNIEnv * env, jstring ifname, jint jindex) > { > - return > getPlatformNetworkInterfaceAttribute(env,IFTYPE,jindex,IF_TYPE_PP > P); > + return > getPlatformNetworkInterfaceAttribute(env,INTERFACETYPE,jindex,IF_ > TYPE_PPP); > } > > -- > Tony Wu > China Software Development Lab, IBM > -- Tony Wu China Software Development Lab, IBM
