diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-12-02 21:54:10 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-12-02 21:54:10 +0000 |
commit | 6452587524f1fd1b2551642992114010afb51f36 (patch) | |
tree | c8de17de2df8d3987e655647c93aec1b08aa2581 /net-p2p/dctc | |
parent | cfaf7af6f070d11f23a60754df078bb531aa97c5 (diff) | |
download | ports-6452587524f1fd1b2551642992114010afb51f36.tar.gz ports-6452587524f1fd1b2551642992114010afb51f36.zip |
Notes
Diffstat (limited to 'net-p2p/dctc')
-rw-r--r-- | net-p2p/dctc/Makefile | 5 | ||||
-rw-r--r-- | net-p2p/dctc/distinfo | 2 | ||||
-rw-r--r-- | net-p2p/dctc/files/config.h | 30 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:Makefile | 6 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:db.c | 66 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:dc_com.c | 59 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:dc_com.h | 4 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:dc_manage.c | 261 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:keyboard.c | 10 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:main.c | 18 | ||||
-rw-r--r-- | net-p2p/dctc/files/patch-src:sema.c | 24 |
11 files changed, 73 insertions, 412 deletions
diff --git a/net-p2p/dctc/Makefile b/net-p2p/dctc/Makefile index 7dee84227c12..2f53d1de15db 100644 --- a/net-p2p/dctc/Makefile +++ b/net-p2p/dctc/Makefile @@ -6,10 +6,10 @@ # PORTNAME= dctc -PORTVERSION= 0.60 +PORTVERSION= 0.61 CATEGORIES= net MASTER_SITES= http://ac2i.tzo.com/dctc/ -DISTNAME= ${PORTNAME}_v${PORTVERSION} +DISTNAME= ${PORTNAME}-${PORTVERSION} MAINTAINER= lioux@FreeBSD.org @@ -34,6 +34,7 @@ post-patch: @${PERL} -pi -e 's/(CK?\(std)(out\))/\1_\2/' ${BUILD_WRKSRC}/* do-configure: + @${CP} ${FILESDIR}/config.h ${BUILD_WRKSRC} @cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} depend do-install: diff --git a/net-p2p/dctc/distinfo b/net-p2p/dctc/distinfo index 3fc1de8c3a05..b5286aaf174c 100644 --- a/net-p2p/dctc/distinfo +++ b/net-p2p/dctc/distinfo @@ -1 +1 @@ -MD5 (dctc_v0.60.tar.gz) = 0fe566ab242528833a5640cfb5a74257 +MD5 (dctc-0.61.tar.gz) = 88606bb7a92e4b84af20fe6e92cfe1d2 diff --git a/net-p2p/dctc/files/config.h b/net-p2p/dctc/files/config.h new file mode 100644 index 000000000000..c82313ca54e0 --- /dev/null +++ b/net-p2p/dctc/files/config.h @@ -0,0 +1,30 @@ +#ifndef ___CONFIG_H___ +#define ___CONFIG_H___ + +/* To enable detecting of BSD systems */ +#if (defined(__unix__) || defined(unix)) && !defined(USG) +#include <sys/param.h> +#endif + +#include <sys/types.h> +#include <sys/socket.h> + +/* For BSD */ +#if (defined(BSD) && (BSD >= 199103)) +# include <sys/ipc.h> +# include <sys/sem.h> +#else +/* For linux */ +# include <linux/sem.h> /* for the value of SEMVMX */ +#endif + +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + +#ifndef SEMVMX +/* this value comes from linux/sem.h */ +#define SEMVMX 32767 +#endif + +#endif /* ___CONFIG_H___ */ diff --git a/net-p2p/dctc/files/patch-src:Makefile b/net-p2p/dctc/files/patch-src:Makefile index 2a629e5d672c..74dc0f2fff3e 100644 --- a/net-p2p/dctc/files/patch-src:Makefile +++ b/net-p2p/dctc/files/patch-src:Makefile @@ -1,10 +1,10 @@ ---- src/Makefile.orig Sat Nov 24 13:20:21 2001 -+++ src/Makefile Sat Nov 24 13:20:34 2001 +--- src/Makefile Sun Nov 25 07:37:30 2001 ++++ src/Makefile Sun Dec 2 19:34:46 2001 @@ -1,6 +1,6 @@ #CC = gcc -CFLAGS =-g -march=i586 -O2 -Wall `glib-config --cflags glib gthread` -Wpointer-arith -Wcast-qual -Wwrite-strings #-Wshadow -LDFLAGS = -g `glib-config --libs glib gthread` -+CFLAGS +=-g -Wall `${GLIB_CONFIG} --cflags glib gthread` -Wpointer-arith -Wcast-qual -Wwrite-strings -I${LOCALBASE}/include ${PTHREAD_CFLAGS} ++CFLAGS += -g -Wall `${GLIB_CONFIG} --cflags glib gthread` -Wpointer-arith -Wcast-qual -Wwrite-strings -I${LOCALBASE}/include ${PTHREAD_CFLAGS} +LDFLAGS += -g `${GLIB_CONFIG} --libs glib gthread` ${PTHREAD_LIBS} CSRC = main.c action.c dc_com.c display.c key.c keyboard.c network.c typical_action.c dc_manage.c db.c he3.c gts.c user_manage.c md.c timed_out_string.c sema.c diff --git a/net-p2p/dctc/files/patch-src:db.c b/net-p2p/dctc/files/patch-src:db.c index 74abd7eca69b..e2d61a5d4ddb 100644 --- a/net-p2p/dctc/files/patch-src:db.c +++ b/net-p2p/dctc/files/patch-src:db.c @@ -1,69 +1,11 @@ ---- src/db.c.orig Thu Nov 22 00:08:34 2001 -+++ src/db.c Thu Nov 22 00:11:49 2001 -@@ -30,6 +30,15 @@ +--- src/db.c Mon Nov 26 16:28:32 2001 ++++ src/db.c Sun Dec 2 19:34:12 2001 +@@ -30,6 +30,8 @@ #include <netinet/in.h> #include <glib.h> -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ -+#if (defined(BSD) && (BSD >= 199103)) -+#include <signal.h> -+#define MSG_NOSIGNAL 0 -+#endif ++#include "config.h" + #include "db.h" #include "display.h" #include "var.h" -@@ -711,6 +720,9 @@ - /******************************************************************************************/ - static void send_a_db_result(int output_sck, char *dest_nick, DB_ENTRY *de, struct sockaddr_in *dest_addr, char *md5sum) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - GString *str; - GString *adapted; - -@@ -752,10 +764,38 @@ - printf("dest_addr: %s, str: %s\n",dest_addr,str->str); - #endif - -- if(dest_addr==NULL) -+ if(dest_addr==NULL) { -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - send(output_sck,str->str,str->len,MSG_NOSIGNAL); -- else -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif -+ } else { -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - sendto(output_sck,str->str,str->len,MSG_NOSIGNAL,(void*)dest_addr, sizeof(struct sockaddr_in)); -+ -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif -+ } - - disp_msg(INFO_MSG,"send_search_result_line",str->str,NULL); - diff --git a/net-p2p/dctc/files/patch-src:dc_com.c b/net-p2p/dctc/files/patch-src:dc_com.c index 087695791f12..1472eac54753 100644 --- a/net-p2p/dctc/files/patch-src:dc_com.c +++ b/net-p2p/dctc/files/patch-src:dc_com.c @@ -1,52 +1,11 @@ ---- src/dc_com.c.orig Thu Nov 22 00:12:50 2001 -+++ src/dc_com.c Thu Nov 22 00:15:55 2001 -@@ -33,6 +33,15 @@ - #include "main.h" - #include "var.h" +--- src/dc_com.c Sat Oct 20 03:46:54 2001 ++++ src/dc_com.c Sun Dec 2 19:34:12 2001 +@@ -28,6 +28,8 @@ + #include <errno.h> + #include <glib.h> -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ -+#if (defined(BSD) && (BSD >= 199103)) -+#include <signal.h> -+#define MSG_NOSIGNAL 0 -+#endif ++#include "config.h" + - char last_cmd[5120]; /* contains the first string of the last send_dc_line call */ - /* mainly used for debug features. */ - time_t last_cmd_time; -@@ -50,6 +59,10 @@ - /***********************************************************/ - void send_dc_line(int sck,...) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+ ssize_t send_return; -+#endif - va_list ap; - char *t; - int have=0; -@@ -84,7 +97,21 @@ - - if((str->len)&&(cnx_in_progress==0)) - { -- if(send(sck,str->str,str->len,MSG_NOSIGNAL)!=str->len) -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif -+ send_return = send(sck,str->str,str->len, MSG_NOSIGNAL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif -+ if(send_return!=str->len) - { - /* abort network operation on this socket */ - /* this will either generated a hub_disconnection message (main thread) */ + #include "dc_com.h" + #include "display.h" + #include "main.h" diff --git a/net-p2p/dctc/files/patch-src:dc_com.h b/net-p2p/dctc/files/patch-src:dc_com.h index a80afce3988d..60e79d6b7191 100644 --- a/net-p2p/dctc/files/patch-src:dc_com.h +++ b/net-p2p/dctc/files/patch-src:dc_com.h @@ -1,5 +1,5 @@ ---- src/dc_com.h.orig Wed Nov 21 22:15:21 2001 -+++ src/dc_com.h Wed Nov 21 22:15:32 2001 +--- src/dc_com.h Sat Oct 20 03:32:19 2001 ++++ src/dc_com.h Sun Dec 2 19:34:12 2001 @@ -21,6 +21,8 @@ #ifndef __DC_COM_H__ #define __DC_COM_H__ diff --git a/net-p2p/dctc/files/patch-src:dc_manage.c b/net-p2p/dctc/files/patch-src:dc_manage.c index 247a503af09c..2106823aa755 100644 --- a/net-p2p/dctc/files/patch-src:dc_manage.c +++ b/net-p2p/dctc/files/patch-src:dc_manage.c @@ -1,264 +1,11 @@ ---- src/dc_manage.c.orig Sat Nov 24 08:43:42 2001 -+++ src/dc_manage.c Sat Nov 24 13:17:32 2001 -@@ -35,6 +35,11 @@ +--- src/dc_manage.c Sat Dec 1 08:45:25 2001 ++++ src/dc_manage.c Sun Dec 2 19:34:12 2001 +@@ -35,6 +35,8 @@ #include <fcntl.h> #include <pthread.h> -+#if (defined(BSD) && (BSD >= 199103)) -+#include <signal.h> -+#define MSG_NOSIGNAL 0 -+#endif ++#include "config.h" + #include "display.h" #include "action.h" #include "macro.h" -@@ -189,6 +194,9 @@ - /*************************/ - static int send_file_data(int sck,char *filename, int start_pos, unsigned long file_len,WAIT_ACT *act) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - unsigned long int i; - char buf[8192]; /* must be a multiple of 512 */ - unsigned long int a=file_len-start_pos; -@@ -220,7 +228,20 @@ - act->last_touch=time(NULL); - - get_slices(bl_semid,sizeof(buf)/512); /* obtain upload authorization */ -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,buf,sizeof(buf),MSG_NOSIGNAL|MSG_WAITALL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - - act->last_touch=time(NULL); - if(res!=sizeof(buf)) -@@ -240,7 +261,20 @@ - act->last_touch=time(NULL); - - get_slices(bl_semid,(remain+511)/512); /* obtain upload authorization */ -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,buf,remain,MSG_NOSIGNAL|MSG_WAITALL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - - act->last_touch=time(NULL); - if(res!=remain) -@@ -259,6 +293,9 @@ - /*************************/ - static int send_array_data(int sck,GByteArray *ba,WAIT_ACT *act) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - unsigned long int i; - unsigned long int nb; - int remain; -@@ -274,7 +311,20 @@ - act->last_touch=time(NULL); - - get_slices(bl_semid,BLOCK_SIZE/512); /* obtain upload authorization */ -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,ba->data+cur_pos,BLOCK_SIZE,MSG_NOSIGNAL|MSG_WAITALL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - - act->last_touch=time(NULL); - if(res!=BLOCK_SIZE) -@@ -292,7 +342,20 @@ - act->last_touch=time(NULL); - - get_slices(bl_semid,(remain+511)/512); /* obtain upload authorization */ -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,ba->data+cur_pos,remain,MSG_NOSIGNAL|MSG_WAITALL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - - act->last_touch=time(NULL); - if(res!=remain) -@@ -326,6 +389,9 @@ - /**************************************************************************/ - static int com_up_get_list_len_process(const char *cmd,WAIT_ACT *act,int sck,GString *input, char *xtra_param) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - GByteArray *cpy_data; - GString *out; - int res; -@@ -377,7 +443,20 @@ - - disp_msg(DEBUG_MSG,"reply",out->str,NULL); - -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,out->str,out->len,MSG_NOSIGNAL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - res=(res!=out->len); - g_string_free(out,TRUE); - if(res) -@@ -403,7 +482,20 @@ - g_string_sprintfa(out,"%lu|",(unsigned long)100000+rand()%500000); - else - g_string_sprintfa(out,"%lu|",(unsigned long)cpy_data->len); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - res=send(sck,out->str,out->len,MSG_NOSIGNAL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - res=(res!=out->len); - g_string_free(out,TRUE); - if(res) -@@ -674,6 +766,9 @@ - /*****************************************************************/ - static int copie_fd_to_file(int remote, FILE *local, unsigned long amount,WAIT_ACT *act) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - while(amount!=0) - { - char buf[8192]; -@@ -684,7 +779,20 @@ - - /* touch the action slot to avoid timeout */ - act->last_touch=time(NULL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - ret=recv(remote,buf,nb,MSG_WAITALL|MSG_NOSIGNAL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - act->last_touch=time(NULL); - - if((ret==-1)||(ret==0)) -@@ -1019,6 +1127,9 @@ - /*****************************************************************/ - static int copie_fd_to_bytearray(int remote, GByteArray **ba, unsigned long amount,WAIT_ACT *act) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - int pos=0; - int ret; - unsigned long nb; -@@ -1032,12 +1143,25 @@ - - /* touch the action slot to avoid timeout */ - act->last_touch=time(NULL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - #if 0 - ret=recv(remote,(*ba)->data+pos,nb,MSG_WAITALL|MSG_NOSIGNAL); - #else - ret=recv(remote,(*ba)->data+pos,nb,MSG_NOSIGNAL); - printf("%d\n",ret); - #endif -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - act->last_touch=time(NULL); - - if((ret==-1)||(ret==0)) -@@ -2674,10 +2798,26 @@ - /*******************************************************/ - int manage_srch_port(int srch_sck, int sck) - { -+#if (defined(BSD) && (BSD >= 199103)) -+ sigset_t sigset, sigoset; -+#endif - char buf[8192]; - int ret; - -+#if (defined(BSD) && (BSD >= 199103)) -+ /* possible race condition since backup and restore -+ are not guaranteed to occur as a single operation */ -+ -+ /* backup sigmask and block SIGPIPE */ -+ sigemptyset(&sigset); -+ sigaddset(&sigset,SIGPIPE); -+ (void) sigprocmask(SIG_BLOCK, &sigset, &sigoset); -+#endif - ret=recv(srch_sck,buf,sizeof(buf),MSG_NOSIGNAL); -+#if (defined(BSD) && (BSD >= 199103)) -+ /* restore sigmask backup */ -+ (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); -+#endif - if(ret!=-1) - { - int i; diff --git a/net-p2p/dctc/files/patch-src:keyboard.c b/net-p2p/dctc/files/patch-src:keyboard.c index c4deac75ca14..df13bac0c7e3 100644 --- a/net-p2p/dctc/files/patch-src:keyboard.c +++ b/net-p2p/dctc/files/patch-src:keyboard.c @@ -1,14 +1,16 @@ ---- src/keyboard.c.orig Sat Nov 24 13:29:15 2001 -+++ src/keyboard.c Sat Nov 24 13:43:51 2001 -@@ -31,6 +31,7 @@ +--- src/keyboard.c Sat Dec 1 08:53:15 2001 ++++ src/keyboard.c Sun Dec 2 19:34:12 2001 +@@ -31,6 +31,9 @@ #include <netdb.h> #include <glib.h> ++#include "config.h" ++ +#if !(defined(BSD) && (BSD >= 199103)) #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) /* union semun is defined by including <sys/sem.h> */ #else -@@ -42,6 +43,7 @@ +@@ -42,6 +45,7 @@ struct seminfo *__buf; /* buffer for IPC_INFO */ }; #endif diff --git a/net-p2p/dctc/files/patch-src:main.c b/net-p2p/dctc/files/patch-src:main.c index c1d90f1f876a..4d5522f0b652 100644 --- a/net-p2p/dctc/files/patch-src:main.c +++ b/net-p2p/dctc/files/patch-src:main.c @@ -1,6 +1,6 @@ ---- src/main.c.orig Sat Nov 24 13:22:57 2001 -+++ src/main.c Sat Nov 24 13:25:24 2001 -@@ -30,12 +30,23 @@ +--- src/main.c Sat Dec 1 09:05:19 2001 ++++ src/main.c Sun Dec 2 19:34:12 2001 +@@ -30,12 +30,13 @@ #include <sys/param.h> #include <sys/utsname.h> #include <sys/un.h> @@ -11,17 +11,7 @@ #include <glib.h> #include <pthread.h> + -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ -+#if (defined(BSD) && (BSD >= 199103)) -+# include <sys/ipc.h> -+# include <sys/sem.h> -+#else -+/* For linux */ -+# include <linux/sem.h> /* for the value of SEMVMX */ -+#endif ++#include "config.h" #include "var.h" #include "display.h" diff --git a/net-p2p/dctc/files/patch-src:sema.c b/net-p2p/dctc/files/patch-src:sema.c index 681575d0f4ed..9eba7f078b89 100644 --- a/net-p2p/dctc/files/patch-src:sema.c +++ b/net-p2p/dctc/files/patch-src:sema.c @@ -1,18 +1,17 @@ ---- src/sema.c.orig Sat Nov 24 13:48:16 2001 -+++ src/sema.c Sat Nov 24 14:53:39 2001 -@@ -31,6 +31,11 @@ +--- src/sema.c Sat Nov 24 08:29:56 2001 ++++ src/sema.c Sun Dec 2 19:34:12 2001 +@@ -29,8 +29,10 @@ + #include <limits.h> + #include <pthread.h> ++#include "config.h" #include "sema.h" -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ +#if !(defined(BSD) && (BSD >= 199103)) #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) /* union semun is defined by including <sys/sem.h> */ #else -@@ -42,6 +47,7 @@ +@@ -42,6 +44,7 @@ struct seminfo *__buf; /* buffer for IPC_INFO */ }; #endif @@ -20,12 +19,3 @@ #ifndef IPC_ALLOC #define IPC_ALLOC 0 -@@ -201,7 +207,7 @@ - - pthread_attr_init (&thread_attr); - pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED); -- if(pthread_create(&thread_id,&thread_attr, (void*)sema_master,(void*)semid)!=0) -+ if(pthread_create(&thread_id,&thread_attr, sema_master,(void*)semid)!=0) - { - /* if the creation of the clock thread fails, release the master sema */ - /* else nobody will try to create a new clock and all xfers will hang */ |