trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject [3/3] git commit: Make ATS compile on Solaris Studio again
Date Thu, 20 Sep 2012 15:19:56 GMT
Make ATS compile on Solaris Studio again

* move NOWARN macro from ink_defs.h to ink_error.h
* include ink_error.h where only NOWARN() macro is used.
* guarantee that all extern "C" have #ifdefs


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/97fd7b57
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/97fd7b57
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/97fd7b57

Branch: refs/heads/master
Commit: 97fd7b57753773cabb1d08fe854f01288accce25
Parents: 00d48fa
Author: Igor Galić <i.galic@brainsware.org>
Authored: Thu Sep 20 17:14:32 2012 +0200
Committer: Igor Galić <i.galic@brainsware.org>
Committed: Thu Sep 20 17:14:32 2012 +0200

----------------------------------------------------------------------
 lib/records/P_RecUtils.h    |    1 -
 lib/ts/ink_defs.h           |    5 -----
 lib/ts/ink_error.h          |   10 +++++++++-
 lib/ts/ink_inout.h          |    7 +++++--
 lib/ts/ink_res_mkquery.cc   |    2 +-
 mgmt/cli/UtilCmds.cc        |    2 +-
 mgmt/cli/cliMain.cc         |    1 +
 mgmt/cli/processArgument.cc |    2 +-
 mgmt/utils/XmlUtils.cc      |    2 +-
 9 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/lib/records/P_RecUtils.h
----------------------------------------------------------------------
diff --git a/lib/records/P_RecUtils.h b/lib/records/P_RecUtils.h
index af46549..28163ef 100644
--- a/lib/records/P_RecUtils.h
+++ b/lib/records/P_RecUtils.h
@@ -26,7 +26,6 @@
 
 #include "Diags.h"
 #include "ink_atomic.h"
-#include "ink_defs.h"
 
 #include "P_RecDefs.h"
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/lib/ts/ink_defs.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_defs.h b/lib/ts/ink_defs.h
index 6818aab..2970e2b 100644
--- a/lib/ts/ink_defs.h
+++ b/lib/ts/ink_defs.h
@@ -65,11 +65,6 @@ typedef void (*VVP_PFN) (void *);
 typedef void (*VV_PFN) (void);
 typedef void (*VI_PFN) (int);
 
-/* Compiler Hints
- */
-#define	NOWARN_UNUSED(x)	(void)(x)
-#define	NOWARN_UNUSED_RETURN(x)	if (x) {}
-
 /* Variables
 */
 extern int debug_level;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/lib/ts/ink_error.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_error.h b/lib/ts/ink_error.h
index 0dca7e5..94e9db6 100644
--- a/lib/ts/ink_error.h
+++ b/lib/ts/ink_error.h
@@ -36,7 +36,15 @@
 #include "ink_platform.h"
 
 #include "ink_apidefs.h"
-#include "ink_defs.h"
+
+
+/* Compiler Hints
+ * XXX(igalic): This has been pulled from ink_defs.h because
+ * Solaris CC compiler complained about hwloc. Don't. Ask.
+ */
+#define	NOWARN_UNUSED(x)	(void)(x)
+#define	NOWARN_UNUSED_RETURN(x)	if (x) {}
+
 
 #ifdef __cplusplus
 extern "C" {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/lib/ts/ink_inout.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_inout.h b/lib/ts/ink_inout.h
index 0663a8f..adc4041 100644
--- a/lib/ts/ink_inout.h
+++ b/lib/ts/ink_inout.h
@@ -30,10 +30,13 @@
 #define _INOUT_H
 
 // source of good macros..
-extern "C"
-{
+#ifdef __cplusplus
+extern "C" {
+#endif                          /* __cplusplus */
 #include "/usr/include/arpa/nameser.h"
+#ifdef __cplusplus
 }
+#endif                          /* __cplusplus */
 
 #define GETCHAR(s, cp) { \
         (s) = *(cp)++; \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/lib/ts/ink_res_mkquery.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_res_mkquery.cc b/lib/ts/ink_res_mkquery.cc
index 3bd73f8..366c1d5 100644
--- a/lib/ts/ink_res_mkquery.cc
+++ b/lib/ts/ink_res_mkquery.cc
@@ -80,7 +80,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "ink_defs.h"
+#include "ink_error.h"
 #include "ink_resolver.h"
 
 #define SPRINTF(x) (sprintf x)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/mgmt/cli/UtilCmds.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/UtilCmds.cc b/mgmt/cli/UtilCmds.cc
index ef2077f..eac420a 100644
--- a/mgmt/cli/UtilCmds.cc
+++ b/mgmt/cli/UtilCmds.cc
@@ -32,7 +32,7 @@
 #include "createArgument.h"
 #include "CliMgmtUtils.h"
 #include "CliDisplay.h"
-#include "ink_defs.h"
+#include "ink_error.h"
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/mgmt/cli/cliMain.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/cliMain.cc b/mgmt/cli/cliMain.cc
index cee0aaf..11d242f 100644
--- a/mgmt/cli/cliMain.cc
+++ b/mgmt/cli/cliMain.cc
@@ -27,6 +27,7 @@
 #include <string.h>
 #include "ink_args.h"
 #include "ink_file.h"
+#include "ink_error.h"
 #include "I_Layout.h"
 #include "I_Version.h"
 #include "CliMgmtUtils.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/mgmt/cli/processArgument.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/processArgument.cc b/mgmt/cli/processArgument.cc
index d55672e..71bf6e6 100644
--- a/mgmt/cli/processArgument.cc
+++ b/mgmt/cli/processArgument.cc
@@ -24,7 +24,7 @@
 #include <tcl.h>
 #include "hashtable.h"
 #include "definitions.h"
-#include "ink_defs.h"
+#include "ink_error.h"
 #include <string.h>
 
 // processArgForCommand

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97fd7b57/mgmt/utils/XmlUtils.cc
----------------------------------------------------------------------
diff --git a/mgmt/utils/XmlUtils.cc b/mgmt/utils/XmlUtils.cc
index c80453d..1cae340 100644
--- a/mgmt/utils/XmlUtils.cc
+++ b/mgmt/utils/XmlUtils.cc
@@ -29,7 +29,7 @@
 #include <sys/stat.h>
 
 #include "XmlUtils.h"
-#include "ink_defs.h"
+#include "ink_error.h"
 
 /****************************************************************************
  *


Mime
View raw message