Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Don't abuse X86 and X86_64 to make bitness-based decisions; use D_LP6…
Browse files Browse the repository at this point in the history
…4 instead.
  • Loading branch information
alexrp committed Dec 1, 2011
1 parent c2a567c commit 8231b4c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/core/stdc/inttypes.d
Expand Up @@ -192,7 +192,7 @@ enum _cstr SCNxFAST16 = "x";
enum _cstr SCNxFAST32 = "lx";
enum _cstr SCNxFAST64 = "llx";

version( X86_64 )
version( D_LP64 )
{
enum _cstr PRIdMAX = PRId64;
enum _cstr PRIiMAX = PRIi64;
Expand Down
2 changes: 1 addition & 1 deletion src/core/stdc/stdint.d
Expand Up @@ -60,7 +60,7 @@ alias uint uint_fast16_t;
alias uint uint_fast32_t;
alias ulong uint_fast64_t;

version( X86_64 )
version( D_LP64 )
{
alias long intptr_t;
alias ulong uintptr_t;
Expand Down
24 changes: 12 additions & 12 deletions src/core/sys/posix/sys/types.d
Expand Up @@ -169,28 +169,28 @@ pthread_t

version( linux )
{
version(X86)
version(D_LP64)
{
enum __SIZEOF_PTHREAD_ATTR_T = 36;
enum __SIZEOF_PTHREAD_MUTEX_T = 24;
enum __SIZEOF_PTHREAD_ATTR_T = 56;
enum __SIZEOF_PTHREAD_MUTEX_T = 40;
enum __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
enum __SIZEOF_PTHREAD_COND_T = 48;
enum __SIZEOF_PTHREAD_CONDATTR_T = 4;
enum __SIZEOF_PTHREAD_RWLOCK_T = 32;
enum __SIZEOF_PTHREAD_RWLOCK_T = 56;
enum __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
enum __SIZEOF_PTHREAD_BARRIER_T = 20;
enum __SIZEOF_PTHREAD_BARRIER_T = 32;
enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
}
else version(X86_64)
else
{
enum __SIZEOF_PTHREAD_ATTR_T = 56;
enum __SIZEOF_PTHREAD_MUTEX_T = 40;
enum __SIZEOF_PTHREAD_ATTR_T = 36;
enum __SIZEOF_PTHREAD_MUTEX_T = 24;
enum __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
enum __SIZEOF_PTHREAD_COND_T = 48;
enum __SIZEOF_PTHREAD_CONDATTR_T = 4;
enum __SIZEOF_PTHREAD_RWLOCK_T = 56;
enum __SIZEOF_PTHREAD_RWLOCK_T = 32;
enum __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
enum __SIZEOF_PTHREAD_BARRIER_T = 32;
enum __SIZEOF_PTHREAD_BARRIER_T = 20;
enum __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
}

Expand Down Expand Up @@ -254,7 +254,7 @@ version( linux )
}
else version( OSX )
{
version( X86_64 )
version( D_LP64 )
{
enum __PTHREAD_SIZE__ = 1168;
enum __PTHREAD_ATTR_SIZE__ = 56;
Expand All @@ -266,7 +266,7 @@ else version( OSX )
enum __PTHREAD_RWLOCK_SIZE__ = 192;
enum __PTHREAD_RWLOCKATTR_SIZE__ = 16;
}
else version( X86 )
else
{
enum __PTHREAD_SIZE__ = 596;
enum __PTHREAD_ATTR_SIZE__ = 36;
Expand Down
2 changes: 1 addition & 1 deletion src/object_.d
Expand Up @@ -42,7 +42,7 @@ private
//alias typeof(int.sizeof) size_t;
//alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t;

version(X86_64)
version(D_LP64)
{
alias ulong size_t;
alias long ptrdiff_t;
Expand Down
2 changes: 1 addition & 1 deletion src/rt/aaA.d
Expand Up @@ -104,7 +104,7 @@ struct AA

size_t aligntsize(size_t tsize)
{
version (X86_64)
version (D_LP64)
// Size of key needed to align value on 16 bytes
return (tsize + 15) & ~(15);
else
Expand Down

0 comments on commit 8231b4c

Please sign in to comment.