summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2003-11-04 07:44:19 +0000
committerWerner Lemberg <wl@gnu.org>2003-11-04 07:44:19 +0000
commitab3e9140009301fd028b639ab00389c1d7e5d4cc (patch)
tree081d7bc3e7e96eed2b1c37b22f73655f81391c0c
parent9669c52a3086cd89a880336d146a0e1431862943 (diff)
downloadfreetype2-ab3e9140009301fd028b639ab00389c1d7e5d4cc.tar.gz
* include/freetype/*: Add a guard to all public header files which
load FT_FREETYPE_H to reject freetype.h from FreeType 1.
-rw-r--r--ChangeLog5
-rw-r--r--include/freetype/cache/ftlru.h8
-rw-r--r--include/freetype/ftbbox.h8
-rw-r--r--include/freetype/ftbdf.h6
-rw-r--r--include/freetype/ftglyph.h6
-rw-r--r--include/freetype/ftgzip.h7
-rw-r--r--include/freetype/ftincrem.h6
-rw-r--r--include/freetype/ftlist.h8
-rw-r--r--include/freetype/ftmodapi.h6
-rw-r--r--include/freetype/ftoutln.h6
-rw-r--r--include/freetype/ftpfr.h6
-rw-r--r--include/freetype/ftsizes.h6
-rw-r--r--include/freetype/ftsnames.h8
-rw-r--r--include/freetype/ftsynth.h8
-rw-r--r--include/freetype/fttrigon.h6
-rw-r--r--include/freetype/ftwinfnt.h6
-rw-r--r--include/freetype/ftxf86.h9
-rw-r--r--include/freetype/t1tables.h6
-rw-r--r--include/freetype/tttables.h6
-rw-r--r--include/freetype/tttags.h6
-rw-r--r--include/freetype/ttunpat.h6
21 files changed, 133 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a4b7f8f6..c4587bdf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/*: Add a guard to all public header files which
+ load FT_FREETYPE_H to reject freetype.h from FreeType 1.
+
2003-11-02 Patrick Welche <prlw1@newn.cam.ac.uk>
* builds/unix/freetype2.m4, builds/unix/ft-munmap.m4: Protect
diff --git a/include/freetype/cache/ftlru.h b/include/freetype/cache/ftlru.h
index 9e4507efa..d446c60be 100644
--- a/include/freetype/cache/ftlru.h
+++ b/include/freetype/cache/ftlru.h
@@ -4,7 +4,7 @@
/* */
/* Simple LRU list-cache (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,6 +62,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftbbox.h b/include/freetype/ftbbox.h
index e6616135a..f98c89eb2 100644
--- a/include/freetype/ftbbox.h
+++ b/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,6 +34,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftbdf.h b/include/freetype/ftbdf.h
index 3d2d04b3d..aa411440d 100644
--- a/include/freetype/ftbdf.h
+++ b/include/freetype/ftbdf.h
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index ad60795e6..8019e1602 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -36,6 +36,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftgzip.h b/include/freetype/ftgzip.h
index 673b4885b..5d7228bb4 100644
--- a/include/freetype/ftgzip.h
+++ b/include/freetype/ftgzip.h
@@ -22,6 +22,13 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
FT_BEGIN_HEADER
/*************************************************************************/
diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h
index e3477120e..6a1aa1fc3 100644
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftlist.h b/include/freetype/ftlist.h
index 1c5101700..ae9801b9d 100644
--- a/include/freetype/ftlist.h
+++ b/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,6 +31,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 2561e5e1d..1929ca025 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -23,6 +23,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 8c6a689df..79ed35b59 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftpfr.h b/include/freetype/ftpfr.h
index 7b687dacc..c9a567544 100644
--- a/include/freetype/ftpfr.h
+++ b/include/freetype/ftpfr.h
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftsizes.h b/include/freetype/ftsizes.h
index 492ba6399..f0ec91599 100644
--- a/include/freetype/ftsizes.h
+++ b/include/freetype/ftsizes.h
@@ -32,6 +32,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftsnames.h b/include/freetype/ftsnames.h
index 356f98349..0e2d9a4ad 100644
--- a/include/freetype/ftsnames.h
+++ b/include/freetype/ftsnames.h
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftsynth.h b/include/freetype/ftsynth.h
index 2424ff627..f0c738532 100644
--- a/include/freetype/ftsynth.h
+++ b/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,6 +41,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/fttrigon.h b/include/freetype/fttrigon.h
index cf0650e2f..0462265e3 100644
--- a/include/freetype/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -21,6 +21,12 @@
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftwinfnt.h b/include/freetype/ftwinfnt.h
index 9b308af27..61234d4ce 100644
--- a/include/freetype/ftwinfnt.h
+++ b/include/freetype/ftwinfnt.h
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ftxf86.h b/include/freetype/ftxf86.h
index 5a7582f91..aa93275a4 100644
--- a/include/freetype/ftxf86.h
+++ b/include/freetype/ftxf86.h
@@ -4,7 +4,7 @@
/* */
/* Support functions for X11. */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,13 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
FT_BEGIN_HEADER
/* this comment is intentionally disabled for now, to prevent this */
diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h
index 70ea43897..af8c41611 100644
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index 8c67447c3..32f78be6d 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/tttags.h b/include/freetype/tttags.h
index df09f2a69..ac64758b1 100644
--- a/include/freetype/tttags.h
+++ b/include/freetype/tttags.h
@@ -23,6 +23,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/include/freetype/ttunpat.h b/include/freetype/ttunpat.h
index e4885aaa3..0bc0a6fe0 100644
--- a/include/freetype/ttunpat.h
+++ b/include/freetype/ttunpat.h
@@ -25,6 +25,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER