449 – frontend: html.h and complex_t.h are unprotected against multiple inclusion

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 449 - frontend: html.h and complex_t.h are unprotected against multiple inclusion
Summary: frontend: html.h and complex_t.h are unprotected against multiple inclusion
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 trivial
Assignee: Walter Bright
URL:
Keywords: patch
Depends on:
Blocks:
Reported: 2006年10月24日 06:27 UTC by Thomas Kühne
Modified: 2014年02月15日 13:20 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Thomas Kühne 2006年10月24日 06:27:51 UTC
=== complex_t.h
==================================================================
--- complex_t.h	(revision 2008)
+++ complex_t.h	(local)
@@ -11,6 +11,9 @@
 /* Roll our own complex type for compilers that don't support complex
 */
 
+#ifndef DMD_COMPLEX_T_H
+#define DMD_COMPLEX_T_H
+
 struct complex_t
 {
 long double re;
@@ -68,4 +71,4 @@
 return x.im;
 }
 
-
+#endif
=== html.h
==================================================================
--- html.h	(revision 2008)
+++ html.h	(local)
@@ -8,6 +8,9 @@
 // in artistic.txt, or the GNU General Public License in gnu.txt.
 // See the included readme.txt for details.
 
+#ifndef DMD_HTML_H
+#define DMD_HTML_H
+
 struct OutBuffer;
 
 struct Html
@@ -36,3 +39,5 @@
 int charEntity();
 static int namedEntity(unsigned char *p, int length);
 };
+
+#endif
Comment 1 Walter Bright 2006年11月09日 02:16:07 UTC
Incorporated DMD 0.173


AltStyle によって変換されたページ (->オリジナル) /