1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

Upgrade to 1.15.

This commit is contained in:
Vanilla I. Shu 2007-06-23 02:03:36 +00:00
parent b1af060bcc
commit 3ad4df44d5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=194102
5 changed files with 43 additions and 34 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= mq4cpp
PORTVERSION= 1.14
PORTVERSION= 1.15
CATEGORIES= devel
MASTER_SITES= http://www.sixtyfourbit.org/Download/

View File

@ -1,3 +1,3 @@
MD5 (mq4cpp-1.14.tar.bz2) = a41fadd676a163700072a261125277fa
SHA256 (mq4cpp-1.14.tar.bz2) = 032634e679d6a9b1eb742c14aacd510a29388207202d9e3ee21afc3f1e061845
SIZE (mq4cpp-1.14.tar.bz2) = 1731994
MD5 (mq4cpp-1.15.tar.bz2) = 64f71109adfc0fdbbc44ca81752493fb
SHA256 (mq4cpp-1.15.tar.bz2) = cba884139ba1c1aa0092e8d108b03c897d489766832e1a0cb8214bdf017ff8a7
SIZE (mq4cpp-1.15.tar.bz2) = 1863842

View File

@ -1,34 +1,11 @@
--- src/FileSystem.cpp.orig Wed Jan 3 21:57:08 2007
+++ src/FileSystem.cpp Thu Jan 4 16:43:02 2007
@@ -28,7 +28,9 @@
#ifndef WIN32
#include <stdlib.h>
#include <stdio.h>
-#include <sys/sendfile.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
#include <fcntl.h>
#include <regex.h>
#include <errno.h>
@@ -258,7 +260,11 @@
int out_fd = ::open(theDestFullName, O_WRONLY|O_CREAT|O_TRUNC, statbuf.st_mode);
if(out_fd<0)
throw FileSystemException();
+#ifdef __FreeBSD__
+ sendfile(in_fd, out_fd, 0, statbuf.st_size, NULL, NULL, 0);
+#else
sendfile(out_fd, in_fd, 0, statbuf.st_size);
+#endif
::close(out_fd);
::close(in_fd);
#endif
@@ -321,7 +327,11 @@
--- src/FileSystem.cpp.orig Sat Mar 17 09:51:21 2007
+++ src/FileSystem.cpp Sat Jun 23 09:45:31 2007
@@ -354,7 +354,11 @@
Directory* ret=new Directory(path);
ret->search();
#else
+#ifdef __FreeBSD__
+ char* ptr = getcwd (NULL, PATH_MAX);
+ char* ptr=getcwd (NULL, PATH_MAX);
+#else
char* ptr=get_current_dir_name();
+#endif

View File

@ -0,0 +1,20 @@
--- src/Socket.cpp.orig Sat Jun 23 09:55:17 2007
+++ src/Socket.cpp Sat Jun 23 09:58:16 2007
@@ -156,7 +156,7 @@
} while (IFRSIZE <= ifc.ifc_len);
ifr = ifc.ifc_req;
- for(; (ifr - ifc.ifc_req) * sizeof(ifreq) < static_cast<ulong>(ifc.ifc_len); ++ifr)
+ for(; (ifr - ifc.ifc_req) * sizeof(ifreq) < static_cast<unsigned long>(ifc.ifc_len); ++ifr)
{
if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) continue; // duplicate, skip it
@@ -168,7 +168,7 @@
string ip = inet_ntoa(inaddrr(ifr_addr.sa_data));
// ------ get HW_ADDRESS ------
- if (ioctl(sockfd, SIOCGIFHWADDR, ifr) != 0) continue; // failed to get mac, skip it
+ if (ioctl(sockfd, SIOCGIFMAC, ifr) != 0) continue; // failed to get mac, skip it
string mac=string((char*)ifr->ifr_addr.sa_data,MAC_ADDRESS_CHAR_LEN);

View File

@ -1,6 +1,6 @@
--- src/Thread.cpp.orig Thu Jan 4 12:31:04 2007
+++ src/Thread.cpp Thu Jan 4 12:31:22 2007
@@ -76,7 +76,7 @@
--- src/Thread.cpp.orig Sat Mar 17 10:20:15 2007
+++ src/Thread.cpp Sat Jun 23 09:54:56 2007
@@ -78,7 +78,7 @@
#ifdef WIN32
return GetCurrentThreadId();
#else
@ -9,3 +9,15 @@
#endif
}
@@ -277,10 +277,10 @@
if(SetThreadAffinityMask(m_hThread,mask)==0)
throw ThreadException("Failed to set affinity");
#else
+#ifdef HAVE_PTHREAD_SETAFFINITY_NP
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(cpu, &cpuset);
-#ifdef HAVE_PTHREAD_SETAFFINITY_NP
#ifndef P2_PTHREAD_SETAFFINITY
if(pthread_setaffinity_np(m_hThread, sizeof(cpuset), &cpuset)!=0)
throw ThreadException("Failed to set affinity");