On Sat, Jan 17, 2009 at 02:47:11AM -0800, patrick keshishian wrote:
> On Fri, Jan 16, 2009 at 11:39 PM, Jacob Meuser <jake...@sdf.lonestar.org> 
> wrote:
> > On Fri, Jan 16, 2009 at 10:20:50PM -0800, patrick keshishian wrote:
> >> Quick fix is to surround '#include <sndio.h>' with
> >>
> >> #ifdef __cplusplus
> >> extern "C" {
> >> #endif
> 
> This was silly of me. The #ifdef __cplusplus bits are superfluous, it
> obviously is a C++ header file.
> 
> >> But shouldn't this be done in sndio.h header file itself with
> >> __{BEGIN,END}_DECLS pairs?
> >
> > well, maybe.
> 
> I think it should.
> 
> > I'd like to know why it's needed on ppc and not i386 or amd64.
> 
> That seems odd that it compiled and linked alright on those.
> 
> > seems like the problem is in ppc, or at least there's an (unnecessary?)
> > inconsistency between archs.
> 
> The compiler does the name mangling. I imagine both arch are using the
> same version of gcc 3.3.5, granted the spec file would be different.
> 
> What is the output of nm on your SNDIOoutput.o when compiled without
> the 'extern "C"' bit?

         U SAMPLE_RATE
00000000 F SNDIOoutput.C
         U SOUND_BUFFER_SIZE
000003b0 T _ZN11SNDIOoutput8SNDIOoutEPfS0_
000001d8 T _ZN11SNDIOoutputC1Ev
00000000 T _ZN11SNDIOoutputC2Ev
00000518 T _ZN11SNDIOoutputD1Ev
000004d0 T _ZN11SNDIOoutputD2Ev
         U __gxx_personality_v0
         U __sF
         U config
         U fprintf
         U free
         U malloc
         U memset
         U sio_close
         U sio_getpar
         U sio_initpar
         U sio_open
         U sio_setpar
         U sio_start
         U sio_write


-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to