ericmckean / snappy

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

SunPro C++ support #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run ./configure && make on a host with the SunPro C++ compiler
2.
3.

What is the expected output? What do you see instead?

I'd like to see it compile, but it fails for several reasons (can't find 
byteswap.h or bswap_(16,32,64) functions, a few syntax errors, and the linkers 
inability to match function signatures when the constness of arguments vary 
from the declaration.

What version of the product are you using? On what operating system?

snappy-1.0.3 on SunOS 5.10 with Sun C++ 5.10

Please provide any additional information below.

I'm attaching a patch.

Original issue reported on code.google.com by travis.v...@gmail.com on 9 Aug 2011 at 11:00

Attachments:

GoogleCodeExporter commented 9 years ago
The original patch used a reserved names for a few new internal helper 
functions. This version of the patch uses names that are not reserved (but 
might need to be changed if you have some naming requirements).

Original comment by travis.v...@gmail.com on 9 Aug 2011 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Do you think you could make the patch against the latest Subversion checkout? 
At least one of these issues (the workaround for SunPro's broken const 
handling) have already been fixed there; I thought it would actually work then, 
but obviously not.

Also, is there really any platform that doesn't have byteswap functions 
builtin? If so, you most likely want a slightly more efficient variation than 
this, e.g. for 32-bit

  x = ((x & 0xffff0000) >> 8) | ((x & 0x0000ffff) << 8);
  x = ((x & 0xff00ff00) >> 4) | ((x & 0x00ff00ff) << 4);

etc.

Original comment by se...@google.com on 9 Aug 2011 at 11:25

GoogleCodeExporter commented 9 years ago
I'll take a few minutes later this week to create patches from trunk. When I 
made this patch I had looked around for any byteswap routines and didn't find 
any. Upon reading your comments, I went back and found that they're there, but 
use all uppercase names (in sys/byteswap.h).

Original comment by travis.v...@gmail.com on 9 Aug 2011 at 11:37

GoogleCodeExporter commented 9 years ago
I've included some of the simpler ones in trunk now, but the byteswap stuff is 
still not in.

Do you think you could fill in the form at 
http://code.google.com/legal/individual-cla-v1.0.html ? It is needed for us to 
accept any kind of non-trivial patches.

Original comment by se...@google.com on 10 Aug 2011 at 6:58

GoogleCodeExporter commented 9 years ago
btw, if you'd like an existing chunk of byteswap code you can pull in, feel 
free to use the one in
   http://code.google.com/p/google-ctemplate/source/browse/trunk/src/base/macros.h

This uses a number of configure.ac directives, which you can find in
   http://code.google.com/p/google-ctemplate/source/browse/trunk/configure.ac

Original comment by csilv...@gmail.com on 10 Aug 2011 at 9:24

GoogleCodeExporter commented 9 years ago
I'm pretty sure that bit of code is insufficient for platforms I need to 
support (VisualAge C++ 11 on AIX 6.1 and HP aC++ 6.25 on HP-UX 11.31). I did a 
thorough search through the system headers looking for byte swapping routines 
or macros and turned up nothing on either platform.

Original comment by travis.v...@gmail.com on 10 Aug 2011 at 9:34

GoogleCodeExporter commented 9 years ago
The byteswap issue has been fixed in r49. (The fix also includes generic 
macros, which should fix compilation for AIX and HP-UX.) I believe that closes 
the issue.

Original comment by se...@google.com on 15 Sep 2011 at 9:51