pradeep250677 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

Issues when compiling latest on Solaris for 64-bit and gcc #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. svn co http://lz4.googlecode.com/svn/
2. cd svn/trunc
3. gmake CC="gcc -m64" lz4demo

What is the expected output? What do you see instead?
Succesfully built 64 bit lz4demo.
Instead I get : 
In file included from bench.c:56:0:
/usr/include/stdio.h:333:29: error: unknown type name 'off64_t'
/usr/include/stdio.h:334:1: error: unknown type name 'off64_t'
gmake: *** [lz4demo] Error 1

What version of the product are you using? On what operating system?
Latest. Solaris 10 on sparc.

Please provide any additional information below.

The fix is to change 

#if (defined(__sun__) && (!defined(__LP64__)))   // Sun Solaris 32-bits 
requires specific definitions
#  define _LARGEFILE_SOURCE 
#  define FILE_OFFSET_BITS=64
#else
#  define _LARGEFILE64_SOURCE
#endif

to
#if (defined(__sun__) && (!defined(__LP64__)))   // Sun Solaris 32-bits 
requires specific definitions
#  define _LARGEFILE_SOURCE 
#  define FILE_OFFSET_BITS=64
#elif ! defined(__LP64__)         // No point defining Large file for 64 bit
#  define _LARGEFILE64_SOURCE
#endif

Original issue reported on code.google.com by thwill...@gmail.com on 26 Nov 2012 at 2:31

GoogleCodeExporter commented 8 years ago
I'll look into it.

Original comment by yann.col...@gmail.com on 29 Nov 2012 at 7:46

GoogleCodeExporter commented 8 years ago
A proposed correction, fully based on your proposition, is in attached file.

Original comment by yann.col...@gmail.com on 29 Nov 2012 at 8:36

Attachments:

GoogleCodeExporter commented 8 years ago
Works fine.
Thanks.

Original comment by thwill...@gmail.com on 30 Nov 2012 at 9:24

GoogleCodeExporter commented 8 years ago
Corrected into r84.

Original comment by yann.col...@gmail.com on 30 Nov 2012 at 1:24