summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-16 21:12:18 -0700
committerRichard Linden <none@none>2013-09-16 21:12:18 -0700
commitfc8c3a4cf7368ad7ee78e817e8c116d09b7377d0 (patch)
tree7513b7d0b5651d5de6e1ca4873efdc4689d5245b /indra/llcommon
parent5f7f84c7acb686659b2bdc9a018b18c2b23db3d0 (diff)
parentfb82d0c4dbb6f6e3c58cca6ab69d638bda851b34 (diff)
merge
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-xindra/llcommon/llerror.h12
-rwxr-xr-xindra/llcommon/llsys.cpp21
-rw-r--r--indra/llcommon/llversionviewer.h41
-rwxr-xr-xindra/llcommon/tests/llprocess_test.cpp14
4 files changed, 65 insertions, 23 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 1ddb4874a0..b8ad509d88 100755
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -357,12 +357,12 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, ##__VA_ARGS__)
// DEPRECATED: Use the new macros that allow tags and *look* like macros.
-#define lldebugs LL_COMPILE_TIME_MESSAGE("Warning: lldebugs deprecated, use LL_DEBUGS() instead"); LL_DEBUGS()
-#define llinfos LL_COMPILE_TIME_MESSAGE("Warning: llinfos deprecated, use LL_INFOS() instead"); LL_INFOS()
-#define llwarns LL_COMPILE_TIME_MESSAGE("Warning: llwarns deprecated, use LL_WARNS() instead"); LL_WARNS()
-#define llerrs LL_COMPILE_TIME_MESSAGE("Warning: llerrs deprecated, use LL_ERRS() instead"); LL_ERRS()
-#define llcont LL_COMPILE_TIME_MESSAGE("Warning: llcont deprecated, use LL_CONT instead"); LL_CONT
-#define llendl LL_COMPILE_TIME_MESSAGE("Warning: llendl deprecated, use LL_ENDL instead"); LL_ENDL
+#define lldebugs LL_COMPILE_TIME_MESSAGE("Warning: lldebugs deprecated, use LL_DEBUGS() instead") LL_DEBUGS()
+#define llinfos LL_COMPILE_TIME_MESSAGE("Warning: llinfos deprecated, use LL_INFOS() instead") LL_INFOS()
+#define llwarns LL_COMPILE_TIME_MESSAGE("Warning: llwarns deprecated, use LL_WARNS() instead") LL_WARNS()
+#define llerrs LL_COMPILE_TIME_MESSAGE("Warning: llerrs deprecated, use LL_ERRS() instead") LL_ERRS()
+#define llcont LL_COMPILE_TIME_MESSAGE("Warning: llcont deprecated, use LL_CONT instead") LL_CONT
+#define llendl LL_COMPILE_TIME_MESSAGE("Warning: llendl deprecated, use LL_ENDL instead") LL_ENDL
#endif // LL_LLERROR_H
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 2b0083caff..7267ba333e 100755
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -66,12 +66,18 @@ using namespace llsd;
# include <sys/sysctl.h>
# include <sys/utsname.h>
# include <stdint.h>
-# include <Carbon/Carbon.h>
+# include <CoreServices/CoreServices.h>
# include <stdexcept>
# include <mach/host_info.h>
# include <mach/mach_host.h>
# include <mach/task.h>
# include <mach/task_info.h>
+
+// disable warnings about Gestalt calls being deprecated
+// until Apple get's on the ball and provides an alternative
+//
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
#elif LL_LINUX
# include <errno.h>
# include <sys/utsname.h>
@@ -862,17 +868,17 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
size_t len = sizeof(phys);
sysctl(mib, 2, &phys, &len, NULL, 0);
- return U32Bytes(phys);
+ return U32Bytes(llmin(phys, (U64)U32_MAX));
#elif LL_LINUX
U64 phys = 0;
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
- return U32Bytes(phys);
+ return U32Bytes(llmin(phys, (U64)U32_MAX));
#elif LL_SOLARIS
U64 phys = 0;
phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
- return U32Bytes(phys);
+ return U32Bytes(llmin(phys, (U64)U32_MAX));
#else
return 0;
@@ -1506,3 +1512,10 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
if (dst != NULL) gzclose(dst);
return retval;
}
+
+#if LL_DARWIN
+// disable warnings about Gestalt calls being deprecated
+// until Apple get's on the ball and provides an alternative
+//
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
new file mode 100644
index 0000000000..6a5ff314e4
--- /dev/null
+++ b/indra/llcommon/llversionviewer.h
@@ -0,0 +1,41 @@
+/**
+ * @file llversionviewer.h
+ * @brief
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVERSIONVIEWER_H
+#define LL_LLVERSIONVIEWER_H
+
+const S32 LL_VERSION_MAJOR = 3;
+const S32 LL_VERSION_MINOR = 4;
+const S32 LL_VERSION_PATCH = 6;
+const S32 LL_VERSION_BUILD = 0;
+
+const char * const LL_CHANNEL = "Second Life Developer";
+
+#if LL_DARWIN
+const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
+#endif
+
+#endif
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index e09692c82d..e4e766d51b 100755
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -611,9 +611,6 @@ namespace tut
void object::test<5>()
{
set_test_name("exit(2)");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
PythonProcessLauncher py(get_test_name(),
"import sys\n"
"sys.exit(2)\n");
@@ -625,10 +622,7 @@ namespace tut
template<> template<>
void object::test<6>()
{
- set_test_name("syntax_error:");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
+ set_test_name("syntax_error");
PythonProcessLauncher py(get_test_name(),
"syntax_error:\n");
py.mParams.files.add(LLProcess::FileParam()); // inherit stdin
@@ -650,9 +644,6 @@ namespace tut
void object::test<7>()
{
set_test_name("explicit kill()");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
PythonProcessLauncher py(get_test_name(),
"from __future__ import with_statement\n"
"import sys, time\n"
@@ -697,9 +688,6 @@ namespace tut
void object::test<8>()
{
set_test_name("implicit kill()");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
NamedTempFile out("out", "not started");
LLProcess::handle phandle(0);
{