redmine

Fix of "glib.h: No such file or directory"

https://github.com/xaionaro/clsync/issues/107
... ... @@ -67,7 +67,6 @@
#include <netinet/in.h>
#include <libgen.h>
#include <pthread.h>
#include <glib.h>
#include "configuration.h"
#ifdef HAVE_CONFIG_H
... ... @@ -204,38 +203,6 @@ struct eventinfo {
};
typedef struct eventinfo eventinfo_t;
struct thread_callbackfunct_arg {
char *excfpath;
char *incfpath;
};
typedef struct thread_callbackfunct_arg thread_callbackfunct_arg_t;
typedef int (*thread_callbackfunct_t)(ctx_t *ctx_p, thread_callbackfunct_arg_t *arg_p);
struct threadinfo {
int thread_num;
uint32_t iteration;
thread_callbackfunct_t callback;
thread_callbackfunct_arg_t *callback_arg;
char **argv;
pthread_t pthread;
int exitcode;
int errcode;
state_t state;
ctx_t *ctx_p;
time_t starttime;
time_t expiretime;
int child_pid;
GHashTable *fpath2ei_ht; // file path -> event information
int try_n;
// for so-synchandler
int n;
api_eventinfo_t *ei;
};
typedef struct threadinfo threadinfo_t;
enum pthread_mutex_id {
PTHREAD_MUTEX_STATE,
PTHREAD_MUTEX_SELECT,
... ... @@ -244,18 +211,6 @@ enum pthread_mutex_id {
};
struct threadsinfo {
pthread_mutex_t mutex[PTHREAD_MUTEX_MAX];
pthread_cond_t cond [PTHREAD_MUTEX_MAX];
char mutex_init;
int allocated;
int used;
threadinfo_t *threads;
threadinfo_t **threadsstack; // stack of threadinfo_t to be used on thread_new()
int stacklen;
};
typedef struct threadsinfo threadsinfo_t;
struct dosync_arg {
int evcount;
char excf_path[PATH_MAX+1];
... ...
... ... @@ -17,6 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
typedef gpointer(*GDupFunc)(gpointer data);
extern GHashTable *g_hash_table_dup(GHashTable *ht, GHashFunc hash_funct, GEqualFunc key_equal_funct, GDestroyNotify key_destroy_funct, GDestroyNotify value_destroy_funct, GDupFunc key_dup_funct, GDupFunc value_dup_funct);
... ...
... ... @@ -29,6 +29,7 @@
#include <pwd.h> // getpwnam()
#include <grp.h> // getgrnam()
#include <glib.h> // gkf
#ifdef UNSHARE_SUPPORT
... ...
... ... @@ -18,6 +18,9 @@
*/
#include "common.h"
#include <glib.h> // g_hash_table_*
#include "rules.h"
#include "error.h"
... ...
... ... @@ -17,6 +17,54 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h> // GHashTable
struct thread_callbackfunct_arg {
char *excfpath;
char *incfpath;
};
typedef struct thread_callbackfunct_arg thread_callbackfunct_arg_t;
typedef int (*thread_callbackfunct_t)(ctx_t *ctx_p, thread_callbackfunct_arg_t *arg_p);
struct threadinfo {
int thread_num;
uint32_t iteration;
thread_callbackfunct_t callback;
thread_callbackfunct_arg_t *callback_arg;
char **argv;
pthread_t pthread;
int exitcode;
int errcode;
state_t state;
ctx_t *ctx_p;
time_t starttime;
time_t expiretime;
int child_pid;
GHashTable *fpath2ei_ht; // file path -> event information
int try_n;
// for so-synchandler
int n;
api_eventinfo_t *ei;
};
typedef struct threadinfo threadinfo_t;
struct threadsinfo {
pthread_mutex_t mutex[PTHREAD_MUTEX_MAX];
pthread_cond_t cond [PTHREAD_MUTEX_MAX];
char mutex_init;
int allocated;
int used;
threadinfo_t *threads;
threadinfo_t **threadsstack; // stack of threadinfo_t to be used on thread_new()
int stacklen;
};
typedef struct threadsinfo threadsinfo_t;
extern int sync_run(struct ctx *ctx);
extern int sync_dump(struct ctx *ctx, const char *const dest_dir);
extern int sync_term(int exitcode);
... ...