From: Corinna Vinschen Date: Mon, 9 Oct 2000 09:51:46 +0000 (+0000) Subject: * include/iprtrmib.h: Further layout changes according to standard. X-Git-Tag: newlib-1_9_0~288 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b9e7a2b6662bcfef28b6fafddfeb9ff1e00ac5f5;p=newlib-cygwin.git * include/iprtrmib.h: Further layout changes according to standard. * include/iptypes.h: Ditto. * include/ntdef.h: Ditto. * include/ntsecapi.h: Ditto. * include/subauth.h: Ditto. --- diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index 2c0dee83c..9f87360a2 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,11 @@ +Mon Oct 9 11:49:00 2000 Corinna Vinschen + + * include/iprtrmib.h: Further layout changes according to standard. + * include/iptypes.h: Ditto. + * include/ntdef.h: Ditto. + * include/ntsecapi.h: Ditto. + * include/subauth.h: Ditto. + Mon Oct 9 11:32:00 2000 Corinna Vinschen * include/ntsecapi.h: Fix PLSA_UNICODE_STRING define. diff --git a/winsup/w32api/include/iprtrmib.h b/winsup/w32api/include/iprtrmib.h index cb30ef836..c8c7bea7f 100644 --- a/winsup/w32api/include/iprtrmib.h +++ b/winsup/w32api/include/iprtrmib.h @@ -32,9 +32,9 @@ extern "C" { #define MIB_TCP_STATE_LAST_ACK 10 #define MIB_TCP_STATE_TIME_WAIT 11 #define MIB_TCP_STATE_DELETE_TCB 12 -#define MIB_USE_CURRENT_TTL ((DWORD) -1) -#define MIB_USE_CURRENT_FORWARDING ((DWORD) -1) -#define MIB_TCP_MAXCONN_DYNAMIC ((DWORD) -1) +#define MIB_USE_CURRENT_TTL ((DWORD)-1) +#define MIB_USE_CURRENT_FORWARDING ((DWORD)-1) +#define MIB_TCP_MAXCONN_DYNAMIC ((DWORD)-1) typedef struct { DWORD dwAddr; DWORD dwIndex; diff --git a/winsup/w32api/include/iptypes.h b/winsup/w32api/include/iptypes.h index 83c5dd4e8..2b94553a7 100644 --- a/winsup/w32api/include/iptypes.h +++ b/winsup/w32api/include/iptypes.h @@ -21,15 +21,15 @@ extern "C" { #define IF_PPP_ADAPTERTYPE 4 #define IF_LOOPBACK_ADAPTERTYPE 5 typedef struct { - char String[4 * 4]; + char String[16]; } IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; -typedef struct __IP_ADDR_STRING { +typedef struct _IP_ADDR_STRING { struct __IP_ADDR_STRING* Next; IP_ADDRESS_STRING IpAddress; IP_MASK_STRING IpMask; DWORD Context; } IP_ADDR_STRING, *PIP_ADDR_STRING; -typedef struct __IP_ADAPTER_INFO { +typedef struct _IP_ADAPTER_INFO { struct __IP_ADAPTER_INFO* Next; DWORD ComboIndex; char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]; @@ -49,13 +49,13 @@ typedef struct __IP_ADAPTER_INFO { time_t LeaseObtained; time_t LeaseExpires; } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; -typedef struct { - char HostName[MAX_HOSTNAME_LEN + 4] ; - char DomainName[MAX_DOMAIN_NAME_LEN + 4]; +typedef struct _FIXED_INFO { + char HostName[MAX_HOSTNAME_LEN+4] ; + char DomainName[MAX_DOMAIN_NAME_LEN+4]; PIP_ADDR_STRING CurrentDnsServer; IP_ADDR_STRING DnsServerList; UINT NodeType; - char ScopeId[MAX_SCOPE_ID_LEN + 4]; + char ScopeId[MAX_SCOPE_ID_LEN+4]; UINT EnableRouting; UINT EnableProxy; UINT EnableDns; diff --git a/winsup/w32api/include/ntdef.h b/winsup/w32api/include/ntdef.h index a192a78d7..f4f990747 100644 --- a/winsup/w32api/include/ntdef.h +++ b/winsup/w32api/include/ntdef.h @@ -9,15 +9,17 @@ #define OBJ_OPENLINK 256L #define OBJ_VALID_ATTRIBUTES 498L #define InitializeObjectAttributes(p,n,a,r,s) { \ - (p)->Length = sizeof( OBJECT_ATTRIBUTES ); \ - (p)->RootDirectory = r; \ - (p)->Attributes = a; \ - (p)->ObjectName = n; \ - (p)->SecurityDescriptor = s; \ + (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ + (p)->RootDirectory = (r); \ + (p)->Attributes = (a); \ + (p)->ObjectName = (n); \ + (p)->SecurityDescriptor = (s); \ (p)->SecurityQualityOfService = NULL; \ } -#define STATUS_SUCCESS ((NTSTATUS)0) +#ifndef NT_SUCCESS #define NT_SUCCESS(x) ((x)>=0) +#define STATUS_SUCCESS ((NTSTATUS)0) +#endif #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H) typedef LONG NTSTATUS, *PNTSTATUS; typedef struct _UNICODE_STRING { @@ -25,7 +27,7 @@ typedef struct _UNICODE_STRING { USHORT MaximumLength; PWSTR Buffer; } UNICODE_STRING, *PUNICODE_STRING; -typedef struct __STRING { +typedef struct _STRING { USHORT Length; USHORT MaximumLength; PCHAR Buffer; diff --git a/winsup/w32api/include/ntsecapi.h b/winsup/w32api/include/ntsecapi.h index 07733a2b6..0531f47c8 100644 --- a/winsup/w32api/include/ntsecapi.h +++ b/winsup/w32api/include/ntsecapi.h @@ -18,7 +18,7 @@ extern "C" { #define LSA_MODE_INDIVIDUAL_ACCOUNTS 2 #define LSA_MODE_MANDATORY_ACCESS 3 #define LSA_MODE_LOG_FULL 4 -#define LSA_SUCCESS(Error) ((LONG)(Error) >= 0) +#define LSA_SUCCESS(x) ((LONG)(x)>=0) #define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 32 #define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 2048 #define MSV1_0_CHALLENGE_LENGTH 8 @@ -33,11 +33,11 @@ extern "C" { #define MSV1_0_MNS_LOGON 16777216 #define MSV1_0_NTLM3_RESPONSE_LENGTH 16 #define MSV1_0_NTLM3_OWF_LENGTH 16 -#define MSV1_0_NTLM3_INPUT_LENGTH (sizeof(MSV1_0_NTLM3_RESPONSE) - MSV1_0_NTLM3_RESPONSE_LENGTH) +#define MSV1_0_NTLM3_INPUT_LENGTH (sizeof(MSV1_0_NTLM3_RESPONSE)-MSV1_0_NTLM3_RESPONSE_LENGTH) #define MSV1_0_OWF_PASSWORD_LENGTH 16 #define MSV1_0_PACKAGE_NAME "MICROSOFT_AUTHENTICATION_PACKAGE_V1_0" #define MSV1_0_PACKAGE_NAMEW L"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0" -#define MSV1_0_PACKAGE_NAMEW_LENGTH sizeof(MSV1_0_PACKAGE_NAMEW) - sizeof(WCHAR) +#define MSV1_0_PACKAGE_NAMEW_LENGTH sizeof(MSV1_0_PACKAGE_NAMEW)-sizeof(WCHAR) #define MSV1_0_RETURN_USER_PARAMETERS 8 #define MSV1_0_RETURN_PASSWORD_EXPIRY 64 #define MSV1_0_RETURN_PROFILE_PATH 512 diff --git a/winsup/w32api/include/subauth.h b/winsup/w32api/include/subauth.h index 67f25c319..b31a4bab7 100644 --- a/winsup/w32api/include/subauth.h +++ b/winsup/w32api/include/subauth.h @@ -4,7 +4,8 @@ extern "C" { #endif #ifndef NT_SUCCESS -#define NT_SUCCESS(Status) ((Status) >= 0) +#define NT_SUCCESS(x) ((x)>=0) +#define STATUS_SUCCESS 0 #endif #define CYPHER_BLOCK_LENGTH 8 #define USER_SESSION_KEY_LENGTH (CYPHER_BLOCK_LENGTH*2) @@ -30,7 +31,6 @@ extern "C" { #define SAM_DAYS_PER_WEEK 7 #define SAM_HOURS_PER_WEEK 168 #define SAM_MINUTES_PER_WEEK 10080 -#define STATUS_SUCCESS 0 #define STATUS_INVALID_INFO_CLASS 0xC0000003L #define STATUS_NO_SUCH_USER 0xC0000064L #define STATUS_WRONG_PASSWORD 0xC000006AL @@ -67,9 +67,6 @@ extern "C" { #define USER_ALL_PARAMETERS 2097152 #if !defined(_NTDEF_H) && !defined(_NTSECAPI_H) typedef LONG NTSTATUS, *PNTSTATUS; -#endif -typedef PVOID SAM_HANDLE, *PSAM_HANDLE; -#ifndef _NTSECAPI_H typedef struct _UNICODE_STRING { USHORT Length; USHORT MaximumLength; @@ -81,6 +78,7 @@ typedef struct _STRING { PCHAR Buffer; } STRING, *PSTRING; #endif +typedef PVOID SAM_HANDLE, *PSAM_HANDLE; typedef struct _OLD_LARGE_INTEGER { ULONG LowPart; LONG HighPart;