mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
If <glob.h> unavailable, provide own typedef and disable globbing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13581 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
688783449f
commit
967cbf8c7a
@ -1,3 +1,9 @@
|
||||
2006-03-10 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/gnome-utils/gnc-druid-provider-multifile-gnome.h,
|
||||
gnc-druid-provider-file-gnome.c: If <glob.h> unavailable, provide
|
||||
own typedef and disable globbing.
|
||||
|
||||
2006-03-09 Andreas Köhler <andi5.py@gmx.net>
|
||||
|
||||
* src/gnome-utils/gnc-main-window.c: Move retrieval of private
|
||||
|
@ -51,7 +51,9 @@ static void
|
||||
gnc_dpfg_end_glob(GNCDruidProviderFileGnome *prov)
|
||||
{
|
||||
if (prov->globbed) {
|
||||
#ifdef HAVE_GLOB_H
|
||||
globfree(&prov->glob);
|
||||
#endif
|
||||
prov->globbed = FALSE;
|
||||
prov->count = 0;
|
||||
}
|
||||
@ -139,7 +141,12 @@ gnc_dpfg_start_glob(GNCDruidProvider* prov, const char* filename)
|
||||
int err;
|
||||
|
||||
g_assert(prov_f->globbed == FALSE);
|
||||
#ifdef HAVE_GLOB_H
|
||||
err = glob(filename, GLOB_NOCHECK, gnc_dpfg_file_err, &prov_f->glob);
|
||||
#else
|
||||
/* glob(3) was not available. */
|
||||
err = -1;
|
||||
#endif
|
||||
prov_f->count = 0;
|
||||
|
||||
if (!err)
|
||||
|
@ -7,7 +7,17 @@
|
||||
//extern "C" {
|
||||
#endif
|
||||
|
||||
#include <glob.h>
|
||||
#ifdef HAVE_GLOB_H
|
||||
# include <glob.h>
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
size_t gl_pathc; /* Count of paths matched so far */
|
||||
char **gl_pathv; /* List of matched pathnames. */
|
||||
size_t gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||
} glob_t;
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <libgnomeui/libgnomeui.h>
|
||||
|
Loading…
Reference in New Issue
Block a user