preprocess-haskell 0.0.1.0 → 0.0.1.1
raw patch · 6 files changed
+220/−2 lines, 6 files
Files
- include/MachDeps.h +63/−0
- include/ghcautoconf.h +108/−0
- include/ghcconfig.h +7/−0
- include/ghcplatform.h +26/−0
- include/rts/Signals.h +10/−0
- preprocess-haskell.cabal +6/−2
+ include/MachDeps.h view
@@ -0,0 +1,63 @@+#include "ghcautoconf.h"++#ifndef MACHDEPS_H+#define MACHDEPS_H+#define SIZEOF_HSCHAR SIZEOF_WORD32+#define ALIGNMENT_HSCHAR ALIGNMENT_WORD32+#define SIZEOF_HSINT SIZEOF_VOID_P+#define ALIGNMENT_HSINT ALIGNMENT_VOID_P+#define SIZEOF_HSWORD SIZEOF_VOID_P+#define ALIGNMENT_HSWORD ALIGNMENT_VOID_P+#define SIZEOF_HSDOUBLE SIZEOF_DOUBLE+#define ALIGNMENT_HSDOUBLE ALIGNMENT_DOUBLE+#define SIZEOF_HSFLOAT SIZEOF_FLOAT+#define ALIGNMENT_HSFLOAT ALIGNMENT_FLOAT+#define SIZEOF_HSPTR SIZEOF_VOID_P+#define ALIGNMENT_HSPTR ALIGNMENT_VOID_P+#define SIZEOF_HSFUNPTR SIZEOF_VOID_P+#define ALIGNMENT_HSFUNPTR ALIGNMENT_VOID_P+#define SIZEOF_HSSTABLEPTR SIZEOF_VOID_P+#define ALIGNMENT_HSSTABLEPTR ALIGNMENT_VOID_P+#define SIZEOF_INT8 SIZEOF_CHAR+#define ALIGNMENT_INT8 ALIGNMENT_CHAR+#define SIZEOF_WORD8 SIZEOF_UNSIGNED_CHAR+#define ALIGNMENT_WORD8 ALIGNMENT_UNSIGNED_CHAR+#define SIZEOF_INT16 SIZEOF_SHORT+#define ALIGNMENT_INT16 ALIGNMENT_SHORT+#define SIZEOF_WORD16 SIZEOF_UNSIGNED_SHORT+#define ALIGNMENT_WORD16 ALIGNMENT_UNSIGNED_SHORT+#define SIZEOF_INT32 SIZEOF_INT+#define ALIGNMENT_INT32 ALIGNMENT_INT+#define SIZEOF_WORD32 SIZEOF_UNSIGNED_INT+#define ALIGNMENT_WORD32 ALIGNMENT_UNSIGNED_INT+#if SIZEOF_LONG == 8+#define SIZEOF_INT64 SIZEOF_LONG+#define ALIGNMENT_INT64 ALIGNMENT_LONG+#define SIZEOF_WORD64 SIZEOF_UNSIGNED_LONG+#define ALIGNMENT_WORD64 ALIGNMENT_UNSIGNED_LONG+#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8+#define SIZEOF_INT64 SIZEOF_LONG_LONG+#define ALIGNMENT_INT64 ALIGNMENT_LONG_LONG+#define SIZEOF_WORD64 SIZEOF_UNSIGNED_LONG_LONG+#define ALIGNMENT_WORD64 ALIGNMENT_UNSIGNED_LONG_LONG+#else+#error Cannot find a 64bit type.+#endif+#ifndef WORD_SIZE_IN_BITS+#if SIZEOF_HSWORD == 4+#define WORD_SIZE_IN_BITS 32+#define WORD_SIZE_IN_BITS_FLOAT 32.0+#else+#define WORD_SIZE_IN_BITS 64+#define WORD_SIZE_IN_BITS_FLOAT 64.0+#endif+#endif+#ifndef TAG_BITS+#if SIZEOF_HSWORD == 4+#define TAG_BITS 2+#else+#define TAG_BITS 3+#endif+#endif+#define TAG_MASK ((1 << TAG_BITS) - 1)+#endif /* MACHDEPS_H */
+ include/ghcautoconf.h view
@@ -0,0 +1,108 @@+#ifndef __GHCAUTOCONF_H__+#define __GHCAUTOCONF_H__+#define ALIGNMENT_CHAR 1+#define ALIGNMENT_DOUBLE 8+#define ALIGNMENT_FLOAT 4+#define ALIGNMENT_INT 4+#define ALIGNMENT_LONG 8+#define ALIGNMENT_LONG_LONG 8+#define ALIGNMENT_SHORT 2+#define ALIGNMENT_UNSIGNED_CHAR 1+#define ALIGNMENT_UNSIGNED_INT 4+#define ALIGNMENT_UNSIGNED_LONG 8+#define ALIGNMENT_UNSIGNED_LONG_LONG 8+#define ALIGNMENT_UNSIGNED_SHORT 2+#define ALIGNMENT_VOID_P 8+#define CC_SUPPORTS_TLS 1+#define HAS_VISIBILITY_HIDDEN 1+#define HAVE_ALLOCA 1+#define HAVE_ALLOCA_H 1+#define HAVE_BIN_SH 1+#define HAVE_CLOCK_GETTIME 1+#define HAVE_CTIME_R 1+#define HAVE_CTYPE_H 1+#define HAVE_DECL_CTIME_R 1+#define HAVE_DIRENT_H 1+#define HAVE_DLFCN_H 1+#define HAVE_ERRNO_H 1+#define HAVE_EVENTFD 1+#define HAVE_FCNTL_H 1+#define HAVE_FORK 1+#define HAVE_GETRUSAGE 1+#define HAVE_GETTIMEOFDAY 1+#define HAVE_GRP_H 1+#define HAVE_INTTYPES_H 1+#define HAVE_LIBDL 1+#define HAVE_LIBIBERTY 1+#define HAVE_LIBM 1+#define HAVE_LIBRT 1+#define HAVE_LIMITS_H 1+#define HAVE_LOCALE_H 1+#define HAVE_LONG_LONG 1+#define HAVE_MEMORY_H 1+#define HAVE_PRINTF_LDBLSTUB 0+#define HAVE_PTHREAD_H 1+#define HAVE_PWD_H 1+#define HAVE_SCHED_H 1+#define HAVE_SCHED_SETAFFINITY 1+#define HAVE_SETITIMER 1+#define HAVE_SETLOCALE 1+#define HAVE_SIGINTERRUPT 1+#define HAVE_SIGNAL_H 1+#define HAVE_STDINT_H 1+#define HAVE_STDLIB_H 1+#define HAVE_STRINGS_H 1+#define HAVE_STRING_H 1+#define HAVE_SYSCONF 1+#define HAVE_SYS_EVENTFD_H 1+#define HAVE_SYS_MMAN_H 1+#define HAVE_SYS_PARAM_H 1+#define HAVE_SYS_RESOURCE_H 1+#define HAVE_SYS_SELECT_H 1+#define HAVE_SYS_STAT_H 1+#define HAVE_SYS_TIMEB_H 1+#define HAVE_SYS_TIMES_H 1+#define HAVE_SYS_TIME_H 1+#define HAVE_SYS_TYPES_H 1+#define HAVE_SYS_UTSNAME_H 1+#define HAVE_SYS_WAIT_H 1+#define HAVE_TERMIOS_H 1+#define HAVE_TIMER_SETTIME 1+#define HAVE_TIMES 1+#define HAVE_TIME_H 1+#define HAVE_UNISTD_H 1+#define HAVE_UTIME_H 1+#define HAVE_VFORK 1+#define HAVE_WORKING_FORK 1+#define HAVE_WORKING_VFORK 1+#define RETSIGTYPE void+#define SIZEOF_CHAR 1+#define SIZEOF_DOUBLE 8+#define SIZEOF_FLOAT 4+#define SIZEOF_INT 4+#define SIZEOF_LONG 8+#define SIZEOF_LONG_LONG 8+#define SIZEOF_SHORT 2+#define SIZEOF_UNSIGNED_CHAR 1+#define SIZEOF_UNSIGNED_INT 4+#define SIZEOF_UNSIGNED_LONG 8+#define SIZEOF_UNSIGNED_LONG_LONG 8+#define SIZEOF_UNSIGNED_SHORT 2+#define SIZEOF_VOID_P 8+#define STDC_HEADERS 1+#define TIME_WITH_SYS_TIME 1+#define USE_TIMER_CREATE 1+#define VOID_INT_SIGNALS 1+#ifdef AC_APPLE_UNIVERSAL_BUILD+#ifdef __BIG_ENDIAN__+#define WORDS_BIGENDIAN 1+#endif+#else+#ifndef WORDS_BIGENDIAN+#endif+#endif+#ifndef _DARWIN_USE_64_BIT_INODE+#define _DARWIN_USE_64_BIT_INODE 1+#endif+#define TABLES_NEXT_TO_CODE 1+#endif
+ include/ghcconfig.h view
@@ -0,0 +1,7 @@+#ifndef __GHCCONFIG_H__+#define __GHCCONFIG_H__++#include "ghcautoconf.h"+#include "ghcplatform.h"++#endif
+ include/ghcplatform.h view
@@ -0,0 +1,26 @@+#ifndef __GHCPLATFORM_H__+#define __GHCPLATFORM_H__+#define BuildPlatform_TYPE x86_64_unknown_linux+#define HostPlatform_TYPE x86_64_unknown_linux+#define x86_64_unknown_linux_BUILD 1+#define x86_64_unknown_linux_HOST 1+#define x86_64_BUILD_ARCH 1+#define x86_64_HOST_ARCH 1+#define BUILD_ARCH "x86_64"+#define HOST_ARCH "x86_64"+#define linux_BUILD_OS 1+#define linux_HOST_OS 1+#define BUILD_OS "linux"+#define HOST_OS "linux"+#define unknown_BUILD_VENDOR 1+#define unknown_HOST_VENDOR 1+#define BUILD_VENDOR "unknown"+#define HOST_VENDOR "unknown"+#define TargetPlatform_TYPE x86_64_unknown_linux+#define x86_64_unknown_linux_TARGET 1+#define x86_64_TARGET_ARCH 1+#define TARGET_ARCH "x86_64"+#define linux_TARGET_OS 1+#define TARGET_OS "linux"+#define unknown_TARGET_VENDOR 1+#endif
+ include/rts/Signals.h view
@@ -0,0 +1,10 @@+#ifndef RTS_SIGNALS_H+#define RTS_SIGNALS_H++#define STG_SIG_DFL (-1)+#define STG_SIG_IGN (-2)+#define STG_SIG_ERR (-3)+#define STG_SIG_HAN (-4)+#define STG_SIG_RST (-5)++#endif
preprocess-haskell.cabal view
@@ -1,5 +1,5 @@ name: preprocess-haskell-version: 0.0.1.0+version: 0.0.1.1 synopsis: Preprocess Haskell Repositories. license: BSD3 license-file: LICENSE@@ -11,6 +11,9 @@ ready for straightforward static-analysis. cabal-version: >=1.10 +extra-source-files: include/*.h+ , include/rts/*.h+ source-repository head type: git location: https://github.com/sourcegraph/preprocess-haskell.git@@ -18,7 +21,8 @@ source-repository this type: git location: https://github.com/sourcegraph/preprocess-haskell.git- tag: preprocess-haskell-0.0.1.0+ tag: preprocess-haskell-0.0.1.1+ library hs-source-dirs: src