Issue 15366 - silence redefine warnings in osl/endian.h
Summary: silence redefine warnings in osl/endian.h
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All Linux, all
: P5 (lowest) Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: khendricks
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-06 16:37 UTC by khendricks
Modified: 2004-02-15 07:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description khendricks 2003-06-06 16:37:00 UTC
Hi, 
 
sal/osl/endian.h defines _BIG_ENDIAN but this define is already part of the gcc spec file 
(inherently defined in PPC Linux). 
 
This generates a warning message about redefining _BIG_ENDIAN any time osl/endian.h is 
included under PPC Linux which generates a lot of warning messages. 
 
So I would like approval to commit the following small patch (it falls all inside a LINUX ifdef block 
so it is completely Linux specific!) which simply check if the appropriate Endian define already 
exists to prevent warnings. 
 
 
--- endian.h.~1.4.~     2003-03-26 11:45:35.000000000 -0500 
+++ endian.h    2003-06-06 11:07:59.000000000 -0400 
@@ -87,9 +87,13 @@ 
 #ifdef LINUX 
 #      include <endian.h> 
 #      if __BYTE_ORDER == __LITTLE_ENDIAN 
+#ifndef _LITTLE_ENDIAN 
 #              define _LITTLE_ENDIAN 
+#endif 
 #      elif __BYTE_ORDER == __BIG_ENDIAN 
+#ifndef _BIG_ENDIAN 
 #              define _BIG_ENDIAN 
+#endif 
 #      elif __BYTE_ORDER == __PDP_ENDIAN 
 #              define _PDP_ENDIAN 
 #      endif 
 
 
 
Can someone approve this little change? 
 
Thanks, 
 
Kevin
Comment 1 khendricks 2003-06-06 16:37:27 UTC
adding the keyword approval_pending 
 
Comment 2 khendricks 2003-06-06 16:40:04 UTC
Hi, 
 
Setting release target to OOo 1.1 RC 
 
Thanks, 
 
kevin 
 
Comment 3 foskey 2003-06-06 21:07:22 UTC
Approved.   Please commit.
Comment 4 khendricks 2003-06-06 21:18:11 UTC
Hi Ken, 
 
Thanks! 
 
Committed. 
Resolving this as fixed. 
 
Kevin 
Comment 5 Martin Hollmichel 2004-02-15 07:28:15 UTC
verfied in 1.1.0.
Comment 6 Martin Hollmichel 2004-02-15 07:31:24 UTC
close issue