Add gcc opimization
This commit is contained in:
4
Makefile
4
Makefile
@ -22,7 +22,7 @@ compile:
|
|||||||
compile-debian:
|
compile-debian:
|
||||||
@mkdir -p bin
|
@mkdir -p bin
|
||||||
gcc $(LIBS) -o bin/libnecronda-server.so --shared -fPIC $(CFLAGS) $(INCLUDE) \
|
gcc $(LIBS) -o bin/libnecronda-server.so --shared -fPIC $(CFLAGS) $(INCLUDE) \
|
||||||
$(DEBIAN_OPTS)
|
$(DEBIAN_OPTS) -O3
|
||||||
gcc src/necronda-server.c -o bin/necronda-server $(CFLAGS) $(INCLUDE) \
|
gcc src/necronda-server.c -o bin/necronda-server $(CFLAGS) $(INCLUDE) \
|
||||||
-Lbin -lnecronda-server -Wl,-rpath=$(shell pwd)/bin \
|
-Lbin -lnecronda-server -Wl,-rpath=$(shell pwd)/bin \
|
||||||
$(DEBIAN_OPTS)
|
$(DEBIAN_OPTS) -O3
|
||||||
|
@ -65,13 +65,13 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
char method[16];
|
char method[16];
|
||||||
char *uri;
|
char *uri;
|
||||||
char version[3];
|
char version[4];
|
||||||
http_hdr hdr;
|
http_hdr hdr;
|
||||||
} http_req;
|
} http_req;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const http_status *status;
|
const http_status *status;
|
||||||
char version[3];
|
char version[4];
|
||||||
http_hdr hdr;
|
http_hdr hdr;
|
||||||
} http_res;
|
} http_res;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ int url_decode(const char *str, char *dec, long *size) {
|
|||||||
int mime_is_compressible(const char *type) {
|
int mime_is_compressible(const char *type) {
|
||||||
if (type == NULL) return 0;
|
if (type == NULL) return 0;
|
||||||
char type_parsed[64];
|
char type_parsed[64];
|
||||||
strncpy(type_parsed, type, sizeof(type_parsed));
|
strncpy(type_parsed, type, sizeof(type_parsed) - 1);
|
||||||
char *pos = strchr(type_parsed, ';');
|
char *pos = strchr(type_parsed, ';');
|
||||||
if (pos != NULL) pos[0] = 0;
|
if (pos != NULL) pos[0] = 0;
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user