Check-in [d37dd3792a]
Overview
Comment:Updated to statically link
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d37dd3792a0db12385ef07200894dcfbba2f988c
User & Date: rkeene on 2014-02-05 18:06:47
Other Links: manifest | tags
Context
2014-02-06
04:15
Added range support check-in: 409fc328b7 user: rkeene tags: trunk
2014-02-05
18:06
Updated to statically link check-in: d37dd3792a user: rkeene tags: trunk
09:18
Removed extraneous flush check-in: 2df202595a user: rkeene tags: trunk
Changes

Modified Makefile from [4f9f8484cc] to [677189cc54].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3
LDFLAGS = -pthread
LIBS = -lpthread

filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c

clean:
	rm -f filed filed.o

distclean: clean

.PHONY: clean distclean


|













1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3
LDFLAGS = -pthread -static
LIBS = -lpthread

filed: filed.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)

filed.o: filed.c

clean:
	rm -f filed filed.o

distclean: clean

.PHONY: clean distclean

Modified filed.c from [de3f48af84] to [1af4b31488].

14
15
16
17
18
19
20

21
22
23
24
25
26
27
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <time.h>

/* Default values */
#define MAX_FAILURE_COUNT 30
#define PORT 8080
#define THREAD_COUNT 10
#define BIND_ADDR "::"


/* Arguments for worker threads */
struct filed_worker_thread_args {
	int fd;
};

/* File information */
................................................................................
	char *lastmod;
	char lastmod_b[64];
	char *type;
};

/* Global variables */
struct filed_fileinfo *filed_fileinfo_fdcache;
unsigned int filed_fileinfo_fdcache_size = 8192;

/* Initialize process */
static int filed_init(void) {
	unsigned int idx;
	int mutex_init_ret;

	mlockall(MCL_CURRENT | MCL_FUTURE);







>







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <time.h>

/* Default values */
#define MAX_FAILURE_COUNT 30
#define PORT 8080
#define THREAD_COUNT 10
#define BIND_ADDR "::"
#define CACHE_SIZE 8192

/* Arguments for worker threads */
struct filed_worker_thread_args {
	int fd;
};

/* File information */
................................................................................
	char *lastmod;
	char lastmod_b[64];
	char *type;
};

/* Global variables */
struct filed_fileinfo *filed_fileinfo_fdcache;
unsigned int filed_fileinfo_fdcache_size = CACHE_SIZE;

/* Initialize process */
static int filed_init(void) {
	unsigned int idx;
	int mutex_init_ret;

	mlockall(MCL_CURRENT | MCL_FUTURE);