summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkFileFilter.h8
-rw-r--r--generic/tkFont.h8
-rw-r--r--generic/tkInt.h8
-rw-r--r--generic/tkMain.c8
-rw-r--r--win/tkWinInt.h7
5 files changed, 38 insertions, 1 deletions
diff --git a/generic/tkFileFilter.h b/generic/tkFileFilter.h
index 131e423..22db9e8 100644
--- a/generic/tkFileFilter.h
+++ b/generic/tkFileFilter.h
@@ -13,6 +13,10 @@
#ifndef _TK_FILE_FILTER
#define _TK_FILE_FILTER
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define OSType long
typedef struct GlobPattern {
@@ -75,4 +79,8 @@ MODULE_SCOPE int TkGetFileFilters(Tcl_Interp *interp,
FileFilterList *flistPtr, Tcl_Obj *valuePtr,
int isWindows);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TK_FILE_FILTER */
diff --git a/generic/tkFont.h b/generic/tkFont.h
index 50f79d2..ceabee3 100644
--- a/generic/tkFont.h
+++ b/generic/tkFont.h
@@ -14,6 +14,10 @@
#ifndef _TKFONT
#define _TKFONT
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* The following structure keeps track of the attributes of a font. It can be
* used to keep track of either the desired attributes or the actual
@@ -221,4 +225,8 @@ MODULE_SCOPE void TkpGetFontFamilies(Tcl_Interp *interp,
Tk_Window tkwin);
MODULE_SCOPE TkFont * TkpGetNativeFont(Tk_Window tkwin, const char *name);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TKFONT */
diff --git a/generic/tkInt.h b/generic/tkInt.h
index ab06435..3158500 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -1111,6 +1111,10 @@ void Tcl_Panic(const char *, ...) __attribute__((analyzer_noreturn));
#include "tkIntDecls.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Themed widget set init function:
*/
@@ -1440,6 +1444,10 @@ MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp);
MODULE_SCOPE int TkplatformtestInit(Tcl_Interp *interp);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TKINT */
/*
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 879a7c0..b2fa845 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -32,6 +32,9 @@ static const char DEFAULT_PRIMARY_PROMPT[] = "% ";
* to strcmp here.
*/
#ifdef _WIN32
+#ifdef __cplusplus
+extern "C" {
+#endif
/* Little hack to eliminate the need for "tclInt.h" here:
Just copy a small portion of TclIntPlatStubs, just
enough to make it work. See [600b72bfbc] */
@@ -41,7 +44,10 @@ typedef struct TclIntPlatStubs {
void (*dummy[16]) (void); /* dummy entries 0-15, not used */
int (*tclpIsAtty) (int fd); /* 16 */
} TclIntPlatStubs;
-const TclIntPlatStubs *tclIntPlatStubsPtr;
+extern const TclIntPlatStubs *tclIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
# include "tkWinInt.h"
#else
# define TCHAR char
diff --git a/win/tkWinInt.h b/win/tkWinInt.h
index 7e3119e..92bcc0d 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -142,6 +142,9 @@ MODULE_SCOPE const int tkpWinBltModes[];
#include "tkIntPlatDecls.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* Special proc needed as tsd accessor function between
* tkWinX.c:GenerateXEvent and tkWinClipboard.c:UpdateClipboard
@@ -246,4 +249,8 @@ MODULE_SCOPE Tcl_Obj * TkWin32ErrorObj(HRESULT hrError);
#define GWLP_ID GWL_ID
#endif /* !GWLP_WNDPROC */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _TKWININT */