mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-16 15:10:23 +02:00
max_len can't be initialized statically as it might call a function. So do
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): max_len can't be initialized statically as it might call a function. So do it at first call.
This commit is contained in:
committed by
Sebastian Wilhelmi
parent
ccee915720
commit
6088718e19
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||||
|
|
||||||
|
* gutils.c (g_get_current_dir): max_len can't be initialized
|
||||||
|
statically as it might call a function. So do it at first call.
|
||||||
|
|
||||||
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
Tue Sep 26 2000 Elliot Lee <sopwith@redhat.com>
|
||||||
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
* glib.h: Add G_GNUC_PURE macro (but don't use it anywhere).
|
||||||
|
|
||||||
|
@@ -425,7 +425,10 @@ g_get_current_dir (void)
|
|||||||
{
|
{
|
||||||
gchar *buffer = NULL;
|
gchar *buffer = NULL;
|
||||||
gchar *dir = NULL;
|
gchar *dir = NULL;
|
||||||
static gulong max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
static gulong max_len = 0;
|
||||||
|
|
||||||
|
if (max_len == 0)
|
||||||
|
max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
||||||
|
|
||||||
/* 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.
|
||||||
|
5
gutils.c
5
gutils.c
@@ -425,7 +425,10 @@ g_get_current_dir (void)
|
|||||||
{
|
{
|
||||||
gchar *buffer = NULL;
|
gchar *buffer = NULL;
|
||||||
gchar *dir = NULL;
|
gchar *dir = NULL;
|
||||||
static gulong max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
static gulong max_len = 0;
|
||||||
|
|
||||||
|
if (max_len == 0)
|
||||||
|
max_len = (G_PATH_LENGTH == -1) ? 2048 : G_PATH_LENGTH;
|
||||||
|
|
||||||
/* 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.
|
||||||
|
Reference in New Issue
Block a user