# HG changeset patch # User didierv # Date 1086257446 0 # Node ID f18c80177dfed972a713064d0a6d5e16bd7107a7 # Parent 92b1c3ca48249a699786964b099b47e019df38cc [xemacs-hg @ 2004-06-03 10:10:45 by didierv] EXTERN_C fixes diff -r 92b1c3ca4824 -r f18c80177dfe src/ChangeLog --- a/src/ChangeLog Wed Jun 02 21:50:49 2004 +0000 +++ b/src/ChangeLog Thu Jun 03 10:10:46 2004 +0000 @@ -1,3 +1,10 @@ +2004-06-03 Didier Verna + + * config.h.in (EXTERN_C_BLOCK_BEGIN): New macro. + (EXTERN_C_BLOCK_END): Ditto. + * nas.c: Use them around audio headers. + * extw-Xt.c: Fix EXTERN_C usage (see 2004-06-02 below). + 2004-06-02 Didier Verna C++ related fixes. diff -r 92b1c3ca4824 -r f18c80177dfe src/config.h.in --- a/src/config.h.in Wed Jun 02 21:50:49 2004 +0000 +++ b/src/config.h.in Thu Jun 03 10:10:46 2004 +0000 @@ -957,8 +957,12 @@ # define catch c_catch # define EXTERN_C extern "C" +# define EXTERN_C_BLOCK_BEGIN extern "C" { +# define EXTERN_C_BLOCK_END } # else /* C code */ # define EXTERN_C extern +# define EXTERN_C_BLOCK_BEGIN +# define EXTERN_C_BLOCK_END # endif #endif /* C or C++ */ diff -r 92b1c3ca4824 -r f18c80177dfe src/extw-Xt.c --- a/src/extw-Xt.c Wed Jun 02 21:50:49 2004 +0000 +++ b/src/extw-Xt.c Thu Jun 03 10:10:46 2004 +0000 @@ -28,10 +28,7 @@ ERROR! This ought not be getting compiled if EXTERNAL_WIDGET is undefined #endif -EXTERN_C -{ -void fatal (const char *fmt, ...); -} +EXTERN_C void fatal (const char *fmt, ...); #else /* not emacs */ static void fatal (char *msg); #endif @@ -48,16 +45,14 @@ for real? */ #if (XT_REVISION > 5) -EXTERN_C -{ - int _XtWaitForSomething (XtAppContext app, _XtBoolean ignoreEvents, - _XtBoolean ignoreTimers, _XtBoolean ignoreInputs, - _XtBoolean ignoreSignals, _XtBoolean block, +EXTERN_C int +_XtWaitForSomething (XtAppContext app, _XtBoolean ignoreEvents, + _XtBoolean ignoreTimers, _XtBoolean ignoreInputs, + _XtBoolean ignoreSignals, _XtBoolean block, #ifdef XTHREADS - _XtBoolean drop_lock, + _XtBoolean drop_lock, #endif - unsigned long *howlong); -} + unsigned long *howlong); # ifndef XTHREADS # define _XT_WAIT_FOR_SOMETHING(timers,inputs,events,block,howlong,appCtx) \ @@ -67,12 +62,10 @@ _XtWaitForSomething (appCtx,events,timers,inputs,0,block,1,howlong) # endif #else -EXTERN_C -{ - int _XtwaitForSomething (Boolean ignoreTimers, Boolean ignoreInputs, - Boolean ignoreEvents, Boolean block, - unsigned long *howlong, XtAppContext app); -} +EXTERN_C int +_XtwaitForSomething (Boolean ignoreTimers, Boolean ignoreInputs, + Boolean ignoreEvents, Boolean block, + unsigned long *howlong, XtAppContext app); #endif #ifdef DEBUG_WIDGET diff -r 92b1c3ca4824 -r f18c80177dfe src/nas.c --- a/src/nas.c Wed Jun 02 21:50:49 2004 +0000 +++ b/src/nas.c Thu Jun 03 10:10:46 2004 +0000 @@ -80,14 +80,14 @@ #undef LITTLE_ENDIAN #undef BIG_ENDIAN -EXTERN_C -{ +EXTERN_C_BLOCK_BEGIN #include