Skip to content

Commit 0ce9dc9

Browse files
committed
general: Move inclusion of checkPandaVersion.h to dtoolbase
This includes it everywhere, meaning developers no longer must remember to include it in each metalib init file.
1 parent 35ab16d commit 0ce9dc9

File tree

17 files changed

+7
-96
lines changed

17 files changed

+7
-96
lines changed

dtool/src/dtoolbase/dtoolbase_cc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919

2020
#ifdef __cplusplus
2121

22+
// By including checkPandaVersion.h, we guarantee that runtime attempts to
23+
// load any DLL will fail if they inadvertently link with the wrong version of
24+
// dtool, which, transitively, means all DLLs must be from the same
25+
// (ABI-compatible) version of Panda.
26+
27+
#include "checkPandaVersion.h"
28+
2229
#ifdef USE_TAU
2330
// Tau provides this destructive version of stdbool.h that we must mask.
2431
#define __PDT_STDBOOL_H_

panda/metalibs/panda/panda.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
#include "config_pstatclient.h"
1515
#endif
1616

17-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
18-
// load libpanda.so.dll will fail if they inadvertently link with the wrong
19-
// version of libdtool.so.dll.
20-
21-
#include "checkPandaVersion.h"
22-
2317
#if !defined(CPPPARSER) && !defined(BUILDING_LIBPANDA)
2418
#error Buildsystem error: BUILDING_LIBPANDA not defined
2519
#endif

panda/metalibs/pandabullet/pandabullet.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
#include "pandabullet.h"
88
#include "config_bullet.h"
99

10-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
11-
// load libpandabullet.so.dll will fail if they inadvertently link with the
12-
// wrong version of libdtool.so.dll.
13-
14-
#include "checkPandaVersion.h"
15-
1610
/**
1711
* Initializes the library. This must be called at least once before any of
1812
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandadx9/pandadx9.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
#include "config_dxgsg9.h"
1010
#include "wdxGraphicsPipe9.h"
1111

12-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
13-
// load libpandadx9.dll will fail if they inadvertently link with the wrong
14-
// version of libdtool.dll.
15-
16-
#include "checkPandaVersion.h"
17-
1812
/**
1913
* Initializes the library. This must be called at least once before any of
2014
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandaegg/pandaegg.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
#include "config_egg.h"
1010
#include "config_egg2pg.h"
1111

12-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
13-
// load libpandaegg.so.dll will fail if they inadvertently link with the wrong
14-
// version of libdtool.so.dll.
15-
16-
#include "checkPandaVersion.h"
17-
1812
/**
1913
* Initializes the library. This must be called at least once before any of
2014
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandaegg/pandaeggnopg.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
#include "config_egg.h"
1010

11-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
12-
// load libpandaegg.so.dll will fail if they inadvertently link with the wrong
13-
// version of libdtool.so.dll.
14-
15-
#include "checkPandaVersion.h"
16-
1711
/**
1812
* Initializes the library. This must be called at least once before any of
1913
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandaexpress/pandaexpress.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@
33
* @author drose
44
* @date 2000-05-15
55
*/
6-
7-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
8-
// load libpandaexpress.so.dll will fail if they inadvertently link with the
9-
// wrong version of libdtool.so.dll.
10-
11-
#include "checkPandaVersion.h"

panda/metalibs/pandafx/pandafx.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
#include "config_distort.h"
1010

11-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
12-
// load libpandafx.so.dll will fail if they inadvertently link with the wrong
13-
// version of libdtool.so.dll.
14-
15-
#include "checkPandaVersion.h"
16-
1711
/**
1812
* Initializes the library. This must be called at least once before any of
1913
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandagl/pandagl.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030
#error One of HAVE_WGL, HAVE_COCOA, HAVE_CARBON or HAVE_GLX must be defined when compiling pandagl!
3131
#endif
3232

33-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
34-
// load libpandagl.so.dll will fail if they inadvertently link with the wrong
35-
// version of libdtool.so.dll.
36-
37-
#include "checkPandaVersion.h"
38-
3933
/**
4034
* Initializes the library. This must be called at least once before any of
4135
* the functions or classes in this library can be used. Normally it will be

panda/metalibs/pandagles/pandagles.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
#include "eglGraphicsPipe.h"
1818
#endif
1919

20-
// By including checkPandaVersion.h, we guarantee that runtime attempts to
21-
// load libpandagles.so.dll will fail if they inadvertently link with the
22-
// wrong version of libdtool.so.dll.
23-
24-
#include "checkPandaVersion.h"
25-
2620
/**
2721
* Initializes the library. This must be called at least once before any of
2822
* the functions or classes in this library can be used. Normally it will be

0 commit comments

Comments
 (0)