Andrew Savchenko

Separate libclsync stuff from common.h

Also use sys/param.h for MIN, MAX macros.
... ... @@ -21,11 +21,6 @@
#define _XOPEN_SOURCE 700
#define _LARGEFILE64_SOURCE
#define PROGRAM "clsync"
#define VERSION_MAJ 0
#define VERSION_MIN 3
#define AUTHOR "Dmitry Yu Okunev <dyokunev@ut.mephi.ru> 0x8E30679C"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
... ... @@ -70,14 +65,9 @@
#include "clsync.h"
#include "ctx.h"
#include "indexes.h"
#include "program.h"
#ifndef MIN
#define MIN(a,b) ((a)>(b)?(b):(a))
#endif
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
#include <sys/param.h>
#ifndef IN_CREATE_SELF
#define IN_CREATE_SELF IN_CREATE
... ...
... ... @@ -18,14 +18,16 @@
*/
#define LIBCLSYNC
#include "common.h"
#include <errno.h>
#include <stdlib.h>
#include <sys/un.h> // for "struct sockaddr_un"
#include "socket.h"
#include "configuration.h"
#include "error.h"
#include "libclsync.h"
#include "malloc.h"
#include "error.h"
#include "socket.h"
int libproc_procclsyncsock(socket_sockthreaddata_t *arg, sockcmd_t *sockcmd_p) {
clsyncproc_t *proc_p = arg->arg;
... ...
/*
clsync - file tree sync utility based on fanotify and inotify
Copyright (C) 2013 Dmitry Yu Okunev <dyokunev@ut.mephi.ru> 0x8E30679C
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define PROGRAM "clsync"
#define VERSION_MAJ 0
#define VERSION_MIN 3
#define AUTHOR "Dmitry Yu Okunev <dyokunev@ut.mephi.ru> 0x8E30679C"
... ...
... ... @@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/errno.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/un.h> // for "struct sockaddr_un"
#include <unistd.h>
... ... @@ -28,6 +29,7 @@
#include "configuration.h"
#include "error.h"
#include "malloc.h"
#include "program.h"
#include "socket.h"
pthread_mutex_t socket_thread_mutex = PTHREAD_MUTEX_INITIALIZER;
... ...
... ... @@ -24,6 +24,9 @@
#include <pthread.h>
#include <stdint.h>
#include "clsync.h"
#include "ctx.h"
#define SOCKET_DEFAULT_PROT 0
#define SOCKET_DEFAULT_SUBPROT SUBPROT0_TEXT
... ...