Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Decking
GHC
Commits
5a3fdc0c
Commit
5a3fdc0c
authored
Apr 27, 2012
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on Win32, and handle the FMT_* #defines in a slightly nicer way
parent
d7b57949
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
20 deletions
+16
-20
includes/Rts.h
includes/Rts.h
+0
-13
includes/stg/Types.h
includes/stg/Types.h
+16
-7
No files found.
includes/Rts.h
View file @
5a3fdc0c
...
...
@@ -145,19 +145,6 @@ void _assertFail(const char *filename, unsigned int linenum)
#define FMT_SizeT "zu"
#define FMT_HexSizeT "zx"
#define FMT_Word "zu"
#define FMT_Int "zd"
/*
* Getting printf formats right for platform-dependent typedefs
*/
#if SIZEOF_LONG == 8
#define FMT_Word64 "lu"
#define FMT_Int64 "ld"
#else
#define FMT_Word64 "llu"
#define FMT_Int64 "lld"
#endif
/* -----------------------------------------------------------------------------
Time values in the RTS
...
...
includes/stg/Types.h
View file @
5a3fdc0c
...
...
@@ -54,12 +54,16 @@ typedef unsigned char StgWord8;
typedef
signed
short
StgInt16
;
typedef
unsigned
short
StgWord16
;
#if SIZEOF_LONG == 4
typedef
signed
long
StgInt32
;
typedef
unsigned
long
StgWord32
;
#elif SIZEOF_INT == 4
#if SIZEOF_INT == 4
typedef
signed
int
StgInt32
;
typedef
unsigned
int
StgWord32
;
#define FMT_Word32 "u"
#define FMT_Int32 "d"
#elif SIZEOF_LONG == 4
typedef
signed
long
StgInt32
;
typedef
unsigned
long
StgWord32
;
#define FMT_Word32 "lu"
#define FMT_Int32 "ld"
#else
#error GHC untested on this architecture: sizeof(int) != 4
#endif
...
...
@@ -67,12 +71,13 @@ typedef unsigned int StgWord32;
#if SIZEOF_LONG == 8
typedef
signed
long
StgInt64
;
typedef
unsigned
long
StgWord64
;
#elif defined(__MSVC__)
typedef
__int64
StgInt64
;
typedef
unsigned
__int64
StgWord64
;
#define FMT_Word64 "lu"
#define FMT_Int64 "ld"
#elif SIZEOF_LONG_LONG == 8
typedef
signed
long
long
int
StgInt64
;
typedef
unsigned
long
long
int
StgWord64
;
#define FMT_Word64 "llu"
#define FMT_Int64 "lld"
#else
#error cannot find a way to define StgInt64
#endif
...
...
@@ -93,12 +98,16 @@ typedef StgInt64 StgInt;
typedef
StgWord64
StgWord
;
typedef
StgInt32
StgHalfInt
;
typedef
StgWord32
StgHalfWord
;
#define FMT_Word FMT_Word64
#define FMT_Int FMT_Int64
#else
#if SIZEOF_VOID_P == 4
typedef
StgInt32
StgInt
;
typedef
StgWord32
StgWord
;
typedef
StgInt16
StgHalfInt
;
typedef
StgWord16
StgHalfWord
;
#define FMT_Word FMT_Word32
#define FMT_Int FMT_Int32
#else
#error GHC untested on this architecture: sizeof(void *) != 4 or 8
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment