[BusyBox 0000760]: [PORTABILITY] endian.h stuff [PATCH]

bugs at busybox.net bugs at busybox.net
Wed Mar 1 05:44:55 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=760 
====================================================================== 
Reported By:                rfelker
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   760
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             02-28-2006 13:51 PST
Last Modified:              02-28-2006 21:44 PST
====================================================================== 
Summary:                    [PORTABILITY] endian.h stuff [PATCH]
Description: 
The attached patch replaces the preprocessor checks for endianness using
endian.h with a fully portable check that should work on any usable
version of gcc or any C99-compliant compiler. As long as optimization is
enabled gcc eliminates the dead code. The way I've done this seems to
match the desired direction of config options in BusyBox (from
preprocessor hacks towards C conditionals with dead-code elimination).
====================================================================== 

---------------------------------------------------------------------- 
 vodz - 02-28-06 21:44  
---------------------------------------------------------------------- 
Hmm. You removed #include <endian.h>. But use #if __BYTE_ORDER ==
__BIG_ENDIAN too. Its strange for me.

strndup->bb_strndup for get_header_tar.c applied. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-28-06 13:51  rfelker        New Issue                                    
02-28-06 13:51  rfelker        Status                   new => assigned     
02-28-06 13:51  rfelker        Assigned To               => BusyBox         
02-28-06 13:51  rfelker        File Added: endian.diff                      
02-28-06 21:44  vodz           Note Added: 0001151                          
======================================================================



More information about the busybox-cvs mailing list