-

- Lauri
>From 961f9f36fa38fdac235247489c46da976c7e46c2 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Mon, 21 May 2012 20:08:04 +0300
Subject: [PATCH 11/13] palm: Fix symbol visibility, -5kb


Signed-off-by: Lauri Kasanen <[email protected]>
---
 plugins/palm/cgi.h      |    4 ++++
 plugins/palm/palm.c     |   12 ++++++------
 plugins/palm/palm.h     |    4 ++++
 plugins/palm/protocol.c |    2 +-
 plugins/palm/protocol.h |    4 ++++
 plugins/palm/request.h  |    4 ++++
 6 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/plugins/palm/cgi.h b/plugins/palm/cgi.h
index 64f82e5..b504fd7 100644
--- a/plugins/palm/cgi.h
+++ b/plugins/palm/cgi.h
@@ -53,6 +53,8 @@
 #define MK_CGI_QUERY_STRING "QUERY_STRING"
 #define MK_CGI_POST_VARS "POST_VARS"
 
+#pragma GCC visibility push(hidden)
+
 mk_pointer mk_cgi_document_root;
 
 /* CONTENT_ */
@@ -98,3 +100,5 @@ struct mk_cgi_environment
 };
 
 void mk_cgi_env();
+
+#pragma GCC visibility pop
diff --git a/plugins/palm/palm.c b/plugins/palm/palm.c
index 582c1b6..f42776e 100644
--- a/plugins/palm/palm.c
+++ b/plugins/palm/palm.c
@@ -40,7 +40,7 @@ MONKEY_PLUGIN("palm",              /* shortname */
               MK_PLUGIN_CORE_THCTX | MK_PLUGIN_STAGE_30); /* hooks */
 
 /* Read database configuration parameters */
-int mk_palm_conf(char *confdir)
+static int mk_palm_conf(char *confdir)
 {
     int ret = 0;
     unsigned long len;
@@ -98,7 +98,7 @@ int mk_palm_conf(char *confdir)
     return ret;
 }
 
-struct mk_palm *mk_palm_get_handler(mk_pointer * file)
+static struct mk_palm *mk_palm_get_handler(mk_pointer * file)
 {
     struct mk_palm *p;
     int j, len, extlen;
@@ -126,7 +126,7 @@ struct mk_palm *mk_palm_get_handler(mk_pointer * file)
     return NULL;
 }
 
-int mk_palm_send_headers(struct mk_palm_request *pr)
+static int mk_palm_send_headers(struct mk_palm_request *pr)
 {
     int n;
     struct client_session *cs = pr->cs;
@@ -355,7 +355,7 @@ int mk_palm_send_request(struct client_session *cs, struct 
session_request *sr)
     return pr->bytes_sent;
 }
 
-int mk_palm_write(int socket, char *buffer, int len, int is_chunked)
+static int mk_palm_write(int socket, char *buffer, int len, int is_chunked)
 {
     int n;
     int chunk_len;
@@ -385,7 +385,7 @@ int mk_palm_write(int socket, char *buffer, int len, int 
is_chunked)
     return n;
 }
 
-int mk_palm_send_end_chunk(int socket, struct mk_palm_request *pr)
+static int mk_palm_send_end_chunk(int socket, struct mk_palm_request *pr)
 {
     int n=0;
 
@@ -399,7 +399,7 @@ int mk_palm_send_end_chunk(int socket, struct 
mk_palm_request *pr)
  * present, if so, it modifies the header struct response
  * and return the offset position
  */
-int mk_palm_cgi_status(char *data, struct session_request *sr)
+static int mk_palm_cgi_status(char *data, struct session_request *sr)
 {
     int status;
     int status_len = 3;
diff --git a/plugins/palm/palm.h b/plugins/palm/palm.h
index 44ced44..1f5313d 100644
--- a/plugins/palm/palm.h
+++ b/plugins/palm/palm.h
@@ -29,6 +29,8 @@
 
 #define MK_PALM_ERROR_LINE "\nPalm Error: invalid configuration on palm.conf\n 
%s\n\n"
 
+#pragma GCC visibility push(hidden)
+
 struct mk_palm
 {
     char *extension;
@@ -63,4 +65,6 @@ struct mk_palm_request *mk_palm_connect(struct mk_palm *palm,
 int mk_palm_send_request(struct client_session *cs, struct session_request 
*sr);
 int hangup(int sockfd);
 
+#pragma GCC visibility pop
+
 #endif
diff --git a/plugins/palm/protocol.c b/plugins/palm/protocol.c
index 358e82b..a690245 100644
--- a/plugins/palm/protocol.c
+++ b/plugins/palm/protocol.c
@@ -37,7 +37,7 @@ static void prot_add_header(struct mk_iov *iov, mk_pointer 
header, mk_pointer va
                           mk_iov_crlf, MK_IOV_NOT_FREE_BUF);
 }
 
-struct mk_iov *prot_template()
+static struct mk_iov *prot_template()
 {
     struct mk_iov *iov;
 
diff --git a/plugins/palm/protocol.h b/plugins/palm/protocol.h
index f8df1be..dd36ad1 100644
--- a/plugins/palm/protocol.h
+++ b/plugins/palm/protocol.h
@@ -1,3 +1,5 @@
+#pragma GCC visibility push(hidden)
+
 pthread_key_t iov_protocol_request;
 pthread_key_t iov_protocol_request_idx;
 
@@ -10,3 +12,5 @@ void mk_palm_protocol_thread_init();
 void mk_palm_protocol_request_reset();
 struct mk_iov *mk_palm_protocol_request_new(struct client_session *cs,
                                             struct session_request *sr);
+
+#pragma GCC visibility pop
diff --git a/plugins/palm/request.h b/plugins/palm/request.h
index 604bb91..370e0c4 100644
--- a/plugins/palm/request.h
+++ b/plugins/palm/request.h
@@ -25,6 +25,8 @@
 #include "palm.h"
 #include "mk_list.h"
 
+#pragma GCC visibility push(hidden)
+
 struct mk_palm_request
 {
     int client_fd;
@@ -82,4 +84,6 @@ void mk_palm_request_update(int socket, struct 
mk_palm_request  *pr);
 int mk_palm_request_delete(int socket);
 void mk_palm_free_request(int sockfd);
 
+#pragma GCC visibility pop
+
 #endif
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to