Changeset 51 in cheroxy
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/CRXHttpResponse.cpp
r47 r51 115 115 const int aLength) 116 116 { 117 int aResult = 0;118 intaSize = 0;119 char * aChunkedPtr = NULL;117 int aResult = 0; 118 unsigned int aSize = 0; 119 char * aChunkedPtr = NULL; 120 120 121 121 /*----------------------------------------------------------------*/ … … 147 147 mContentLength += aLength; 148 148 aSize = mContent.size (); 149 if ( (unsigned int)aSize > strlen (CRLF) + strlen (CRLF2))149 if (aSize > strlen (CRLF) + strlen (CRLF2)) 150 150 { 151 151 aChunkedPtr = &mContent[0] + aSize - strlen (CRLF2); -
trunk/src/main.cpp
r49 r51 22 22 # define THREAD_FUNCTION_CALLING_CONVENTION WINAPI 23 23 #else 24 # include <pthread.h> 24 25 # define THREAD_TYPE pthread_t 25 26 # define THREAD_FUNCTION_RETURN void * -
trunk/src/makefile
r49 r51 2 2 # platform 3 3 #---------------------------------------------------------- 4 OS = 64 4 OS = 64 5 DEBUG = true 5 6 6 7 ifeq ($(OS), 64) … … 8 9 else 9 10 PLATFORM = -m32 11 endif 12 13 ifeq ($(DEBUG), true) 14 DEFS = -D_DEBUG 15 else 16 DEFS = 10 17 endif 11 18 … … 22 29 CRXFilter \ 23 30 CRXProxy \ 24 main \ 31 32 LIB_NAME = cheroxy 25 33 26 34 CXX = g++ 27 35 LD = g++ 28 CXXDEFS = -D_DEBUG 29 CXXFLAGS = $(PLATFORM) -fPIC -Wall -Wcast-align -c -g 36 AR = ar 37 CXXDEFS = -DLINUX -DUNIX -DMTHREAD -D_REENTRANT $(DEFS) 38 CXXFLAGS = $(PLATFORM) -Wall -Wpointer-arith -Wcast-align -fPIC -Wno-non-virtual-dtor \ 39 -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy \ 40 -fno-rtti -fno-common -fno-exceptions -fshort-wchar \ 41 -O2 -g 30 42 LDFLAGS = $(PLATFORM) 43 EXT_SH = so 44 EXT_AR = a 31 45 SHARED_FLAGS = $(PLATFORM) -shared 46 ARFLAGS = rc 32 47 33 48 SOURCE_TYPE = cpp 34 49 TARGET_PATH = ../_build 35 50 OBJ_PATH = ../_obj 36 TARGET = $(TARGET_PATH)/lib cheroxy.so51 TARGET = $(TARGET_PATH)/lib$(LIB_NAME).$(EXT_SH) 37 52 SRCS = $(addsuffix .$(SOURCE_TYPE),$(FILES)) 38 53 OBJS = $(addprefix $(OBJ_PATH)/,$(addsuffix .o,$(FILES))) 39 54 40 55 INCLUDES = -I../include 41 LIBS = -lpthread 42 43 # test 44 TARGET_TEST = $(TARGET_PATH)/cheroxy.ex 56 LIBS = 45 57 46 58 #---------------------------------------------------------- … … 55 67 56 68 # link 57 $(TARGET): $(OBJS) 58 $(LD) $(SHARED_FLAGS) -o $@ $? $(LIBS) 69 $(TARGET_PATH)/%.$(EXT_SH): $(OBJS) 70 $(LD) $(SHARED_FLAGS) -o $@ $? 71 72 $(TARGET_PATH)/%.$(EXT_AR): $(OBJS) 73 $(AR) $(ARFLAGS) -o $@ $? 59 74 60 75 # compile 61 76 $(OBJ_PATH)/%.o: %.$(SOURCE_TYPE) 62 $(CXX) $(CXXFLAGS) $(CXXDEFS) $(INCLUDES) -o $@ $?77 $(CXX) $(CXXFLAGS) $(CXXDEFS) $(INCLUDES) -o $@ -c $? 63 78 64 79 clean: dummy … … 68 83 69 84 # test 70 $(TARGET_TEST): $(TARGET) 71 $(LD) $(LDFLAGS) -o $@ -L$(TARGET_PATH) -lcheroxy $(LIBS) 85 test: all 86 $(CXX) $(CXXFLAGS) $(INCLUDES) $(CXXDEFS) -o $(OBJ_PATH)/main.o -c main.cpp 87 $(LD) $(LDFLAGS) -o $(TARGET_PATH)/cheroxy.ex $(OBJ_PATH)/main.o -L$(TARGET_PATH) -lcheroxy -lpthread 88 cd $(TARGET_PATH); LD_LIBRARY_PATH=. ./cheroxy.ex 72 89 73 test: $(TARGET_TEST)74 cd $(TARGET_PATH); LD_LIBRARY_PATH=. $<75
Note:
See TracChangeset
for help on using the changeset viewer.