Issue 11307 - Gcc 2.95 fails to compile new 644 tree in sal/osl
Summary: Gcc 2.95 fails to compile new 644 tree in sal/osl
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: PC Linux, all
: P2 Trivial (vote)
Target Milestone: OOo 1.1 Beta2
Assignee: Martin Hollmichel
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-08 02:41 UTC by foskey
Modified: 2003-06-16 16:51 UTC (History)
2 users (show)

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


Attachments
patch for sal/osl/unx/file_stat.cxx (574 bytes, patch)
2003-04-04 02:24 UTC, Unknown
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description foskey 2003-02-08 02:41:36 UTC
Index: unx/file_stat.cxx
===================================================================
RCS file: /cvs/oo/porting/sal/osl/unx/Attic/file_stat.cxx,v
retrieving revision 1.1.4.1
diff -u -b -B -r1.1.4.1 file_stat.cxx
--- unx/file_stat.cxx   22 Jan 2003 17:08:34 -0000      1.1.4.1
+++ unx/file_stat.cxx   8 Feb 2003 02:35:30 -0000
@@ -325,7 +325,7 @@
        if (osl_File_E_None != osl_error)
                return osl_error;
  
-       struct stat file_stat;
+       struct ::stat file_stat;
        if (is_stat_call_necessary(uFieldMask) && (0 != osl::lstat(file_path,
file_stat)))
        return oslTranslateFileError(
Comment 1 foskey 2003-02-14 12:51:41 UTC
This patch works for gcc 2.95 but breaks gcc 3.2.  Don't apply.
Comment 2 fa 2003-02-19 18:50:38 UTC
Ken, Martin:

This patch is required for Mac OS X as we must still use gcc 2.95.3.  Sal will not build unless this patch is applied.  Can't we get namespace issues worked out here?  Either that or do some #ifdef-ing.

Dan
Comment 3 nickb 2003-02-20 00:37:35 UTC
We will need this patch on IRIX too (although I haven't built
644 yet). I think
#ifdef __GNUC__ 
#if __GNUC__ < 3
...
#endif
#endif

will do the trick.
Comment 4 foskey 2003-03-18 03:59:53 UTC
Found duplicate for issue.

*** This issue has been marked as a duplicate of 8181 ***
Comment 5 foskey 2003-03-19 12:21:05 UTC
The patch that Nick Proposed is correct for 2.95.  Will wait for
further building to complete verification.
Comment 6 foskey 2003-03-19 20:44:22 UTC
The link assumes taht the gcc2.95 compiler is gcc and no specific
path.  Here is a patch.

Index: unxlngi3.mk
===================================================================
RCS file: /cvs/tools/solenv/inc/unxlngi3.mk,v
retrieving revision 1.18.6.1.22.1
diff -u -b -B -r1.18.6.1.22.1 unxlngi3.mk
--- unxlngi3.mk 19 Mar 2003 11:04:54 -0000      1.18.6.1.22.1
+++ unxlngi3.mk 19 Mar 2003 20:41:45 -0000
@@ -133,7 +133,7 @@
 DYNAMIC                = -Wl,-Bdynamic
  
 # name of linker
-LINK=gcc
+LINK=*gcc
 # default linker flags
 LINKFLAGS=
Comment 7 Unknown 2003-04-04 02:23:09 UTC
I think Nicks suggestion is the only on that will work...
We too are seeing this problem on Irix.

Attached below is my patch proposal (from the 1.1 beta tree)
Comment 8 Unknown 2003-04-04 02:24:08 UTC
Created attachment 5453 [details]
patch for sal/osl/unx/file_stat.cxx
Comment 9 foskey 2003-04-04 14:32:12 UTC
Running a verification build on gcc 3.2.
Comment 10 foskey 2003-04-05 13:33:37 UTC
This has been applied to the developers 644 tree.  Verified for gcc
295 and gcc 32.
Comment 11 Martin Hollmichel 2003-06-16 16:51:25 UTC
closed.