Hi,  I am new to working with the AT&T AST tools directly (but not ksh).  So I 
am new to this forum.  I am focused currently on RHEL Linux as a platform.  I 
recently started an assignment to bring in some existing C++ code as a custom 
ksh built-in command.  I hit a core dump related to plugin_version() at ksh 
build 2010-06-21 which from looking around, might have been a problematic 
version as the plugin_version() requirements were a bit new from some of the 
notes.  Using ksh version 2012-08-01, plugin_version() is no longer an issue.  
Also I addressed several things by using 'extern "C" ' as might be expected 
like the b_<command name>, etc.

The new issue I have debugged and the main issue I am writing about is with 
regard to C++ support and the cstdio header.  After debugging another core 
dump, I noticed the stack trace was very different when cstdio is included vs 
stdio.h.  When a code module uses only stdio.h (the code is focused more on C) 
I see there is some translation of the IO functions to "__ast_" versions.  I am 
sure this is to properly control I/O within the shell command environment.  But 
when I use cstdio no such translations happen (I assume the issue is related to 
the namespace "std").  It was easy to verify this with nm as this is what I 
would see when things worked correctly for example:

U _ast_fprintf 
U _ast_printf

So my main question is, does the AST ksh built-in really fully support C++?  I 
noticed many of the notes on doing built-ins reference the C++ compiler which 
seems to work fine.  But I assume there are some limitations with broad C++ 
implementations (especially with regard to using cstdio).  If the simple answer 
is that any C++ integration should be somewhat rudimentary, then perhaps you 
could list more details about this in the docs which walk through building 
built-in commands.  Or at least touch on any limitations to cstdio 
capabilities.  I was unable to find specifics on this looking around the Web or 
within some of the archive notes.

Thanks in advance for your kind assistance.

Doug.. 
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to