You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2008/07/11 05:44:36 UTC

svn commit: r675826 - /stdcxx/branches/4.2.x/include/ansi/_csetjmp.h

Author: sebor
Date: Thu Jul 10 20:44:35 2008
New Revision: 675826

URL: http://svn.apache.org/viewvc?rev=675826&view=rev
Log:
2008-07-10  Martin Sebor  <se...@roguewave.com>

	STDCXX-989
	* include/ansi/_csetjmp.h (jmp_buf): Hardcoded known size on Linux
	and Solaris.

Modified:
    stdcxx/branches/4.2.x/include/ansi/_csetjmp.h

Modified: stdcxx/branches/4.2.x/include/ansi/_csetjmp.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/ansi/_csetjmp.h?rev=675826&r1=675825&r2=675826&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/ansi/_csetjmp.h (original)
+++ stdcxx/branches/4.2.x/include/ansi/_csetjmp.h Thu Jul 10 20:44:35 2008
@@ -23,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -38,7 +38,29 @@
 
 extern "C" {
 
-typedef char jmp_buf [8];
+#ifdef _RWSTD_OS_LINUX
+
+#  if 4 == _RWSTD_LONG_SIZE
+// ILP32: sizeof (jmp_buf) == 156
+typedef long jmp_buf [39];
+#  elif 8 == _RWSTD_LONG_SIZE
+// ILP64: sizeof (jmp_buf) == 200
+typedef long jmp_buf [25];
+#  endif
+
+#elif defined _RWSTD_OS_SUNOS
+
+// ILP32: sizeof (jmp_buf) == 48
+// ILP64: sizeof (jmp_buf) == 96
+typedef long jmp_buf [12];
+
+#elif defined _WIN64
+   // FIXME: add size
+#  error "jmp_buf size unknown on WIN64"
+#elif defined _WIN32
+   // FIXME: add size
+#  error "jmp_buf size unknown on WIN32"
+#endif
 
 int setjmp (jmp_buf);
 void longjmp (jmp_buf, int);