From: Don S. <ri...@us...> - 2005-02-07 15:35:44
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9655/src Modified Files: bnet.c bnet.h proto.c Added Files: Makefile.mingw Log Message: Committing patch #1117931 for win32 build support from Daniel Atallah Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** bnet.c 4 Feb 2005 20:31:34 -0000 1.35 --- bnet.c 7 Feb 2005 15:35:11 -0000 1.36 *************** *** 280,284 **** --- 280,288 ---- "prpl-bnet", /* id */ NULL, /* name */ + #ifdef _WIN32 + BN_VERSION, /* version */ + #else VERSION, /* version */ + #endif NULL, /* summary */ NULL, /* description */ Index: bnet.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** bnet.h 27 Jan 2005 21:26:41 -0000 1.10 --- bnet.h 7 Feb 2005 15:35:11 -0000 1.11 *************** *** 35,38 **** --- 35,44 ---- #include <glib.h> #include <string.h> + #ifndef _WIN32 + #include <sys/socket.h> + #else + #include <libc_interface.h> + #endif + #include <sys/types.h> #include <unistd.h> Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** proto.c 3 Feb 2005 20:29:48 -0000 1.21 --- proto.c 7 Feb 2005 15:35:11 -0000 1.22 *************** *** 125,129 **** p = (gchar *)(w + strlen(w)); else { ! if (!(p = memmem(w, strlen(w), k+1, tt))) { err = TRUE; break; --- 125,132 ---- p = (gchar *)(w + strlen(w)); else { ! char cmp_str[tt + 1]; ! strncpy(cmp_str, k+1, tt); ! cmp_str[tt] = '\0'; ! if (!(p = strstr(w, cmp_str))) { err = TRUE; break; --- NEW FILE: Makefile.mingw --- # # Makefile.mingw # # Description: Makefile for gaim-bnet plugin. # # # PATHS # BN_TOP := ../ GTK_TOP := ../../../../win32-dev/gtk_2_0 GAIM_TOP := ../../.. GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir DLL_INSTALL_DIR := $(GAIM_INSTALL_DIR)/plugins BN_VERSION := $(shell cat ${BN_TOP}/VERSION) ## ## VARIABLE DEFINITIONS ## BN = libbnet # Compiler Options CFLAGS = DEFINES = -DBN_VERSION=\"$(BN_VERSION)\" -DLOCALEDIR=\"$(GAIM_INSTALL_DIR)/locale\" LDFLAGS = #-mwindows ## ## INCLUDE MAKEFILES ## include $(GAIM_TOP)/src/win32/global.mak ## ## INCLUDE PATHS ## INCLUDE_PATHS += -I. \ -I$(GTK_TOP)/include \ -I$(GTK_TOP)/include/glib-2.0 \ -I$(GTK_TOP)/lib/glib-2.0/include \ -I$(GAIM_TOP)/src/win32 \ -I$(GAIM_TOP)/src \ -I$(BN_TOP) \ -I$(GAIM_TOP) LIB_PATHS = \ -L$(GTK_TOP)/lib \ -L$(GAIM_TOP)/src ## ## SOURCES, OBJECTS ## BN_SRC = \ bnet.c \ buddy.c \ chat.c \ conn.c \ proto.c BN_OBJ = $(BN_SRC:%.c=%.o) ## ## LIBRARIES ## PLUGIN_LIBS = \ -lglib-2.0 \ -lgmodule-2.0 \ -lgobject-2.0 \ -lws2_32 \ -lintl \ -lgaim ## ## RULES ## # How to make a C file %.o: %.c $(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@ ## ## TARGET DEFINITIONS ## .PHONY: all clean install all: $(BN).dll install: all cp $(BN).dll $(DLL_INSTALL_DIR) ## ## BUILD Dependencies ## $(GAIM_TOP)/src/gaim.lib: $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib ## ## BUILD DLL ## $(BN).dll: $(BN_OBJ) $(GAIM_TOP)/src/gaim.lib $(CC) -shared $(BN_OBJ) $(LIB_PATHS) $(PLUGIN_LIBS) $(DLL_LD_FLAGS) -o $(BN).dll ## ## CLEAN RULES ## clean: rm -rf *.o rm -rf $(BN).dll |