Bug 146752 - rpm-4.4 sqlite.c uses endian.h, which isn't portable
Summary: rpm-4.4 sqlite.c uses endian.h, which isn't portable
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-01 10:17 UTC by Anders F Björklund
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-02-04 03:48:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch-sqllite.diff (388 bytes, patch)
2005-02-01 10:21 UTC, Anders F Björklund
no flags Details | Diff

Description Anders F Björklund 2005-02-01 10:17:11 UTC
Description of problem:
#include <endian.h>

Version-Release number of selected component (if applicable):
4.4.1-0.14

How reproducible:
Always, on Darwin and other *BSD too probably.

Steps to Reproduce:
1. Build on BSD
2.
3.
  
Actual results:
sqlite.c:39:20: endian.h: No such file or directory
sqlite.c: In function `sql_initDB':
sqlite.c:494: error: `__BYTE_ORDER' undeclared (first use in this
function)
sqlite.c:494: error: (Each undeclared identifier is reported only once
sqlite.c:494: error: for each function it appears in.)

Expected results:
(compile OK)

Additional info:
On BSD, the stuff is in <machine/endian.h> and without underscores.
Most likely, these needs to be automangled... (check for endian.h)

Comment 1 Anders F Björklund 2005-02-01 10:21:38 UTC
Created attachment 110494 [details]
patch-sqllite.diff

needs better #ifdef

Comment 2 Jeff Johnson 2005-02-01 17:45:51 UTC
Nah, easier to do a runtime test than chase vendor peculiarities.

Will do soonishly, thanks for the report.

Comment 3 Anders F Björklund 2005-02-01 18:20:13 UTC
Vendor and vendor.. It's yet another BSD-versus-Linux issue.
(I just used __APPLE__ since I knew that, without a lookup)

But whatever autoconf/automake is easiest to do, would work...

Comment 4 Jeff Johnson 2005-02-04 03:48:04 UTC
Runtime test in rpm-4_4 sqlite.c, also rpm-4.4.1-0.13
    ftp://jbj.org/pub/rpm-macosx
getmntinfo is used there as well.


Note You need to log in before you can comment on or make changes to this bug.