We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5441 - Add support for endianness check on FreeBSD: Fixes endianness checking on at least powerpc64le, maybe also other architectures
Summary: Add support for endianness check on FreeBSD: Fixes endianness checking on at ...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.14
Hardware: All FreeBSD
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-03 07:36 UTC by VVD
Modified: 2021-01-04 07:25 UTC (History)
1 user (show)

See Also:


Attachments
Add support for endianness check on FreeBSD (317 bytes, patch)
2021-01-03 07:36 UTC, VVD
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2021-01-03 07:36:41 UTC
Created attachment 4634 [details]
Add support for endianness check on FreeBSD

Patch based on patch from FreeBSD port devel/sdl20:
https://svnweb.freebsd.org/ports/head/devel/sdl20/files/patch-include_SDL__endian.h?view=log
Comment 1 Sam Lantinga 2021-01-03 18:20:28 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/240db31a2e01
Comment 2 VVD 2021-01-04 04:33:29 UTC
Thanks!
Comment 3 Ozkan Sezer 2021-01-04 06:05:45 UTC
Is sys/endian.h the new way to do it?  I've been using
machine/endian.h for quite some time.
Comment 4 VVD 2021-01-04 07:16:27 UTC
(In reply to Ozkan Sezer from comment #3)
> Is sys/endian.h the new way to do it?  I've been using
> machine/endian.h for quite some time.

sys/endian.h is the correct way, but machine/endian.h in most cases will work too:
$ grep machine/endian.h /usr/include/sys/endian.h 
#include <machine/endian.h>

https://svnweb.freebsd.org/base/head/sys/sys/endian.h?view=markup
Comment 5 Ozkan Sezer 2021-01-04 07:25:44 UTC
(In reply to VVD from comment #4)
> sys/endian.h is the correct way, but machine/endian.h in most cases will
> work too:
> $ grep machine/endian.h /usr/include/sys/endian.h 
> #include <machine/endian.h>
> 
> https://svnweb.freebsd.org/base/head/sys/sys/endian.h?view=markup

I see, thanks.  So it's been there since 2002.