[Rpm-maint] [rpm-software-management/rpm] RFE: macro for checking endianess (#365)
Jun Aruga
notifications at github.com
Thu Dec 7 15:59:10 UTC 2017
@ignatenkobrain I agree with you.
I think showing the little or big endian information by rpm helps the debugging.
I did debug writing below code in a source directly.
I want to check it more casually.
```
+ /*
+ int n = 1;
+ if(*(char *)&n == 1) {
+ printf("debug the system is little endian.\n");
+ } else {
+ printf("debug the system is big endian.\n");
+ }
+ */
```
```
$ lscpu | grep "Byte Order"
Byte Order: Little Endian
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/365#issuecomment-350011080
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171207/43ee5947/attachment.html>
More information about the Rpm-maint
mailing list