diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5399d68901..e1feb8a0fa 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,27 @@ +2000-03-27 23:20 GMT-5 David G. Holm + * include/hbapi.h + * include/hbapierr.h + * include/hbapifs.h + * include/hbapigt.h + * include/hbapiitm.h + * include/hbapilng.h + * include/hbapirdd.h + * include/hbcomp.h + * include/hbdate.h + * include/hberrors.h + * include/hbexprop.h + * include/hbinit.h + * include/hbmacro.h + * include/hbpp.h + * include/hbset.h + * include/hbsetup.h + * include/hbtrace.h + * include/hbvm.h + * include/hbvmpub.h + % Changed from using #if defined(__cplusplus) to using #if + defined(HB_EXTERN_C) and added definition of HB_EXTERN_C to + hbsetup.h #if defined(__cplusplus) && !defined(__IBMCPP__) + 20000328-03:35 GMT+1 Victor Szakats + doc/c_std.txt diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 62b563c725..cd831f2dce 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -44,8 +44,8 @@ #include "hbdefs.h" #include "hbvmpub.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* items types and type checking macros */ @@ -484,8 +484,8 @@ extern char * hb_macroGetType( HB_ITEM_PTR ); extern char * hb_version( USHORT uiMode ); extern char * hb_valtypeGet( HB_ITEM_PTR ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIEXT_H_ */ diff --git a/harbour/include/hbapierr.h b/harbour/include/hbapierr.h index 951151f31d..1cdb20746e 100644 --- a/harbour/include/hbapierr.h +++ b/harbour/include/hbapierr.h @@ -39,8 +39,8 @@ #include "hbapi.h" #include "error.ch" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* Error codes (returned from hb_errLaunch()) */ @@ -155,8 +155,8 @@ typedef struct HB_ERROR_INFO_ /* set/get current error handler */ extern HB_ERROR_INFO_PTR hb_errorHandler( HB_ERROR_INFO_PTR ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIERR_H_ */ diff --git a/harbour/include/hbapifs.h b/harbour/include/hbapifs.h index db1648fa22..3c169b11bc 100644 --- a/harbour/include/hbapifs.h +++ b/harbour/include/hbapifs.h @@ -57,8 +57,8 @@ #include "hbapi.h" #include "fileio.ch" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif #define FS_ERROR F_ERROR @@ -131,8 +131,8 @@ typedef struct extern PHB_FNAME hb_fsFNameSplit( char * pszFileName ); /* Split given filename into path, name and extension */ extern char * hb_fsFNameMerge( char * pszFileName, PHB_FNAME pFileName ); /* This function joins path, name and extension into a string with a filename */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIFS_H_ */ diff --git a/harbour/include/hbapigt.h b/harbour/include/hbapigt.h index 7126727111..08c00e59cd 100644 --- a/harbour/include/hbapigt.h +++ b/harbour/include/hbapigt.h @@ -54,8 +54,8 @@ #include "hbapi.h" #include "color.ch" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* NOTE: The declaration of hb_gtSetPos(), hb_gtGetPos(), hb_gtWrite(), @@ -217,8 +217,8 @@ extern int hb_mouse_CountButton( void ); extern void hb_mouse_SetBounds( int iTop, int iLeft, int iBottom, int iRight ); extern void hb_mouse_GetBounds( int * piTop, int * piLeft, int * piBottom, int * piRight ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIGT_H_ */ diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index 5f3e4874fc..15ea4ffb2e 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -38,8 +38,8 @@ #include "hbapi.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif #define HB_EVAL_PARAM_MAX_ 9 @@ -108,8 +108,8 @@ extern char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pD extern char * hb_itemString ( PHB_ITEM pItem, ULONG * ulLen, BOOL * bFreeReq ); /* Convert any scalar to a string */ extern PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a string */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIITM_H_ */ diff --git a/harbour/include/hbapilng.h b/harbour/include/hbapilng.h index 0cf33cbb93..84df8d565d 100644 --- a/harbour/include/hbapilng.h +++ b/harbour/include/hbapilng.h @@ -36,8 +36,8 @@ #ifndef HB_APILNG_H_ #define HB_APILNG_H_ -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif #define HB_LANG_TEXT_DATEFMT 0 @@ -107,8 +107,8 @@ extern char * hb_langDGetErrorIntr ( ULONG ulIndex ); extern PHB_LANG hb_langNew ( void ); extern void hb_langDelete ( PHB_LANG lang ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APILNG_H_ */ diff --git a/harbour/include/hbapirdd.h b/harbour/include/hbapirdd.h index df9afd5c9f..13fd28bfbb 100644 --- a/harbour/include/hbapirdd.h +++ b/harbour/include/hbapirdd.h @@ -39,8 +39,8 @@ #include "hbapi.h" #include "hbapifs.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* RDD virtual machine integration functions */ @@ -1102,8 +1102,8 @@ extern ERRCODE hb_rddDisinherit( BYTE * drvName ); extern USHORT hb_rddExtendType( USHORT fieldType ); extern USHORT hb_rddFieldType( USHORT extendType ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_APIRDD_H_ */ diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index ada203af52..e146ff1786 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -49,8 +49,8 @@ #include "hbexprop.h" #include "hbpcode.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* compiler related declarations */ @@ -371,8 +371,8 @@ extern char * hb_comp_szWarnings[]; #define HB_EXITLEVEL_SETEXIT 1 #define HB_EXITLEVEL_DELTARGET 2 -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_COMP_H_ */ diff --git a/harbour/include/hbdate.h b/harbour/include/hbdate.h index 9689f8f552..e62df4fc14 100644 --- a/harbour/include/hbdate.h +++ b/harbour/include/hbdate.h @@ -36,8 +36,8 @@ #ifndef HB_DATE_H_ #define HB_DATE_H_ -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* In msgxxx.c modules */ @@ -56,8 +56,8 @@ extern void hb_dateStrGet( const char * szDate, long * plDay, long * plMonth extern char * hb_dateDecStr( char * szDate, long lJulian ); extern long hb_dateEncStr( char * szDate ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_DATE_H_ */ diff --git a/harbour/include/hberrors.h b/harbour/include/hberrors.h index bdebb5e7d8..99ca4b3de7 100644 --- a/harbour/include/hberrors.h +++ b/harbour/include/hberrors.h @@ -36,8 +36,8 @@ #ifndef HB_ERRORS_H_ #define HB_ERRORS_H_ -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* @@ -130,8 +130,8 @@ extern void hb_compGenError( char * _szErrors[], char cPrefix, int iError, char * szError1, char * szError2 ); /* generic parsing error management function */ extern void hb_compGenWarning( char * _szWarnings[], char cPrefix, int iWarning, char * szWarning1, char * szWarning2); /* generic parsing warning management function */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_ERRORS_H_ */ diff --git a/harbour/include/hbexprop.h b/harbour/include/hbexprop.h index 6b67a9cdc6..ab011d23f2 100644 --- a/harbour/include/hbexprop.h +++ b/harbour/include/hbexprop.h @@ -38,8 +38,8 @@ #include "hbapi.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* value types seen at language level @@ -351,8 +351,8 @@ void hb_compExprDelete( HB_EXPR_PTR ); #endif -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_EXPROP_H_ */ diff --git a/harbour/include/hbinit.h b/harbour/include/hbinit.h index c3b54eb8cd..b866eaa852 100644 --- a/harbour/include/hbinit.h +++ b/harbour/include/hbinit.h @@ -36,8 +36,8 @@ #ifndef HB_INIT_H_ #define HB_INIT_H_ -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif extern void hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ); /* statics symbols initialization */ @@ -132,8 +132,8 @@ extern void hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbols ); /* stati #endif /* HARBOUR_STRICT_ANSI_C */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_INIT_H_ */ diff --git a/harbour/include/hbmacro.h b/harbour/include/hbmacro.h index 87b2ce11eb..9f3c8c6f23 100644 --- a/harbour/include/hbmacro.h +++ b/harbour/include/hbmacro.h @@ -55,8 +55,8 @@ #include "hbexprop.h" #include "hbpcode.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* flags for compilation process @@ -135,8 +135,8 @@ extern void hb_compGenPCodeN( BYTE * pBuffer, ULONG ulSize, HB_MACRO_DECL ); extern void hb_compCodeBlockStart( HB_MACRO_DECL ); extern void hb_compCodeBlockEnd( HB_MACRO_DECL ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_MACRO_H_ */ diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index 074ca5a255..e5a166348a 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -41,8 +41,8 @@ #include "hberrors.h" #include "hbver.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* the list of pathnames to search with #include */ @@ -107,8 +107,8 @@ extern DEFINES * hb_pp_topDefine; extern COMMANDS * hb_pp_topCommand; extern COMMANDS * hb_pp_topTranslate; -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_PP_H_ */ diff --git a/harbour/include/hbset.h b/harbour/include/hbset.h index 0eabe6778f..712b9126d7 100644 --- a/harbour/include/hbset.h +++ b/harbour/include/hbset.h @@ -86,8 +86,8 @@ #include "hbapifs.h" #include "hbapigt.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif typedef enum @@ -211,8 +211,8 @@ extern HB_SET_STRUCT hb_set; extern void hb_setInitialize( void ); extern void hb_setRelease( void ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_SET_H_ */ diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 5c8e874984..06871a242f 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -232,5 +232,12 @@ #endif #endif -#endif /* HB_SETUP_H_ */ +/* *********************************************************************** + * Extern "C" detection + */ +#if defined(__cplusplus) && !defined(__IBMCPP__) + #define HB_EXTERN_C +#endif + +#endif /* HB_SETUP_H_ */ diff --git a/harbour/include/hbtrace.h b/harbour/include/hbtrace.h index 235e75cc06..f0f8132d28 100644 --- a/harbour/include/hbtrace.h +++ b/harbour/include/hbtrace.h @@ -36,8 +36,8 @@ #ifndef HB_TRACE_H_ #define HB_TRACE_H_ -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* @@ -185,8 +185,8 @@ extern int hb_tracelevel( int new_level ); extern int hb_tr_level( void ); extern void hb_tr_trace( char * fmt, ... ); -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_TRACE_H_ */ diff --git a/harbour/include/hbvm.h b/harbour/include/hbvm.h index 9c8e258ea0..bd258193b7 100644 --- a/harbour/include/hbvm.h +++ b/harbour/include/hbvm.h @@ -38,8 +38,8 @@ #include "hbapi.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif /* Harbour virtual machine init/exit functions */ @@ -89,8 +89,8 @@ extern void hb_vmPushSymbol( PHB_SYMB pSym ); /* pushes a function pointer on extern void hb_stackDispCall( void ); extern void hb_stackPop( void ); /* pops an item from the stack */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_VM_H_ */ diff --git a/harbour/include/hbvmpub.h b/harbour/include/hbvmpub.h index 3dd8f7fcb8..dbb310c178 100644 --- a/harbour/include/hbvmpub.h +++ b/harbour/include/hbvmpub.h @@ -38,8 +38,8 @@ #include "hbdefs.h" -#if defined(__cplusplus) -//extern "C" { +#if defined(HB_EXTERN_C) +extern "C" { #endif struct _HB_DYNS; @@ -76,8 +76,8 @@ typedef HB_DYNS_FUNC( PHB_DYNS_FUNC ); extern void hb_vmExecute( BYTE * pCode, PHB_SYMB pSymbols ); /* invokes the virtual machine */ -#if defined(__cplusplus) -//} +#if defined(HB_EXTERN_C) +} #endif #endif /* HB_VMPUB_H_ */