stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r575374 - /incubator/stdcxx/trunk/src/memattr.cpp
Date Thu, 13 Sep 2007 17:11:06 GMT
Author: sebor
Date: Thu Sep 13 10:11:06 2007
New Revision: 575374

URL: http://svn.apache.org/viewvc?rev=575374&view=rev
Log:
2007-09-13  Martin Sebor  <sebor@roguewave.com>

	* memattr.cpp (EFAULT): #defined macro when not #defined in system
	headers. Needed by EDG eccp on Linux.
	[Linux] (__USE_BSD): #defined macro when not already #defined to
	bring in declarations of caddr_t, madvise(), and MADV_WILLNEED.
	Also needed by EDG eccp on Linux.

Modified:
    incubator/stdcxx/trunk/src/memattr.cpp

Modified: incubator/stdcxx/trunk/src/memattr.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/memattr.cpp?rev=575374&r1=575373&r2=575374&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/memattr.cpp (original)
+++ incubator/stdcxx/trunk/src/memattr.cpp Thu Sep 13 10:11:06 2007
@@ -23,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2005-2006 Rogue Wave Software.
+ * Copyright 2005-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -32,6 +32,10 @@
 #include <errno.h>    // for ENOMEM, errno
 #include <string.h>   // for memchr
 
+#ifndef EFAULT
+#  define EFAULT  14   // Linux value
+#endif   // EFAULT
+
 #ifdef __CYGWIN__
    // use the Windows API on Cygwin
 #  define _WIN32
@@ -43,6 +47,12 @@
 #    include <time.h>
 #  endif
 #  include <unistd.h>     // for getpagesize(), sysconf()
+
+#  if defined (_RWSTD_OS_LINUX) && !defined (__USE_BSD)
+     // needed for caddr_t, madvise, and MADV_WILLNEED
+#    define __USE_BSD
+#  endif   // _RWSTD_OS_LINUX && !__USE_BSD
+
 #  include <sys/mman.h>   // for mincore()
 #  include <sys/types.h>
 



Mime
View raw message