Changeset 21048
- Timestamp:
- 02/23/08 10:45:33 (8 months ago)
- Files:
-
- juggler/trunk/modules/vapor/vpr/Thread/Signal.h (modified) (3 diffs)
- juggler/trunk/modules/vapor/vpr/Util/Assert.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/Util/Singleton.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/NSPR/Sync/MutexNSPR.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/POSIX/Sync/CondVarPosix.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/POSIX/SystemPosix.cpp (modified) (3 diffs)
- juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/SIM/IO/Socket/SocketImplSIM.cpp (modified) (2 diffs)
- juggler/trunk/modules/vapor/vpr/md/SIM/IO/Socket/SocketImplSIM.h (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/SIM/Network/Message.h (modified) (2 diffs)
- juggler/trunk/modules/vapor/vpr/md/SIM/Network/NetworkLine.h (modified) (2 diffs)
- juggler/trunk/modules/vapor/vpr/md/SIM/Network/NetworkNode.cpp (modified) (3 diffs)
- juggler/trunk/modules/vapor/vpr/md/SIM/SocketManager.cpp (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/md/WIN32/IO/Port/SerialPortImplWin32.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vapor/vpr/Thread/Signal.h
r20974 r21048 39 39 #include <vpr/vprConfig.h> 40 40 41 #include < stdlib.h>42 #include < string.h>41 #include <cstdlib> 42 #include <cstring> 43 43 44 44 #ifdef HAVE_SIGNAL_H … … 243 243 const int flags) 244 244 { 245 memset(&mSA, '\0', sizeof(mSA));245 std::memset(&mSA, '\0', sizeof(mSA)); 246 246 mSA.sa_handler = handler; 247 247 mSA.sa_flags = flags; … … 249 249 if ( mask != NULL ) 250 250 { 251 memcpy(&mSA.sa_mask, mask, sizeof(sigset_t));251 std::memcpy(&mSA.sa_mask, mask, sizeof(sigset_t)); 252 252 } 253 253 } juggler/trunk/modules/vapor/vpr/Util/Assert.h
r20974 r21048 45 45 */ 46 46 #ifdef VPR_DEBUG 47 # include < assert.h>47 # include <cassert> 48 48 # include <iostream> 49 49 # include <vpr/SystemBase.h> juggler/trunk/modules/vapor/vpr/Util/Singleton.h
r20974 r21048 39 39 #include <vpr/vprConfig.h> 40 40 41 #include < stdlib.h>41 #include <cstdlib> 42 42 43 43 #include <vpr/Sync/Mutex.h> juggler/trunk/modules/vapor/vpr/md/NSPR/Sync/MutexNSPR.h
r20974 r21048 46 46 #include <vpr/vprConfig.h> 47 47 48 #include < stdlib.h>48 #include <cstdlib> 49 49 #include <prlock.h> 50 50 #include <boost/noncopyable.hpp> juggler/trunk/modules/vapor/vpr/md/POSIX/Sync/CondVarPosix.h
r20974 r21048 46 46 #include <vpr/vprConfig.h> 47 47 48 #include < stdlib.h>49 #include < assert.h>48 #include <cstdlib> 49 #include <cassert> 50 50 #include <pthread.h> 51 51 #include <boost/noncopyable.hpp> juggler/trunk/modules/vapor/vpr/md/POSIX/SystemPosix.cpp
r21035 r21048 36 36 #include <vpr/vprConfig.h> 37 37 38 #include < stdlib.h>39 #include < string.h>38 #include <cstdlib> 39 #include <cstring> 40 40 #include <sys/utsname.h> 41 41 … … 118 118 bool status(false); 119 119 120 val = ::getenv(name.c_str());120 val = std::getenv(name.c_str()); 121 121 122 122 if ( val != NULL ) … … 150 150 { 151 151 char* temp; 152 temp = st rchr(buffer.nodename, '.');152 temp = std::strchr(buffer.nodename, '.'); 153 153 154 154 // If the node name contains the full host, dots and all, truncate it juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.h
r20992 r21048 45 45 #include <vpr/vprConfig.h> 46 46 47 #include < stdlib.h>47 #include <cstdlib> 48 48 #include <vector> 49 49 #include <pthread.h> juggler/trunk/modules/vapor/vpr/md/SIM/IO/Socket/SocketImplSIM.cpp
r20974 r21048 37 37 38 38 #include <iomanip> 39 #include < stdlib.h>40 #include < string.h>39 #include <cstdlib> 40 #include <cstring> 41 41 42 42 #include <vpr/Util/Assert.h> … … 231 231 232 232 // Complete the read operation. 233 memcpy(buffer, message->getBody(), copy_len);233 std::memcpy(buffer, message->getBody(), copy_len); 234 234 bytes_read = copy_len; 235 235 juggler/trunk/modules/vapor/vpr/md/SIM/IO/Socket/SocketImplSIM.h
r20974 r21048 39 39 #include <vpr/vprConfig.h> 40 40 41 #include < stdlib.h>41 #include <cstdlib> 42 42 #include <string> 43 43 #include <vector> juggler/trunk/modules/vapor/vpr/md/SIM/Network/Message.h
r20974 r21048 42 42 #include <boost/smart_ptr.hpp> 43 43 44 #include < stdlib.h>45 #include <string.h>44 #include <cstdlib> 45 //#include <cstring> 46 46 #include <vpr/vpr.h> 47 47 #include <vpr/Util/Interval.h> … … 81 81 vpr::Uint8* start = (vpr::Uint8*) msg; 82 82 mMsg = MessageDataPtr( new MessageDataType(start, start+msg_size)); 83 //mMsg = malloc(msg_size);84 // memcpy(mMsg, msg, msg_size);83 //mMsg = std::malloc(msg_size); 84 //std::memcpy(mMsg, msg, msg_size); 85 85 } 86 86 juggler/trunk/modules/vapor/vpr/md/SIM/Network/NetworkLine.h
r20974 r21048 39 39 #include <vpr/vprConfig.h> 40 40 41 #include < stdlib.h>42 #include < math.h>41 #include <cstdlib> 42 #include <cmath> 43 43 #include <string> 44 44 #include <deque> … … 152 152 153 153 // Round up since vpr::Interval objects deal in whole numbers. 154 double time = ceil(microsec);154 double time = std::ceil(microsec); 155 155 156 156 return vpr::Interval((vpr::Uint32) time, vpr::Interval::Usec); juggler/trunk/modules/vapor/vpr/md/SIM/Network/NetworkNode.cpp
r20974 r21048 36 36 #include <vpr/vprConfig.h> 37 37 38 #include < stdlib.h>38 #include <cstdlib> 39 39 #include <vpr/Util/Assert.h> 40 40 #include <vpr/Util/Debug.h> … … 75 75 cur_val = ip_str.substr(cur_pos, next_dot - cur_pos); 76 76 77 ip_addr.bytes[i] = atoi(cur_val.c_str());77 ip_addr.bytes[i] = std::atoi(cur_val.c_str()); 78 78 79 79 cur_pos = next_dot + 1; … … 134 134 vprASSERT( mIpAddr == sock->getLocalAddr().getAddressValue() && "Trying to add socket to node of wrong ip addr"); 135 135 if(hasSocket(port, sock->getType())) 136 { 136 137 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) << "NetworkNode::addSocket: Tried to overwrite existing socket: " << sock->getLocalAddr() << std::endl << vprDEBUG_FLUSH; 138 } 137 139 vprASSERT(! hasSocket(port, sock->getType()) && "Tried to overwrite an existing socket"); 138 140 juggler/trunk/modules/vapor/vpr/md/SIM/SocketManager.cpp
r20974 r21048 36 36 #include <vpr/vprConfig.h> 37 37 38 #include < stdlib.h>38 #include <cstdlib> 39 39 #include <boost/concept_check.hpp> 40 40 #include <boost/utility.hpp> juggler/trunk/modules/vapor/vpr/md/WIN32/IO/Port/SerialPortImplWin32.cpp
r20995 r21048 38 38 #include <iostream> 39 39 #include <sstream> 40 #include <stdlib.h> 41 #include <string.h> 40 #include <cstdlib> 42 41 43 42 #include <vpr/IO/TimeoutException.h>
