include: Add a macro to paper over LP64/LLP64 differences for numeric constants.

Based on an idea by Kai Tietz.
This commit is contained in:
Michael Stefaniuc 2011-10-26 23:45:45 +02:00 committed by Alexandre Julliard
parent c5441514bc
commit 1b2f89e673
1 changed files with 84 additions and 75 deletions

View File

@ -497,6 +497,15 @@ typedef BYTE FCHAR;
typedef WORD FSHORT;
typedef DWORD FLONG;
/* Macro to deal with LP64 <=> LLP64 differences in numeric constants with 'l' modifier */
#ifndef __MSABI_LONG
# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)
# define __MSABI_LONG(x) x ## l
# else
# define __MSABI_LONG(x) x
# endif
#endif
/* Defines */
#ifndef WIN32_NO_STATUS
@ -4105,9 +4114,9 @@ typedef struct _SID_AND_ATTRIBUTES {
} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES;
/* security entities */
#define SECURITY_NULL_RID (0x00000000L)
#define SECURITY_WORLD_RID (0x00000000L)
#define SECURITY_LOCAL_RID (0X00000000L)
#define SECURITY_NULL_RID __MSABI_LONG(0x00000000)
#define SECURITY_WORLD_RID __MSABI_LONG(0x00000000)
#define SECURITY_LOCAL_RID __MSABI_LONG(0X00000000)
#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
@ -4119,97 +4128,97 @@ typedef struct _SID_AND_ATTRIBUTES {
/* S-1-3 */
#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
#define SECURITY_CREATOR_OWNER_RID (0x00000000L)
#define SECURITY_CREATOR_GROUP_RID (0x00000001L)
#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
#define SECURITY_CREATOR_OWNER_RID __MSABI_LONG(0x00000000)
#define SECURITY_CREATOR_GROUP_RID __MSABI_LONG(0x00000001)
#define SECURITY_CREATOR_OWNER_SERVER_RID __MSABI_LONG(0x00000002)
#define SECURITY_CREATOR_GROUP_SERVER_RID __MSABI_LONG(0x00000003)
/* S-1-4 */
#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
/* S-1-5 */
#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
#define SECURITY_DIALUP_RID 0x00000001L
#define SECURITY_NETWORK_RID 0x00000002L
#define SECURITY_BATCH_RID 0x00000003L
#define SECURITY_INTERACTIVE_RID 0x00000004L
#define SECURITY_LOGON_IDS_RID 0x00000005L
#define SECURITY_SERVICE_RID 0x00000006L
#define SECURITY_ANONYMOUS_LOGON_RID 0x00000007L
#define SECURITY_PROXY_RID 0x00000008L
#define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x00000009L
#define SECURITY_DIALUP_RID __MSABI_LONG(0x00000001)
#define SECURITY_NETWORK_RID __MSABI_LONG(0x00000002)
#define SECURITY_BATCH_RID __MSABI_LONG(0x00000003)
#define SECURITY_INTERACTIVE_RID __MSABI_LONG(0x00000004)
#define SECURITY_LOGON_IDS_RID __MSABI_LONG(0x00000005)
#define SECURITY_SERVICE_RID __MSABI_LONG(0x00000006)
#define SECURITY_ANONYMOUS_LOGON_RID __MSABI_LONG(0x00000007)
#define SECURITY_PROXY_RID __MSABI_LONG(0x00000008)
#define SECURITY_ENTERPRISE_CONTROLLERS_RID __MSABI_LONG(0x00000009)
#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
#define SECURITY_PRINCIPAL_SELF_RID 0x0000000AL
#define SECURITY_AUTHENTICATED_USER_RID 0x0000000BL
#define SECURITY_RESTRICTED_CODE_RID 0x0000000CL
#define SECURITY_TERMINAL_SERVER_RID 0x0000000DL
#define SECURITY_REMOTE_LOGON_RID 0x0000000EL
#define SECURITY_THIS_ORGANIZATION_RID 0x0000000FL
#define SECURITY_LOCAL_SYSTEM_RID 0x00000012L
#define SECURITY_LOCAL_SERVICE_RID 0x00000013L
#define SECURITY_NETWORK_SERVICE_RID 0x00000014L
#define SECURITY_NT_NON_UNIQUE 0x00000015L
#define SECURITY_BUILTIN_DOMAIN_RID 0x00000020L
#define SECURITY_PRINCIPAL_SELF_RID __MSABI_LONG(0x0000000A)
#define SECURITY_AUTHENTICATED_USER_RID __MSABI_LONG(0x0000000B)
#define SECURITY_RESTRICTED_CODE_RID __MSABI_LONG(0x0000000C)
#define SECURITY_TERMINAL_SERVER_RID __MSABI_LONG(0x0000000D)
#define SECURITY_REMOTE_LOGON_RID __MSABI_LONG(0x0000000E)
#define SECURITY_THIS_ORGANIZATION_RID __MSABI_LONG(0x0000000F)
#define SECURITY_LOCAL_SYSTEM_RID __MSABI_LONG(0x00000012)
#define SECURITY_LOCAL_SERVICE_RID __MSABI_LONG(0x00000013)
#define SECURITY_NETWORK_SERVICE_RID __MSABI_LONG(0x00000014)
#define SECURITY_NT_NON_UNIQUE __MSABI_LONG(0x00000015)
#define SECURITY_BUILTIN_DOMAIN_RID __MSABI_LONG(0x00000020)
#define SECURITY_PACKAGE_BASE_RID 0x00000040L
#define SECURITY_PACKAGE_NTLM_RID 0x0000000AL
#define SECURITY_PACKAGE_SCHANNEL_RID 0x0000000EL
#define SECURITY_PACKAGE_DIGEST_RID 0x00000015L
#define SECURITY_MAX_ALWAYS_FILTERED 0x000003E7L
#define SECURITY_MIN_NEVER_FILTERED 0x000003E8L
#define SECURITY_OTHER_ORGANIZATION_RID 0x000003E8L
#define SECURITY_PACKAGE_BASE_RID __MSABI_LONG(0x00000040)
#define SECURITY_PACKAGE_NTLM_RID __MSABI_LONG(0x0000000A)
#define SECURITY_PACKAGE_SCHANNEL_RID __MSABI_LONG(0x0000000E)
#define SECURITY_PACKAGE_DIGEST_RID __MSABI_LONG(0x00000015)
#define SECURITY_MAX_ALWAYS_FILTERED __MSABI_LONG(0x000003E7)
#define SECURITY_MIN_NEVER_FILTERED __MSABI_LONG(0x000003E8)
#define SECURITY_OTHER_ORGANIZATION_RID __MSABI_LONG(0x000003E8)
#define FOREST_USER_RID_MAX 0x000001F3L
#define DOMAIN_USER_RID_ADMIN 0x000001F4L
#define DOMAIN_USER_RID_GUEST 0x000001F5L
#define DOMAIN_USER_RID_KRBTGT 0x000001F6L
#define DOMAIN_USER_RID_MAX 0x000003E7L
#define FOREST_USER_RID_MAX __MSABI_LONG(0x000001F3)
#define DOMAIN_USER_RID_ADMIN __MSABI_LONG(0x000001F4)
#define DOMAIN_USER_RID_GUEST __MSABI_LONG(0x000001F5)
#define DOMAIN_USER_RID_KRBTGT __MSABI_LONG(0x000001F6)
#define DOMAIN_USER_RID_MAX __MSABI_LONG(0x000003E7)
#define DOMAIN_GROUP_RID_ADMINS 0x00000200L
#define DOMAIN_GROUP_RID_USERS 0x00000201L
#define DOMAIN_GROUP_RID_GUESTS 0x00000202L
#define DOMAIN_GROUP_RID_COMPUTERS 0x00000203L
#define DOMAIN_GROUP_RID_CONTROLLERS 0x00000204L
#define DOMAIN_GROUP_RID_CERT_ADMINS 0x00000205L
#define DOMAIN_GROUP_RID_SCHEMA_ADMINS 0x00000206L
#define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS 0x00000207L
#define DOMAIN_GROUP_RID_POLICY_ADMINS 0x00000208L
#define DOMAIN_GROUP_RID_ADMINS __MSABI_LONG(0x00000200)
#define DOMAIN_GROUP_RID_USERS __MSABI_LONG(0x00000201)
#define DOMAIN_GROUP_RID_GUESTS __MSABI_LONG(0x00000202)
#define DOMAIN_GROUP_RID_COMPUTERS __MSABI_LONG(0x00000203)
#define DOMAIN_GROUP_RID_CONTROLLERS __MSABI_LONG(0x00000204)
#define DOMAIN_GROUP_RID_CERT_ADMINS __MSABI_LONG(0x00000205)
#define DOMAIN_GROUP_RID_SCHEMA_ADMINS __MSABI_LONG(0x00000206)
#define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS __MSABI_LONG(0x00000207)
#define DOMAIN_GROUP_RID_POLICY_ADMINS __MSABI_LONG(0x00000208)
#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16}
#define SECURITY_MANDATORY_UNTRUSTED_RID 0x00000000L
#define SECURITY_MANDATORY_LOW_RID 0x00001000L
#define SECURITY_MANDATORY_MEDIUM_RID 0x00002000L
#define SECURITY_MANDATORY_HIGH_RID 0x00003000L
#define SECURITY_MANDATORY_SYSTEM_RID 0x00004000L
#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID 0x00005000L
#define SECURITY_MANDATORY_UNTRUSTED_RID __MSABI_LONG(0x00000000)
#define SECURITY_MANDATORY_LOW_RID __MSABI_LONG(0x00001000)
#define SECURITY_MANDATORY_MEDIUM_RID __MSABI_LONG(0x00002000)
#define SECURITY_MANDATORY_HIGH_RID __MSABI_LONG(0x00003000)
#define SECURITY_MANDATORY_SYSTEM_RID __MSABI_LONG(0x00004000)
#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID __MSABI_LONG(0x00005000)
#define DOMAIN_ALIAS_RID_ADMINS 0x00000220L
#define DOMAIN_ALIAS_RID_USERS 0x00000221L
#define DOMAIN_ALIAS_RID_GUESTS 0x00000222L
#define DOMAIN_ALIAS_RID_POWER_USERS 0x00000223L
#define DOMAIN_ALIAS_RID_ADMINS __MSABI_LONG(0x00000220)
#define DOMAIN_ALIAS_RID_USERS __MSABI_LONG(0x00000221)
#define DOMAIN_ALIAS_RID_GUESTS __MSABI_LONG(0x00000222)
#define DOMAIN_ALIAS_RID_POWER_USERS __MSABI_LONG(0x00000223)
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS 0x00000224L
#define DOMAIN_ALIAS_RID_SYSTEM_OPS 0x00000225L
#define DOMAIN_ALIAS_RID_PRINT_OPS 0x00000226L
#define DOMAIN_ALIAS_RID_BACKUP_OPS 0x00000227L
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS __MSABI_LONG(0x00000224)
#define DOMAIN_ALIAS_RID_SYSTEM_OPS __MSABI_LONG(0x00000225)
#define DOMAIN_ALIAS_RID_PRINT_OPS __MSABI_LONG(0x00000226)
#define DOMAIN_ALIAS_RID_BACKUP_OPS __MSABI_LONG(0x00000227)
#define DOMAIN_ALIAS_RID_REPLICATOR 0x00000228L
#define DOMAIN_ALIAS_RID_RAS_SERVERS 0x00000229L
#define DOMAIN_ALIAS_RID_PREW2KCOMPACCESS 0x0000022AL
#define DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS 0x0000022BL
#define DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS 0x0000022CL
#define DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS 0x0000022DL
#define DOMAIN_ALIAS_RID_REPLICATOR __MSABI_LONG(0x00000228)
#define DOMAIN_ALIAS_RID_RAS_SERVERS __MSABI_LONG(0x00000229)
#define DOMAIN_ALIAS_RID_PREW2KCOMPACCESS __MSABI_LONG(0x0000022A)
#define DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS __MSABI_LONG(0x0000022B)
#define DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS __MSABI_LONG(0x0000022C)
#define DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS __MSABI_LONG(0x0000022D)
#define DOMAIN_ALIAS_RID_MONITORING_USERS 0x0000022EL
#define DOMAIN_ALIAS_RID_LOGGING_USERS 0x0000022FL
#define DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS 0x00000230L
#define DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS 0x00000231L
#define DOMAIN_ALIAS_RID_DCOM_USERS 0x00000232L
#define DOMAIN_ALIAS_RID_MONITORING_USERS __MSABI_LONG(0x0000022E)
#define DOMAIN_ALIAS_RID_LOGGING_USERS __MSABI_LONG(0x0000022F)
#define DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS __MSABI_LONG(0x00000230)
#define DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS __MSABI_LONG(0x00000231)
#define DOMAIN_ALIAS_RID_DCOM_USERS __MSABI_LONG(0x00000232)
#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
#define SECURITY_PACKAGE_RID_COUNT 2L
#define SECURITY_LOGON_IDS_RID_COUNT 3L
#define SECURITY_PACKAGE_RID_COUNT __MSABI_LONG(2)
#define SECURITY_LOGON_IDS_RID_COUNT __MSABI_LONG(3)
typedef enum {
WinNullSid = 0,