[Privoxy-commits] [privoxy] 02/04: Remove 'inline' from a bunch of functions and leave the optimization decision to the compiler
User Git
git at git.privoxy.org
Sun Dec 20 10:00:15 UTC 2020
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit c7c23a7446807a7529c81cc74ef9c8412bae929c
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Dec 19 17:05:59 2020 +0100
Remove 'inline' from a bunch of functions and leave the optimization decision to the compiler
Unbreaks the build with '-std=c89'. Previous failure:
cc -c -pipe -fstack-protector-all -ggdb -Wshadow -Wconversion -I/usr/local/include/ -pthread -Wall -std=c89 errlog.c -o errlog.o
errlog.c:95:8: error: unknown type name 'inline'
static inline void lock_logfile(void)
^
errlog.c:99:8: error: unknown type name 'inline'
static inline void unlock_logfile(void)
^
errlog.c:103:8: error: unknown type name 'inline'
static inline void lock_loginit(void)
^
errlog.c:107:8: error: unknown type name 'inline'
static inline void unlock_loginit(void)
^
errlog.c:447:8: error: unknown type name 'inline'
static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
^
errlog.c:447:21: error: expected ';' after top level declarator
static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
^
;
---
errlog.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/errlog.c b/errlog.c
index afeac437..969c0bd7 100644
--- a/errlog.c
+++ b/errlog.c
@@ -92,19 +92,19 @@ static char *w32_socket_strerr(int errcode, char *tmp_buf);
#endif
#ifdef MUTEX_LOCKS_AVAILABLE
-static inline void lock_logfile(void)
+static void lock_logfile(void)
{
privoxy_mutex_lock(&log_mutex);
}
-static inline void unlock_logfile(void)
+static void unlock_logfile(void)
{
privoxy_mutex_unlock(&log_mutex);
}
-static inline void lock_loginit(void)
+static void lock_loginit(void)
{
privoxy_mutex_lock(&log_init_mutex);
}
-static inline void unlock_loginit(void)
+static void unlock_loginit(void)
{
privoxy_mutex_unlock(&log_init_mutex);
}
@@ -114,10 +114,10 @@ static inline void unlock_loginit(void)
* The locking/unlocking functions below should be
* fleshed out for non-pthread implementations.
*/
-static inline void lock_logfile() {}
-static inline void unlock_logfile() {}
-static inline void lock_loginit() {}
-static inline void unlock_loginit() {}
+static void lock_logfile() {}
+static void unlock_logfile() {}
+static void lock_loginit() {}
+static void unlock_loginit() {}
#endif
/*********************************************************************
@@ -444,7 +444,7 @@ static long get_thread_id(void)
* Returns : Number of written characters or 0 for error.
*
*********************************************************************/
-static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
+static size_t get_log_timestamp(char *buffer, size_t buffer_size)
{
size_t length;
time_t now;
@@ -498,7 +498,7 @@ static inline size_t get_log_timestamp(char *buffer, size_t buffer_size)
* Returns : Number of written characters or 0 for error.
*
*********************************************************************/
-static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
+static size_t get_clf_timestamp(char *buffer, size_t buffer_size)
{
/*
* Complex because not all OSs have tm_gmtoff or
@@ -563,7 +563,7 @@ static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
* Returns : Log level string.
*
*********************************************************************/
-static inline const char *get_log_level_string(int loglevel)
+static const char *get_log_level_string(int loglevel)
{
char *log_level_string = NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list