mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-09-20 09:16:15 +02:00
Include ../config.h for HAVE_UNISTD_H. Use it to guard inclusion of
2000-07-10 Tor Lillqvist <tml@iki.fi> * gobject-query.c: Include ../config.h for HAVE_UNISTD_H. Use it to guard inclusion of <unistd.h>. * gtype.h: Fix copy-paste errors in the ifdefs on how to declare a variable for export. Call the macro GOBJECT_VAR. * gtype.c: Declare _g_type_fundamental_last for export here, too. (type_node_any_new): Use only constant expressions for sizeof operator (for instance MSVC requires this). * makefile.mingw.in: Define GOBJECT_COMPILATION.
This commit is contained in:
parent
04bc211e6c
commit
f8b6715ab1
@ -1,3 +1,17 @@
|
|||||||
|
2000-07-10 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* gobject-query.c: Include ../config.h for HAVE_UNISTD_H. Use it
|
||||||
|
to guard inclusion of <unistd.h>.
|
||||||
|
|
||||||
|
* gtype.h: Fix copy-paste errors in the ifdefs on how to declare a
|
||||||
|
variable for export. Call the macro GOBJECT_VAR.
|
||||||
|
|
||||||
|
* gtype.c: Declare _g_type_fundamental_last for export here, too.
|
||||||
|
(type_node_any_new): Use only constant expressions for sizeof
|
||||||
|
operator (for instance MSVC requires this).
|
||||||
|
|
||||||
|
* makefile.mingw.in: Define GOBJECT_COMPILATION.
|
||||||
|
|
||||||
Sun Jul 9 21:21:46 2000 Owen Taylor <otaylor@redhat.com>
|
Sun Jul 9 21:21:46 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* genums.c: Move string.h include into the .c file
|
* genums.c: Move string.h include into the .c file
|
||||||
|
@ -16,11 +16,16 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ static ClassCacheFunc *class_cache_funcs = NULL;
|
|||||||
|
|
||||||
/* --- externs --- */
|
/* --- externs --- */
|
||||||
const char *g_log_domain_gobject = "GLib-Object";
|
const char *g_log_domain_gobject = "GLib-Object";
|
||||||
GType _g_type_fundamental_last = 0;
|
GOBJECT_VAR GType _g_type_fundamental_last = 0;
|
||||||
|
|
||||||
|
|
||||||
/* --- type nodes --- */
|
/* --- type nodes --- */
|
||||||
@ -206,7 +206,7 @@ type_node_any_new (TypeNode *pnode,
|
|||||||
if (!pnode)
|
if (!pnode)
|
||||||
node_size += sizeof (GTypeFundamentalInfo); /* fundamental type info */
|
node_size += sizeof (GTypeFundamentalInfo); /* fundamental type info */
|
||||||
node_size += SIZEOF_BASE_TYPE_NODE (); /* TypeNode structure */
|
node_size += SIZEOF_BASE_TYPE_NODE (); /* TypeNode structure */
|
||||||
node_size += sizeof (GType[1 + n_supers + 1]); /* self + anchestors + 0 for ->supers[] */
|
node_size += (sizeof (GType) * (1 + n_supers + 1)); /* self + ancestors + 0 for ->supers[] */
|
||||||
node = g_malloc0 (node_size);
|
node = g_malloc0 (node_size);
|
||||||
if (!pnode) /* fundamental type */
|
if (!pnode) /* fundamental type */
|
||||||
node = G_STRUCT_MEMBER_P (node, sizeof (GTypeFundamentalInfo));
|
node = G_STRUCT_MEMBER_P (node, sizeof (GTypeFundamentalInfo));
|
||||||
@ -231,7 +231,7 @@ type_node_any_new (TypeNode *pnode,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
node->supers[0] = type;
|
node->supers[0] = type;
|
||||||
memcpy (node->supers + 1, pnode->supers, sizeof (GType[1 + pnode->n_supers + 1]));
|
memcpy (node->supers + 1, pnode->supers, sizeof (GType) * (1 + pnode->n_supers + 1));
|
||||||
|
|
||||||
node->is_classed = pnode->is_classed;
|
node->is_classed = pnode->is_classed;
|
||||||
node->is_instantiatable = pnode->is_instantiatable;
|
node->is_instantiatable = pnode->is_instantiatable;
|
||||||
|
@ -334,16 +334,16 @@ void g_type_class_unref_uncached (gpointer g_class);
|
|||||||
#define _G_TYPE_CCT(cp, gt) (g_type_class_is_a ((GTypeClass*) cp, gt))
|
#define _G_TYPE_CCT(cp, gt) (g_type_class_is_a ((GTypeClass*) cp, gt))
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
# ifdef GMODULE_COMPILATION
|
# ifdef GOBJECT_COMPILATION
|
||||||
# define GTYPE_C_VAR __declspec(dllexport)
|
# define GOBJECT_VAR __declspec(dllexport)
|
||||||
# else /* !GLIB_COMPILATION */
|
# else /* !GOBJECT_COMPILATION */
|
||||||
# define GTYPE_C_VAR extern __declspec(dllimport)
|
# define GOBJECT_VAR extern __declspec(dllimport)
|
||||||
# endif /* !GLIB_COMPILATION */
|
# endif /* !GOBJECT_COMPILATION */
|
||||||
#else /* !G_OS_WIN32 */
|
#else /* !G_OS_WIN32 */
|
||||||
# define GTYPE_C_VAR extern
|
# define GOBJECT_VAR extern
|
||||||
#endif /* !G_OS_WIN32 */
|
#endif /* !G_OS_WIN32 */
|
||||||
|
|
||||||
GTYPE_C_VAR GType _g_type_fundamental_last;
|
GOBJECT_VAR GType _g_type_fundamental_last;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ include $(TOP)/build/win32/make.mingw
|
|||||||
# Nothing much configurable below
|
# Nothing much configurable below
|
||||||
|
|
||||||
INCLUDES = -I .. -I .
|
INCLUDES = -I .. -I .
|
||||||
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=g_log_domain_gobject
|
DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gobject
|
||||||
|
|
||||||
BUILD_DLL = ../build-dll
|
BUILD_DLL = ../build-dll
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user