[glib/wip/gcleanup: 4/7] gconstructor: install as a proper header



commit f4dd968b036b44847c42ab7ddee6c59cb1ef8366
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Mar 24 21:17:40 2013 -0400

    gconstructor: install as a proper header

 glib/Makefile.am    |    2 +-
 glib/gconstructor.h |   29 +++++++++++++++++++++++++++++
 glib/glib.h         |    1 +
 3 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 9230ecc..272620b 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -71,7 +71,6 @@ EXTRA_DIST +=                         \
        win_iconv.c             \
        libglib-gdb.py.in       \
        docs.c                  \
-       gconstructor.h          \
        $(MIRRORING_TAB_SOURCE)
 
 CLEANFILES += libglib-gdb.py
@@ -255,6 +254,7 @@ glibsubinclude_HEADERS = \
        gbytes.h        \
        gcharset.h      \
        gchecksum.h     \
+       gconstructor.h  \
        gconvert.h      \
        gdataset.h      \
        gdate.h         \
diff --git a/glib/gconstructor.h b/glib/gconstructor.h
index c5cff19..e6204f4 100644
--- a/glib/gconstructor.h
+++ b/glib/gconstructor.h
@@ -1,3 +1,31 @@
+/**
+ * Copyright © 2012 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the licence, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Alexander Larsson <alexl redhat com>
+ **/
+
+#ifndef __G_CONSTRUCTOR_H__
+#define __G_CONSTRUCTOR_H__
+
+#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
+#error "Only <glib.h> can be included directly."
+#endif
+
 /*
   If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
   destructors, in a sane way, including e.g. on library unload. If not you're on
@@ -89,3 +117,4 @@
 
 #endif
 
+#endif /* __G_CONSTRUCTOR_H__ */
diff --git a/glib/glib.h b/glib/glib.h
index ce7447e..c117761 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -40,6 +40,7 @@
 #include <glib/gbytes.h>
 #include <glib/gcharset.h>
 #include <glib/gchecksum.h>
+#include <glib/gconstructor.h>
 #include <glib/gconvert.h>
 #include <glib/gdataset.h>
 #include <glib/gdate.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]