mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Remove alleged support for last-millennium Unixes
Remove workarounds for NeXTStep (last released in 1995), SunOS (1994), HP-UX 9.x (1992) and 10.x (1995), OSF/1 / Digital UNIX / Tru64 UNIX 4.x (1999), and AIX 4.x (1999). HP-UX 11 implements dlopen(), so dropping support for earlier versions also lets us remove the HP-UX-specific gmodule-dld. https://bugzilla.gnome.org/show_bug.cgi?id=710519
This commit is contained in:
parent
51a917bc16
commit
7f5b2901cf
66
configure.ac
66
configure.ac
@ -507,42 +507,6 @@ AS_IF([test "$glib_native_win32" = "yes"], [
|
|||||||
])
|
])
|
||||||
AM_CONDITIONAL(OS_WIN32_AND_DLL_COMPILATION, [test x$glib_native_win32 = xyes -a x$glib_win32_static_compilation != xyes])
|
AM_CONDITIONAL(OS_WIN32_AND_DLL_COMPILATION, [test x$glib_native_win32 = xyes -a x$glib_win32_static_compilation != xyes])
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
|
|
||||||
dnl
|
|
||||||
AS_IF([test $cross_compiling != yes], [
|
|
||||||
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
|
|
||||||
glib_save_LIBS=$LIBS
|
|
||||||
LIBS="$LIBS -lm"
|
|
||||||
AC_TRY_RUN([#include <math.h>
|
|
||||||
int main (void) { return (log(1) != log(1.)); }],
|
|
||||||
AC_MSG_RESULT(none needed),
|
|
||||||
glib_save_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -std1"
|
|
||||||
AC_TRY_RUN([#include <math.h>
|
|
||||||
int main (void) { return (log(1) != log(1.)); }],
|
|
||||||
AC_MSG_RESULT(-std1),
|
|
||||||
AC_MSG_RESULT()
|
|
||||||
CFLAGS=$glib_save_CFLAGS
|
|
||||||
AC_MSG_WARN(
|
|
||||||
[No ANSI prototypes found in library. (-std1 didn't work.)])
|
|
||||||
)
|
|
||||||
)
|
|
||||||
LIBS=$glib_save_LIBS
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl NeXTStep cc seems to need this
|
|
||||||
AC_MSG_CHECKING([for extra flags for POSIX compliance])
|
|
||||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
|
||||||
AC_MSG_RESULT(none needed),
|
|
||||||
glib_save_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS -posix"
|
|
||||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
|
||||||
AC_MSG_RESULT(-posix),
|
|
||||||
AC_MSG_RESULT()
|
|
||||||
CFLAGS=$glib_save_CFLAGS
|
|
||||||
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
|
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
@ -1573,13 +1537,6 @@ AS_IF([ test -z "$G_MODULE_IMPL"], [
|
|||||||
G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
|
G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
|
||||||
[])
|
[])
|
||||||
])
|
])
|
||||||
dnl *** shl_load() in libdld (HP-UX)
|
|
||||||
AS_IF([ test -z "$G_MODULE_IMPL"], [
|
|
||||||
AC_CHECK_LIB(dld, shl_load,
|
|
||||||
[G_MODULE_LIBS=-ldld
|
|
||||||
G_MODULE_IMPL=G_MODULE_IMPL_DLD],
|
|
||||||
[])
|
|
||||||
])
|
|
||||||
dnl *** additional checks for G_MODULE_IMPL_DL
|
dnl *** additional checks for G_MODULE_IMPL_DL
|
||||||
AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
|
AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
|
||||||
LIBS_orig="$LIBS"
|
LIBS_orig="$LIBS"
|
||||||
@ -1993,24 +1950,20 @@ AC_MSG_CHECKING(for thread implementation)
|
|||||||
|
|
||||||
have_threads=no
|
have_threads=no
|
||||||
AS_IF([ test "x$with_threads" = xyes || test "x$with_threads" = xposix], [
|
AS_IF([ test "x$with_threads" = xyes || test "x$with_threads" = xposix], [
|
||||||
# -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE is for DG/UX
|
|
||||||
# -U_OSF_SOURCE is for Digital UNIX 4.0d
|
|
||||||
GTHREAD_COMPILE_IMPL_DEFINES="-D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE -U_OSF_SOURCE"
|
|
||||||
glib_save_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES"
|
|
||||||
AS_IF([ test "x$have_threads" = xno], [
|
AS_IF([ test "x$have_threads" = xno], [
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
AC_TRY_COMPILE([#include <pthread.h>],
|
||||||
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
|
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
|
||||||
have_threads=posix)
|
have_threads=posix)
|
||||||
])
|
])
|
||||||
# Tru64Unix requires -pthread to find pthread.h. See #103020
|
# Tru64Unix requires -pthread to find pthread.h. See #103020
|
||||||
CPPFLAGS="$CPPFLAGS -pthread"
|
|
||||||
if test "x$have_threads" = xno; then
|
if test "x$have_threads" = xno; then
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
glib_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS -pthread"
|
||||||
|
AC_TRY_COMPILE([#include <pthread.h>],
|
||||||
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
|
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
|
||||||
have_threads=posix)
|
have_threads=posix)
|
||||||
|
CPPFLAGS="$glib_save_CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
CPPFLAGS="$glib_save_CPPFLAGS"
|
|
||||||
])
|
])
|
||||||
if test "x$with_threads" = xyes || test "x$with_threads" = xwin32; then
|
if test "x$with_threads" = xyes || test "x$with_threads" = xwin32; then
|
||||||
case $host in
|
case $host in
|
||||||
@ -2110,9 +2063,6 @@ AS_IF([ test x"$G_THREAD_CFLAGS" = x], [
|
|||||||
G_THREAD_CFLAGS="-D_THREAD_SAFE"
|
G_THREAD_CFLAGS="-D_THREAD_SAFE"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-dg-dgux*) # DG/UX
|
|
||||||
G_THREAD_CFLAGS="-D_REENTRANT -D_POSIX4A_DRAFT10_SOURCE"
|
|
||||||
;;
|
|
||||||
*-sysv5uw7*) # UnixWare 7
|
*-sysv5uw7*) # UnixWare 7
|
||||||
# We are not using gcc with -pthread. Catched above.
|
# We are not using gcc with -pthread. Catched above.
|
||||||
G_THREAD_CFLAGS="-Kthread"
|
G_THREAD_CFLAGS="-Kthread"
|
||||||
@ -3117,7 +3067,7 @@ _______EOF
|
|||||||
if test x$g_have_eilseq = xno; then
|
if test x$g_have_eilseq = xno; then
|
||||||
cat >>$outfile <<_______EOF
|
cat >>$outfile <<_______EOF
|
||||||
#ifndef EILSEQ
|
#ifndef EILSEQ
|
||||||
/* On some systems, like SunOS and NetBSD, EILSEQ is not defined.
|
/* On some pre-C99 systems, EILSEQ is not defined.
|
||||||
* The correspondence between this and the corresponding definition
|
* The correspondence between this and the corresponding definition
|
||||||
* in libiconv is essential.
|
* in libiconv is essential.
|
||||||
*/
|
*/
|
||||||
@ -3440,11 +3390,7 @@ esac
|
|||||||
case xyes in
|
case xyes in
|
||||||
x$ac_cv_func_atexit)
|
x$ac_cv_func_atexit)
|
||||||
glib_atexit="
|
glib_atexit="
|
||||||
#ifdef NeXT /* @#%@! NeXTStep */
|
#define g_ATEXIT(proc) (atexit (proc))"
|
||||||
# define g_ATEXIT(proc) (!atexit (proc))
|
|
||||||
#else
|
|
||||||
# define g_ATEXIT(proc) (atexit (proc))
|
|
||||||
#endif"
|
|
||||||
;;
|
;;
|
||||||
x$ac_cv_func_on_exit)
|
x$ac_cv_func_on_exit)
|
||||||
glib_atexit="
|
glib_atexit="
|
||||||
|
@ -2477,10 +2477,7 @@ g_get_current_dir (void)
|
|||||||
if (max_len == 0)
|
if (max_len == 0)
|
||||||
max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
||||||
|
|
||||||
/* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd")
|
#if !defined(HAVE_GETCWD)
|
||||||
* and, if that wasn't bad enough, hangs in doing so.
|
|
||||||
*/
|
|
||||||
#if (defined (sun) && !defined (__SVR4)) || !defined(HAVE_GETCWD)
|
|
||||||
buffer = g_new (gchar, max_len + 1);
|
buffer = g_new (gchar, max_len + 1);
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
dir = getwd (buffer);
|
dir = getwd (buffer);
|
||||||
|
@ -148,11 +148,7 @@ typedef unsigned __int64 guintptr;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NeXT /* @#%@! NeXTStep */
|
#define g_ATEXIT(proc) (atexit (proc))
|
||||||
# define g_ATEXIT(proc) (!atexit (proc))
|
|
||||||
#else
|
|
||||||
# define g_ATEXIT(proc) (atexit (proc))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
|
#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
|
||||||
|
|
||||||
|
@ -57,8 +57,6 @@
|
|||||||
#endif /* HAVE_SYS_TIME_H */
|
#endif /* HAVE_SYS_TIME_H */
|
||||||
#ifdef GLIB_HAVE_SYS_POLL_H
|
#ifdef GLIB_HAVE_SYS_POLL_H
|
||||||
# include <sys/poll.h>
|
# include <sys/poll.h>
|
||||||
# undef events /* AIX 4.1.5 & 4.3.2 define this for SVR3,4 compatibility */
|
|
||||||
# undef revents /* AIX 4.1.5 & 4.3.2 define this for SVR3,4 compatibility */
|
|
||||||
|
|
||||||
/* The poll() emulation on OS/X doesn't handle fds=NULL, nfds=0,
|
/* The poll() emulation on OS/X doesn't handle fds=NULL, nfds=0,
|
||||||
* so we prefer our own poll emulation.
|
* so we prefer our own poll emulation.
|
||||||
@ -89,10 +87,6 @@ extern gboolean _g_main_poll_debug;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_POLL
|
#ifdef HAVE_POLL
|
||||||
/* SunOS has poll, but doesn't provide a prototype. */
|
|
||||||
# if defined (sun) && !defined (__SVR4)
|
|
||||||
extern gint poll (struct pollfd *fds, guint nfsd, gint timeout);
|
|
||||||
# endif /* !sun */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_poll:
|
* g_poll:
|
||||||
|
@ -268,15 +268,9 @@ g_atexit (GVoidFunc func)
|
|||||||
if (result)
|
if (result)
|
||||||
error = g_strerror (errno);
|
error = g_strerror (errno);
|
||||||
#elif defined (HAVE_ATEXIT)
|
#elif defined (HAVE_ATEXIT)
|
||||||
# ifdef NeXT /* @#%@! NeXTStep */
|
|
||||||
result = !atexit ((void (*)(void)) func);
|
|
||||||
if (result)
|
|
||||||
error = g_strerror (errno);
|
|
||||||
# else
|
|
||||||
result = atexit ((void (*)(void)) func);
|
result = atexit ((void (*)(void)) func);
|
||||||
if (result)
|
if (result)
|
||||||
error = g_strerror (errno);
|
error = g_strerror (errno);
|
||||||
# endif /* NeXT */
|
|
||||||
#elif defined (HAVE_ON_EXIT)
|
#elif defined (HAVE_ON_EXIT)
|
||||||
result = on_exit ((void (*)(int, void *)) func, NULL);
|
result = on_exit ((void (*)(int, void *)) func, NULL);
|
||||||
if (result)
|
if (result)
|
||||||
@ -697,8 +691,7 @@ g_get_user_database_entry (void)
|
|||||||
}
|
}
|
||||||
error = error < 0 ? errno : error;
|
error = error < 0 ? errno : error;
|
||||||
# else /* HAVE_NONPOSIX_GETPWUID_R */
|
# else /* HAVE_NONPOSIX_GETPWUID_R */
|
||||||
/* HPUX 11 falls into the HAVE_POSIX_GETPWUID_R case */
|
# if defined(_AIX)
|
||||||
# if defined(_AIX) || defined(__hpux)
|
|
||||||
error = getpwuid_r (getuid (), &pwd, buffer, bufsize);
|
error = getpwuid_r (getuid (), &pwd, buffer, bufsize);
|
||||||
pw = error == 0 ? &pwd : NULL;
|
pw = error == 0 ? &pwd : NULL;
|
||||||
# else /* !_AIX */
|
# else /* !_AIX */
|
||||||
|
@ -13,7 +13,6 @@ EXTRA_DIST += \
|
|||||||
makefile.msc.in \
|
makefile.msc.in \
|
||||||
gmoduleconf.h.in \
|
gmoduleconf.h.in \
|
||||||
gmodule-dl.c \
|
gmodule-dl.c \
|
||||||
gmodule-dld.c \
|
|
||||||
gmodule-dyld.c \
|
gmodule-dyld.c \
|
||||||
gmodule-win32.c \
|
gmodule-win32.c \
|
||||||
gmodule-ar.c \
|
gmodule-ar.c \
|
||||||
|
@ -1,163 +0,0 @@
|
|||||||
/* GMODULE - GLIB wrapper code for dynamic module loading
|
|
||||||
* Copyright (C) 1998, 2000 Tim Janik
|
|
||||||
*
|
|
||||||
* 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 License, 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
|
||||||
* file for a list of people on the GLib Team. See the ChangeLog
|
|
||||||
* files for a list of changes. These files are distributed with
|
|
||||||
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MT safe
|
|
||||||
*/
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <dl.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* some flags are missing on some systems, so we provide
|
|
||||||
* harmless defaults.
|
|
||||||
*
|
|
||||||
* Mandatory:
|
|
||||||
* BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
|
|
||||||
* BIND_DEFERRED - Delay code symbol resolution until actual reference.
|
|
||||||
*
|
|
||||||
* Optionally:
|
|
||||||
* BIND_FIRST - Place the library at the head of the symbol search order.
|
|
||||||
* BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all unsatisfied
|
|
||||||
* symbols as fatal. This flag allows binding of unsatisfied code
|
|
||||||
* symbols to be deferred until use.
|
|
||||||
* [Perl: For certain libraries, like DCE, deferred binding often
|
|
||||||
* causes run time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE
|
|
||||||
* still allows unresolved references in situations like this.]
|
|
||||||
* BIND_NOSTART - Do not call the initializer for the shared library when the
|
|
||||||
* library is loaded, nor on a future call to shl_unload().
|
|
||||||
* BIND_VERBOSE - Print verbose messages concerning possible unsatisfied symbols.
|
|
||||||
*
|
|
||||||
* hp9000s700/hp9000s800:
|
|
||||||
* BIND_RESTRICTED - Restrict symbols visible by the library to those present at
|
|
||||||
* library load time.
|
|
||||||
* DYNAMIC_PATH - Allow the loader to dynamically search for the library specified
|
|
||||||
* by the path argument.
|
|
||||||
*/
|
|
||||||
#ifndef DYNAMIC_PATH
|
|
||||||
#define DYNAMIC_PATH 0
|
|
||||||
#endif /* DYNAMIC_PATH */
|
|
||||||
#ifndef BIND_RESTRICTED
|
|
||||||
#define BIND_RESTRICTED 0
|
|
||||||
#endif /* BIND_RESTRICTED */
|
|
||||||
|
|
||||||
#define OPT_BIND_FLAGS (BIND_NONFATAL | BIND_VERBOSE)
|
|
||||||
|
|
||||||
|
|
||||||
/* --- functions --- */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* shl_load() does not appear to support making symbols invisible to
|
|
||||||
* the global namespace. However, the default is to put the library
|
|
||||||
* last in the search order, which is approximately what we want,
|
|
||||||
* since it will cause symbols that conflict with existing symbols to
|
|
||||||
* be invisible. It is unclear if BIND_FIRST should be used when
|
|
||||||
* bind_local==0, since it may cause the loaded symbols to be used
|
|
||||||
* preferentially to the application's symbols, which is Almost
|
|
||||||
* Always Wrong. --ds
|
|
||||||
*/
|
|
||||||
static gpointer
|
|
||||||
_g_module_open (const gchar *file_name,
|
|
||||||
gboolean bind_lazy,
|
|
||||||
gboolean bind_local)
|
|
||||||
{
|
|
||||||
shl_t shl_handle;
|
|
||||||
|
|
||||||
shl_handle = shl_load (file_name,
|
|
||||||
(bind_lazy ? BIND_DEFERRED : BIND_IMMEDIATE) | OPT_BIND_FLAGS, 0);
|
|
||||||
if (!shl_handle)
|
|
||||||
{
|
|
||||||
/* the hp-docs say we should better abort() if errno==ENOSYM ;( */
|
|
||||||
g_module_set_error (g_strerror (errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (gpointer) shl_handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gpointer
|
|
||||||
_g_module_self (void)
|
|
||||||
{
|
|
||||||
shl_t shl_handle;
|
|
||||||
|
|
||||||
shl_handle = PROG_HANDLE;
|
|
||||||
if (!shl_handle)
|
|
||||||
g_module_set_error (g_strerror (errno));
|
|
||||||
|
|
||||||
return shl_handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_g_module_close (gpointer handle,
|
|
||||||
gboolean is_unref)
|
|
||||||
{
|
|
||||||
if (!is_unref)
|
|
||||||
{
|
|
||||||
if (shl_unload ((shl_t) handle) != 0)
|
|
||||||
g_module_set_error (g_strerror (errno));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gpointer
|
|
||||||
_g_module_symbol (gpointer handle,
|
|
||||||
const gchar *symbol_name)
|
|
||||||
{
|
|
||||||
gpointer p = NULL;
|
|
||||||
|
|
||||||
/* should we restrict lookups to TYPE_PROCEDURE?
|
|
||||||
*/
|
|
||||||
if (handle == PROG_HANDLE)
|
|
||||||
{
|
|
||||||
/* PROG_HANDLE will only lookup symbols in the program itself, not honouring
|
|
||||||
* libraries. passing NULL as a handle will also try to lookup the symbol
|
|
||||||
* in currently loaded libraries. fix pointed out and supplied by:
|
|
||||||
* David Gero <dgero@nortelnetworks.com>
|
|
||||||
*/
|
|
||||||
handle = NULL;
|
|
||||||
}
|
|
||||||
if (shl_findsym ((shl_t*) &handle, symbol_name, TYPE_UNDEFINED, &p) != 0 ||
|
|
||||||
handle == NULL || p == NULL)
|
|
||||||
{
|
|
||||||
/* the hp-docs say we should better abort() if errno==ENOSYM ;( */
|
|
||||||
g_module_set_error (g_strerror (errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gchar*
|
|
||||||
_g_module_build_path (const gchar *directory,
|
|
||||||
const gchar *module_name)
|
|
||||||
{
|
|
||||||
if (directory && *directory)
|
|
||||||
if (strncmp (module_name, "lib", 3) == 0)
|
|
||||||
return g_strconcat (directory, "/", module_name, NULL);
|
|
||||||
else
|
|
||||||
return g_strconcat (directory, "/lib", module_name, ".sl", NULL);
|
|
||||||
else if (strncmp (module_name, "lib", 3) == 0)
|
|
||||||
return g_strdup (module_name);
|
|
||||||
else
|
|
||||||
return g_strconcat ("lib", module_name, ".sl", NULL);
|
|
||||||
}
|
|
@ -56,7 +56,7 @@
|
|||||||
* These functions provide a portable way to dynamically load object files
|
* These functions provide a portable way to dynamically load object files
|
||||||
* (commonly known as 'plug-ins'). The current implementation supports all
|
* (commonly known as 'plug-ins'). The current implementation supports all
|
||||||
* systems that provide an implementation of dlopen() (e.g. Linux/Sun), as
|
* systems that provide an implementation of dlopen() (e.g. Linux/Sun), as
|
||||||
* well as HP-UX via its shl_load() mechanism, and Windows platforms via DLLs.
|
* well as Windows platforms via DLLs.
|
||||||
*
|
*
|
||||||
* A program which wants to use these functions must be linked to the
|
* A program which wants to use these functions must be linked to the
|
||||||
* libraries output by the command
|
* libraries output by the command
|
||||||
@ -167,8 +167,8 @@
|
|||||||
* G_MODULE_SUFFIX:
|
* G_MODULE_SUFFIX:
|
||||||
*
|
*
|
||||||
* Expands to the proper shared library suffix for the current platform
|
* Expands to the proper shared library suffix for the current platform
|
||||||
* without the leading dot. For the most Unices and Linux this is "so",
|
* without the leading dot. For most Unices and Linux this is "so", and
|
||||||
* for some HP-UX versions this is "sl" and for Windows this is "dll".
|
* for Windows this is "dll".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,9 +187,7 @@
|
|||||||
|
|
||||||
/* We maintain a list of modules, so we can reference count them.
|
/* We maintain a list of modules, so we can reference count them.
|
||||||
* That's needed because some platforms don't support references counts on
|
* That's needed because some platforms don't support references counts on
|
||||||
* modules e.g. the shl_* implementation of HP-UX
|
* modules. Also, the module for the program itself is kept seperately for
|
||||||
* (http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html).
|
|
||||||
* Also, the module for the program itself is kept seperatedly for
|
|
||||||
* faster access and because it has special semantics.
|
* faster access and because it has special semantics.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -287,8 +285,6 @@ g_module_set_error (const gchar *error)
|
|||||||
#define SUPPORT_OR_RETURN(rv) { g_module_set_error (NULL); }
|
#define SUPPORT_OR_RETURN(rv) { g_module_set_error (NULL); }
|
||||||
#if (G_MODULE_IMPL == G_MODULE_IMPL_DL)
|
#if (G_MODULE_IMPL == G_MODULE_IMPL_DL)
|
||||||
#include "gmodule-dl.c"
|
#include "gmodule-dl.c"
|
||||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DLD)
|
|
||||||
#include "gmodule-dld.c"
|
|
||||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_WIN32)
|
#elif (G_MODULE_IMPL == G_MODULE_IMPL_WIN32)
|
||||||
#include "gmodule-win32.c"
|
#include "gmodule-win32.c"
|
||||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DYLD)
|
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DYLD)
|
||||||
|
@ -27,7 +27,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define G_MODULE_IMPL_NONE 0
|
#define G_MODULE_IMPL_NONE 0
|
||||||
#define G_MODULE_IMPL_DL 1
|
#define G_MODULE_IMPL_DL 1
|
||||||
#define G_MODULE_IMPL_DLD 2
|
|
||||||
#define G_MODULE_IMPL_WIN32 3
|
#define G_MODULE_IMPL_WIN32 3
|
||||||
#define G_MODULE_IMPL_DYLD 6
|
#define G_MODULE_IMPL_DYLD 6
|
||||||
#define G_MODULE_IMPL_AR 7
|
#define G_MODULE_IMPL_AR 7
|
||||||
@ -37,7 +36,7 @@ extern "C" {
|
|||||||
#if (@G_MODULE_HAVE_DLERROR@)
|
#if (@G_MODULE_HAVE_DLERROR@)
|
||||||
#define G_MODULE_HAVE_DLERROR
|
#define G_MODULE_HAVE_DLERROR
|
||||||
#endif
|
#endif
|
||||||
#if (@G_MODULE_NEED_USCORE@) || defined (hp9000s300) || defined (__hp9000s300) || defined (__hp9000s300__)
|
#if (@G_MODULE_NEED_USCORE@)
|
||||||
#define G_MODULE_NEED_USCORE
|
#define G_MODULE_NEED_USCORE
|
||||||
#endif
|
#endif
|
||||||
#if (@G_MODULE_BROKEN_RTLD_GLOBAL@)
|
#if (@G_MODULE_BROKEN_RTLD_GLOBAL@)
|
||||||
|
@ -27,7 +27,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define G_MODULE_IMPL_NONE 0
|
#define G_MODULE_IMPL_NONE 0
|
||||||
#define G_MODULE_IMPL_DL 1
|
#define G_MODULE_IMPL_DL 1
|
||||||
#define G_MODULE_IMPL_DLD 2
|
|
||||||
#define G_MODULE_IMPL_WIN32 3
|
#define G_MODULE_IMPL_WIN32 3
|
||||||
#define G_MODULE_IMPL_DYLD 6
|
#define G_MODULE_IMPL_DYLD 6
|
||||||
|
|
||||||
|
@ -93,13 +93,10 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
unsigned int major, minor, micro;
|
unsigned int major, minor, micro;
|
||||||
char *tmp_version;
|
|
||||||
|
|
||||||
fclose (fopen ("conf.glibtest", "w"));
|
fclose (fopen ("conf.glibtest", "w"));
|
||||||
|
|
||||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) {
|
||||||
tmp_version = g_strdup("$min_glib_version");
|
|
||||||
if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, µ) != 3) {
|
|
||||||
printf("%s, bad version string\n", "$min_glib_version");
|
printf("%s, bad version string\n", "$min_glib_version");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user