Kaydet (Commit) d6c16742 authored tarafından Enrico Tröger's avatar Enrico Tröger

replaced macro __unix__ by HAVE_GLOB_H (closes #1387828)


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@85 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 88f81a13
......@@ -15,7 +15,7 @@
#include <ctype.h>
#include <sys/types.h>
#include <string.h>
#ifdef __unix__
#ifdef HAVE_GLOB_H
# include <glob.h>
#else
# ifndef P_tmpdir
......@@ -148,8 +148,9 @@ gboolean tm_workspace_load_global_tags(const char *tags_file)
gboolean tm_workspace_create_global_tags(const char *pre_process, const char **includes
, int includes_count, const char *tags_file)
{
#ifdef __unix__
#ifdef HAVE_GLOB_H
glob_t globbuf;
#endif
int idx_inc;
int idx_glob;
char *command;
......@@ -169,6 +170,7 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i
if (NULL == (fp = fopen(temp_file, "w")))
return FALSE;
#ifdef HAVE_GLOB_H
globbuf.gl_offs = 0;
for(idx_inc = 0; idx_inc < includes_count; idx_inc++)
{
......@@ -188,6 +190,12 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i
globfree(&globbuf);
free(clean_path);
}
#else
for(idx_inc = 0; idx_inc < includes_count; idx_inc++)
{
includes_files = g_list_append(includes_files, strdup(includes[idx_inc]));
}
#endif
/* Checks for duplicate file entries which would case trouble */
......@@ -301,7 +309,6 @@ gboolean tm_workspace_create_global_tags(const char *pre_process, const char **i
tm_source_file_free(source_file);
g_ptr_array_free(tags_array, TRUE);
return TRUE;
#endif
}
TMWorkObject *tm_workspace_find_object(TMWorkObject *work_object, const char *file_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment