[
https://issues.apache.org/jira/browse/STDCXX-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563540#action_12563540
]
farid edited comment on STDCXX-710 at 3/12/08 5:11 AM:
---------------------------------------------------------------
As another option we can just redirect from our include/ansi/xxx.h files to
compiler default header files.
I.e. for the include/ansi/assert.h:
#ifndef __cplusplus
#include <config.h>
#include _RWSTD_ANSI_C_ASSERT_H
#else // #ifdef __cplusplus
#include <rw/_defs.h>
...
#endif // __cplusplus
was (Author: farid):
As another option we can just redirect from our include/ansi/xxx.h files to
compiler default header files.
I.e. for the include/ansi/assert.h:
#ifndef __cplusplus
#include _RWSTD_ANSI_C_ASSERT_H
#else // #ifdef __cplusplus
#include <rw/_defs.h>
...
#endif // __cplusplus
> C code fails to compile with stdcxx
> -----------------------------------
>
> Key: STDCXX-710
> URL: https://issues.apache.org/jira/browse/STDCXX-710
> Project: C++ Standard Library
> Issue Type: Improvement
> Affects Versions: 4.1.2, 4.1.3, 4.2.0
> Environment: All
> Reporter: Farid Zaripov
> Assignee: Farid Zaripov
> Priority: Trivial
> Fix For: 4.2.1
>
> Attachments: stdcxx-710.patch
>
> Original Estimate: 1h
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The boost regression tests contains some .c files, which are failed to
> compile with stdcxx.
> The example:
> ----------------------------------
> #include <assert.h>
> #include <ctype.h>
> #include <errno.h>
> #include <float.h>
> #include <limits.h>
> #include <locale.h>
> #include <math.h>
> #include <setjmp.h>
> #include <signal.h>
> #include <stdarg.h>
> #include <stddef.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> #include <wchar.h>
> #include <wctype.h>
> int main ()
> {
> return 0;
> }
> ----------------------------------
> The build log on MSVC:
> ----------------------------------
> test.cpp
> D:\stdcxx\stdcxx-4.2.x\include\rw\_defs.h(1142) : error C2061: syntax error :
> identifier '__rw'
> D:\stdcxx\stdcxx-4.2.x\include\rw\_defs.h(1142) : error C2059: syntax error :
> ';'
> D:\stdcxx\stdcxx-4.2.x\include\rw\_defs.h(1142) : error C2449: found '{' at
> file scope (missing function header?)
> D:\stdcxx\stdcxx-4.2.x\include\rw\_defs.h(1163) : error C2059: syntax error :
> '}'
> ----------------------------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.