From 21cf4a46b9e9ce52266aac873aa107cad82cc847 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Sat, 4 Nov 2006 21:41:01 -0500 Subject: fixes so that M5 will compile under solaris SConstruct: Add check to see if we need to include libsocket src/arch/sparc/floatregfile.cc: src/arch/sparc/intregfile.cc: use memset rather than bzero and include the appropriate headerfile src/base/pollevent.cc: If we're compling under solaris we need sys/file.h src/base/random.cc: src/base/random.hh: solaris doesn't have random(), so use rint with the correct rounding mode if we're compiling on solaris src/base/stats/flags.hh: u_int32_t?? src/base/time.hh: grab the timersub() define from freebsd since it doesn't exist in solaris src/cpu/inst_seq.hh: we don't need to include stdint here src/sim/byteswap.hh: the method to detect endianness on Solaris is a little more complex... --HG-- extra : convert_revision : 6b7db0e900e7bccfc250d65c125065f27280dda1 --- SConstruct | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index dac4d137c..ce5ab4bb8 100644 --- a/SConstruct +++ b/SConstruct @@ -270,6 +270,12 @@ if not conf.CheckLib(py_version_name): print "Error: can't find Python library", py_version_name Exit(1) +# On Solaris you need to use libsocket for socket ops +if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): + if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): + print "Can't find library with socket calls (e.g. accept())" + Exit(1) + # Check for zlib. If the check passes, libz will be automatically # added to the LIBS environment variable. if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++'): -- cgit v1.2.3 From 430622c173b676c7a53aa5623d5197a26f9c9190 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 6 Nov 2006 10:15:27 -0500 Subject: replace NULL with 0.... Why isn't NULL defined by default on Mac OS X I don't know --HG-- extra : convert_revision : b60403445bd4e855732fd4e6753068abd90ecc9d --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index ce5ab4bb8..59d40d5cc 100644 --- a/SConstruct +++ b/SConstruct @@ -271,8 +271,8 @@ if not conf.CheckLib(py_version_name): Exit(1) # On Solaris you need to use libsocket for socket ops -if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): - if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): +if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C++', 'accept(0,0,0);'): + if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C++', 'accept(0,0,0);'): print "Can't find library with socket calls (e.g. accept())" Exit(1) -- cgit v1.2.3