mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-08 20:05:49 +01:00
Test for the existence of getcwd, and use it only when found.
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * acconfig.h, configure.in, gutils.c: Test for the existence of getcwd, and use it only when found. * glib.h: Only use the gcc-variable-macro-argument-extension for gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
This commit is contained in:
parent
ddbb2ea440
commit
e2600b0476
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* acconfig.h, configure.in, gutils.c: Test for the existence of
|
||||||
|
getcwd, and use it only when found.
|
||||||
|
|
||||||
|
* glib.h: Only use the gcc-variable-macro-argument-extension for
|
||||||
|
gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
|
||||||
|
|
||||||
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
Mon Sep 18 10:58:21 2000 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
* gutf8.c: Implement g_ucs4_to_utf8 which was in
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
#undef HAVE_CODESET
|
#undef HAVE_CODESET
|
||||||
#undef HAVE_DOPRNT
|
#undef HAVE_DOPRNT
|
||||||
#undef HAVE_FLOAT_H
|
#undef HAVE_FLOAT_H
|
||||||
|
#undef HAVE_GETCWD
|
||||||
#undef HAVE_GETPWUID_R
|
#undef HAVE_GETPWUID_R
|
||||||
#undef HAVE_GETPWUID_R_POSIX
|
#undef HAVE_GETPWUID_R_POSIX
|
||||||
#undef HAVE_LIMITS_H
|
#undef HAVE_LIMITS_H
|
||||||
|
@ -357,7 +357,7 @@ GLIB_SIZEOF([$size_includes], ptrdiff_t, ptrdiff_t)
|
|||||||
GLIB_SIZEOF([$size_includes], intmax_t, intmax_t)
|
GLIB_SIZEOF([$size_includes], intmax_t, intmax_t)
|
||||||
|
|
||||||
# Check for some functions
|
# Check for some functions
|
||||||
AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll)
|
AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll getcwd)
|
||||||
|
|
||||||
# Check if bcopy can be used for overlapping copies, if memmove isn't found.
|
# Check if bcopy can be used for overlapping copies, if memmove isn't found.
|
||||||
# The check is borrowed from the PERL Configure script.
|
# The check is borrowed from the PERL Configure script.
|
||||||
|
2
glib.h
2
glib.h
@ -1508,7 +1508,7 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
#elif defined (__GNUC__)
|
#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4)
|
||||||
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_ERROR, \
|
G_LOG_LEVEL_ERROR, \
|
||||||
format)
|
format)
|
||||||
|
@ -1508,7 +1508,7 @@ GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
|||||||
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_WARNING, \
|
G_LOG_LEVEL_WARNING, \
|
||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
#elif defined (__GNUC__)
|
#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4)
|
||||||
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
#define g_error(format...) g_log (G_LOG_DOMAIN, \
|
||||||
G_LOG_LEVEL_ERROR, \
|
G_LOG_LEVEL_ERROR, \
|
||||||
format)
|
format)
|
||||||
|
@ -430,11 +430,11 @@ g_get_current_dir (void)
|
|||||||
/* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd")
|
/* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd")
|
||||||
* and, if that wasn't bad enough, hangs in doing so.
|
* and, if that wasn't bad enough, hangs in doing so.
|
||||||
*/
|
*/
|
||||||
#if defined (sun) && !defined (__SVR4)
|
#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);
|
||||||
#else /* !sun */
|
#else /* !sun || !HAVE_GETCWD */
|
||||||
while (max_len < G_MAXULONG / 2)
|
while (max_len < G_MAXULONG / 2)
|
||||||
{
|
{
|
||||||
buffer = g_new (gchar, max_len + 1);
|
buffer = g_new (gchar, max_len + 1);
|
||||||
@ -447,7 +447,7 @@ g_get_current_dir (void)
|
|||||||
g_free (buffer);
|
g_free (buffer);
|
||||||
max_len *= 2;
|
max_len *= 2;
|
||||||
}
|
}
|
||||||
#endif /* !sun */
|
#endif /* !sun || !HAVE_GETCWD */
|
||||||
|
|
||||||
if (!dir || !*buffer)
|
if (!dir || !*buffer)
|
||||||
{
|
{
|
||||||
|
6
gutils.c
6
gutils.c
@ -430,11 +430,11 @@ g_get_current_dir (void)
|
|||||||
/* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd")
|
/* We don't use getcwd(3) on SUNOS, because, it does a popen("pwd")
|
||||||
* and, if that wasn't bad enough, hangs in doing so.
|
* and, if that wasn't bad enough, hangs in doing so.
|
||||||
*/
|
*/
|
||||||
#if defined (sun) && !defined (__SVR4)
|
#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);
|
||||||
#else /* !sun */
|
#else /* !sun || !HAVE_GETCWD */
|
||||||
while (max_len < G_MAXULONG / 2)
|
while (max_len < G_MAXULONG / 2)
|
||||||
{
|
{
|
||||||
buffer = g_new (gchar, max_len + 1);
|
buffer = g_new (gchar, max_len + 1);
|
||||||
@ -447,7 +447,7 @@ g_get_current_dir (void)
|
|||||||
g_free (buffer);
|
g_free (buffer);
|
||||||
max_len *= 2;
|
max_len *= 2;
|
||||||
}
|
}
|
||||||
#endif /* !sun */
|
#endif /* !sun || !HAVE_GETCWD */
|
||||||
|
|
||||||
if (!dir || !*buffer)
|
if (!dir || !*buffer)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user