Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
61ec323b
Commit
61ec323b
authored
Aug 07, 2001
by
Bill Hoffman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: compile with broken 720 SGI C++ compiler
parent
4b2d4805
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
Source/cmStandardIncludes.h
Source/cmStandardIncludes.h
+40
-0
Source/cmSystemTools.cxx
Source/cmSystemTools.cxx
+8
-2
No files found.
Source/cmStandardIncludes.h
View file @
61ec323b
...
...
@@ -89,4 +89,44 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
// check for the 720 compiler on the SGI
// which has some strange properties that I don't think are worth
// checking for in a general way in configure
#if defined(__sgi) && !defined(__GNUC__)
# if (_COMPILER_VERSION >= 730)
# define CM_SGI_CC_730
# elif (_COMPILER_VERSION >= 720)
# define CM_SGI_CC_720
# endif
#endif
# ifdef CM_SGI_CC_720
// the 720 sgi compiler has std:: but not for the stream library,
// so we have to bring it into the std namespace by hand.
namespace
std
{
using
::
ostream
;
using
::
istream
;
using
::
ios
;
using
::
cout
;
using
::
cerr
;
using
::
cin
;
using
::
ifstream
;
using
::
ofstream
;
using
::
strstream
;
using
::
endl
;
using
::
ends
;
using
::
flush
;
}
// The string class is missing these operators so add them
inline
bool
operator
!=
(
std
::
string
const
&
a
,
const
char
*
b
)
{
return
!
(
a
==
std
::
string
(
b
));
}
inline
bool
operator
==
(
std
::
string
const
&
a
,
const
char
*
b
)
{
return
(
a
==
std
::
string
(
b
));
}
// for scoping is not ISO, so use the for hack
#define for if(false) {} else for
# endif
#endif
Source/cmSystemTools.cxx
View file @
61ec323b
...
...
@@ -710,14 +710,20 @@ void cmSystemTools::cmCopyFile(const char* source,
const
int
buffer_length
=
4096
;
char
buffer
[
buffer_length
];
std
::
ifstream
fin
(
source
,
std
::
ios
::
binary
|
std
::
ios
::
in
);
#ifdef _WIN32
std
::
ios
::
binary
|
#endif
std
::
ios
::
in
);
if
(
!
fin
)
{
cmSystemTools
::
Error
(
"CopyFile failed to open input file
\"
"
,
source
,
"
\"
"
);
}
std
::
ofstream
fout
(
destination
,
std
::
ios
::
binary
|
std
::
ios
::
out
|
std
::
ios
::
trunc
);
#ifdef _WIN32
std
::
ios
::
binary
|
#endif
std
::
ios
::
out
|
std
::
ios
::
trunc
);
if
(
!
fout
)
{
cmSystemTools
::
Error
(
"CopyFile failed to open output file
\"
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment