~ubuntu-branches/debian/stretch/libsereal-encoder-perl/stretch

« back to all changes in this revision

Viewing changes to srl_common.h

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2014-07-15 16:29:25 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140715162925-zzudxv7i4ju6y881
Tags: 3.001.003-1
* Team upload.
* New upstream development release.
  Further tweaks to alignedness issues.
* Bump versioned build dependency on libsereal-decoder-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#define expect_false(expr) expect((expr) != 0, 0)
14
14
#define expect_true(expr)  expect((expr) != 0, 1)
15
15
 
 
16
/* these defines are somewhat borrowed from miniz.c */
 
17
 
 
18
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
 
19
// SRL_X86_OR_X64_CPU is only used to help set the below macros.
 
20
#define SRL_X86_OR_X64_CPU 1
 
21
#endif
 
22
 
 
23
#if SRL_X86_OR_X64_CPU && !defined(SRL_USE_ALIGNED_LOADS_AND_STORES)
 
24
// Set SRL_USE_ALIGNED_LOADS_AND_STORES to 0 on CPU's that permit efficient integer loads and stores from unaligned addresses.
 
25
#define SRL_USE_ALIGNED_LOADS_AND_STORES 0
 
26
#endif
 
27
 
 
28
/* HP-UX runs on Itanium but has strict alignment. */
 
29
#ifdef __hpux
 
30
#undef SRL_USE_ALIGNED_LOADS_AND_STORES
 
31
#define SRL_USE_ALIGNED_LOADS_AND_STORES 1
 
32
#endif
 
33
 
16
34
#endif