Include protection and extern "C" declarations in public headers, SB #69632.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 27 Jun 2011 15:27:00 +0000 (15:27 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 27 Jun 2011 15:27:00 +0000 (15:27 +0000)
org.gridsite.core/interface/gridsite-gacl.h
org.gridsite.core/interface/gridsite.h
org.gridsite.core/src/Makefile

index f739c00..c02d8bc 100644 (file)
@@ -35,6 +35,9 @@
 
 #ifndef HEADER_GACL_H
 #define HEADER_GACL_H
+
+#ifdef __cplusplus
+extern "C" {
 #endif
 
 #ifndef GACL_LIB_VERSION
@@ -186,3 +189,9 @@ extern GACLperm   gacl_perm_vals[];
 
 GACLentry *GRSTgaclEntryParse(xmlNodePtr cur);
 /*  special function for legacy EDG LB service */
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // HEADER_GACL_H
index a3f6cb9..ccdb943 100644 (file)
  * For more about GridSite: http://www.gridsite.org/             *
  *---------------------------------------------------------------*/
 
+#ifndef HEADER_GRIDSITE_H
+#define HEADER_GRIDSITE_H
+
 #ifndef GRST_VERSION
 #define GRST_VERSION 010500
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef GRST_NO_OPENSSL
 
 #ifndef HEADER_SSL_H
@@ -451,3 +458,8 @@ int    GRSThtcpMessageParse(GRSThtcpMessage *, char *, int);
 #define GRST_PASSCODE_JS "<script type=\"text/javascript\" language=\"Javascript\"><!--\nfunction changeValue(formName){        if( document.forms[formName].passcode.value==\"\" ) document.forms[formName].passcode.value=getCookie(\"GRIDHTTP_PASSCODE\");       return true;   } \nfunction getCookie(c_name){ if (document.cookie.length>0)  {  c_start=document.cookie.indexOf(c_name + \"=\");  if (c_start!=-1)    {    c_start=c_start + c_name.length+1;    c_end=document.cookie.indexOf(\";\",c_start);    if (c_end==-1) c_end=document.cookie.length;    return unescape(document.cookie.substring(c_start,c_end)); }} return \"\"; } \n -->\n</script>"
 #endif
 
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // HEADER_GRIDSITE_H
index 975d5d7..d12dcd4 100644 (file)
@@ -406,8 +406,8 @@ install: apidoc install-lib
                  $(prefix)/share/man/man8 \
                  $(prefix)/$(libdir)/httpd/modules \
                  $(prefix)/share/doc/gridsite-$(MINOR_VERSION)
-       echo '#define' GRST_VERSION $(DEFVERSION) > $(prefix)/include/gridsite.h
-       cat ../interface/gridsite.h >>$(prefix)/include/gridsite.h
+       sed 's/^\(#define GRST_VERSION\).*$$/\1 $(DEFVERSION)/' \
+             ../interface/gridsite.h > $(prefix)/include/gridsite.h
        cp -f ../interface/gridsite-gacl.h $(prefix)/include
        cp -f urlencode $(prefix)/bin
        cp -f findproxyfile $(prefix)/bin