updated on Wed Jan 18 04:00:29 UTC 2012
[aur-mirror.git] / kni / kni-4.3.0.patch
blob9a2689089c202d53f10b4dff74155b776337e784
1 diff --git a/Makefile b/Makefile
2 index 08e5db2..27235be 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -4,7 +4,7 @@
6 # Authors: see AUTHORS file
7 #===========================================================================
9 -TARGETS = lib/kinematics src/common src/Base src/InvKin src/LM src/kni_wrapper py demo
10 +TARGETS = lib/kinematics src/common src/Base src/InvKin src/LM src/kni_wrapper demo
11 TARGETS_B = $(foreach target,$(TARGETS),$(target).build)
12 TARGETS_C = $(foreach target,$(TARGETS),$(target).clean)
13 NEURONICS_DOC_DIR = doc/neuronics-doc/source
14 diff --git a/demo/Makefile b/demo/Makefile
15 index df71b21..088b032 100644
16 --- a/demo/Makefile
17 +++ b/demo/Makefile
18 @@ -37,7 +37,7 @@ $(CTARGETS_D):
20 $(TARGETS_D): $(CTARGETS_D)
21 echo "Building: $@"
22 - $(CXX) $(CXXFLAGS) -I$(INCLUDE_DIR) -lpthread -o $(@:.demo=)/$(@:.demo=) $(wildcard $(@:.demo=)/*.cpp) ${AVAILABLE_LIBRARIES}
23 + $(CXX) $(CXXFLAGS) -I$(INCLUDE_DIR) -pthread -o $(@:.demo=)/$(@:.demo=) $(wildcard $(@:.demo=)/*.cpp) ${AVAILABLE_LIBRARIES}
26 $(TARGETS_D_C):
27 diff --git a/lib/kinematics/Makefile b/lib/kinematics/Makefile
28 index e05bd01..6c577d2 100644
29 --- a/lib/kinematics/Makefile
30 +++ b/lib/kinematics/Makefile
31 @@ -4,7 +4,7 @@
32 # Jonas Haller 2009
33 #===========================================================================
34 CXX = g++
35 -CXXFLAGS += -c -Wall -D_REENTRANT -D__NO_MATH_INLINES -pthread -I $(BOOST_INCLUDE_DIR)
36 +CXXFLAGS += -fPIC -c -Wall -D_REENTRANT -D__NO_MATH_INLINES -pthread -I $(BOOST_INCLUDE_DIR)
37 LD = g++
38 LDFLAGS = -shared -fPIC
39 MAKE = make
40 diff --git a/lib/kinematics/roboop/Makefile b/lib/kinematics/roboop/Makefile
41 index 74cbf5d..8681d38 100644
42 --- a/lib/kinematics/roboop/Makefile
43 +++ b/lib/kinematics/roboop/Makefile
44 @@ -7,7 +7,7 @@ CC = g++
45 # edit the following to reflect the location of boost include files
46 # if not in the defaut (/usr/include)
47 BOOST_INCLUDE_DIR=/usr/include
48 -CFLAGS = -O -I $(BOOST_INCLUDE_DIR) -I ./source -I ./newmat -Wall -D_REENTRANT -pthread #-Duse_namespace #-fno-const-strings
49 +CFLAGS = -fPIC -O -I $(BOOST_INCLUDE_DIR) -I ./source -I ./newmat -Wall -D_REENTRANT -pthread #-Duse_namespace #-fno-const-strings
50 LIBS = -L./ -lroboop -lnewmat -lm -pthread
51 AR = ar
52 RANLIB = ranlib
53 diff --git a/src/Base/cdlSocket.cpp b/src/Base/cdlSocket.cpp
54 index 2afc54e..9585ce9 100644
55 --- a/src/Base/cdlSocket.cpp
56 +++ b/src/Base/cdlSocket.cpp
57 @@ -21,6 +21,7 @@
58 /****************************************************************************/
59 #include "KNI/cdlSocket.h"
60 #include <iostream>
61 +#include <sstream>
62 /****************************************************************************/
63 //test write:
64 int writesz;
65 @@ -91,8 +92,9 @@ CCdlSocket::CCdlSocket(char* ipAddr, int port): _ipAddr(ipAddr), _port(port){
66 int res;
67 _socketfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
68 if(_socketfd == -1){
69 - std::cout << "socket could not be created"<<_ipAddr<<" port: "<< _port<<" \n";
70 - exit(1);
71 + std::ostringstream s;
72 + s << "socket could not be created"<<_ipAddr<<" port: "<< _port<<" \n";
73 + throw Exception( s.str().c_str(), 0 );
75 memset(&_socketAddr, 0, sizeof(_socketAddr));
76 _socketAddr.sin_family = AF_INET;
77 @@ -102,14 +104,16 @@ CCdlSocket::CCdlSocket(char* ipAddr, int port): _ipAddr(ipAddr), _port(port){
78 //connect to the server
79 res = inet_pton ( AF_INET, _ipAddr, &_socketAddr.sin_addr );
80 if ( errno == EAFNOSUPPORT ){
81 - std::cout << "inet_pton failed, try again "<<_ipAddr<<" port: "<< _port<<" \n";
82 - exit(1);
83 + std::ostringstream s;
84 + s << "inet_pton failed, try again "<<_ipAddr<<" port: "<< _port<<" \n";
85 + throw Exception( s.str().c_str(), 0 );
87 // std::cout << "trying to connect to server...\n";
88 res = connect(_socketfd, (struct sockaddr *) &_socketAddr, _len);
89 if(res != 0){
90 - std::cout << "client could not connect, check if server is running on ip "<<_ipAddr<<" port: "<< _port<<" \n";
91 - exit(1);
92 + std::ostringstream s;
93 + s << "client could not connect, check if server is running on ip "<<_ipAddr<<" port: "<< _port<<" \n";
94 + throw Exception( s.str().c_str(), 0 );
96 else{
97 // std::cout << "client connected to ip "<<_ipAddr<<", port: "<< _port<<" \n";
98 diff --git a/src/common/Makefile b/src/common/Makefile
99 index 8ec540c..c7460b5 100644
100 --- a/src/common/Makefile
101 +++ b/src/common/Makefile
102 @@ -5,7 +5,7 @@
103 #===========================================================================
105 CXX = g++
106 -CXXFLAGS += -g -O2 -Wall
107 +CXXFLAGS += -g -O2 -Wall -fPIC
109 TARGETS = alib