diff --git a/mx_flock.c b/mx_flock.c index ef4d3ede..5f90999b 100644 --- a/mx_flock.c +++ b/mx_flock.c @@ -21,7 +21,7 @@ # define mx_free_null(a) do { free((a)); (a) = NULL; } while(0) #endif -static inline int _flock_open(struct mx_flock *lock, mode_t mode) +static int _flock_open(struct mx_flock *lock, mode_t mode) { int fd; @@ -39,7 +39,7 @@ static inline int _flock_open(struct mx_flock *lock, mode_t mode) return fd; } -static inline int _flock_close(struct mx_flock *lock) +static int _flock_close(struct mx_flock *lock) { int res; @@ -53,7 +53,7 @@ static inline int _flock_close(struct mx_flock *lock) return res; } -static inline void _flock_free(struct mx_flock *lock) +static void _flock_free(struct mx_flock *lock) { if (!lock) return; diff --git a/mx_mysql.c b/mx_mysql.c index b54fe111..e4647b40 100644 --- a/mx_mysql.c +++ b/mx_mysql.c @@ -48,7 +48,7 @@ /**********************************************************************/ -static inline int mx__mysql_errno(struct mx_mysql *mysql) +static int mx__mysql_errno(struct mx_mysql *mysql) { unsigned int error; @@ -62,7 +62,7 @@ static inline int mx__mysql_errno(struct mx_mysql *mysql) return (int)error; } -extern inline const char *mx__mysql_error(struct mx_mysql *mysql) +extern const char *mx__mysql_error(struct mx_mysql *mysql) { mx_assert_return_NULL(mysql, EINVAL); mx_assert_return_NULL(mysql->mysql, EBADF); @@ -71,7 +71,7 @@ extern inline const char *mx__mysql_error(struct mx_mysql *mysql) return mysql_error(mysql->mysql); } -extern inline const char *mx__mysql_sqlstate(struct mx_mysql *mysql) +extern const char *mx__mysql_sqlstate(struct mx_mysql *mysql) { mx_assert_return_NULL(mysql, EINVAL); mx_assert_return_NULL(mysql->mysql, EBADF); @@ -80,7 +80,7 @@ extern inline const char *mx__mysql_sqlstate(struct mx_mysql *mysql) return mysql_sqlstate(mysql->mysql); } -static inline int mx__mysql_stmt_errno(struct mx_mysql_stmt *stmt) +static int mx__mysql_stmt_errno(struct mx_mysql_stmt *stmt) { unsigned int error; @@ -94,7 +94,7 @@ static inline int mx__mysql_stmt_errno(struct mx_mysql_stmt *stmt) return (int)error; } -static inline const char *mx__mysql_stmt_error(struct mx_mysql_stmt *stmt) +static const char *mx__mysql_stmt_error(struct mx_mysql_stmt *stmt) { mx_assert_return_NULL(stmt, EINVAL); mx_assert_return_NULL(stmt->stmt, EBADF); @@ -103,7 +103,7 @@ static inline const char *mx__mysql_stmt_error(struct mx_mysql_stmt *stmt) return mysql_stmt_error(stmt->stmt); } -static inline const char *mx__mysql_stmt_sqlstate(struct mx_mysql_stmt *stmt) +static const char *mx__mysql_stmt_sqlstate(struct mx_mysql_stmt *stmt) { mx_assert_return_NULL(stmt, EINVAL); mx_assert_return_NULL(stmt->stmt, EBADF); @@ -112,7 +112,7 @@ static inline const char *mx__mysql_stmt_sqlstate(struct mx_mysql_stmt *stmt) return mysql_stmt_sqlstate(stmt->stmt); } -static inline int mx__mysql_init(struct mx_mysql *mysql) +static int mx__mysql_init(struct mx_mysql *mysql) { mx_assert_return_minus_errno(mysql, EINVAL); mx_assert_return_minus_errno(!mysql->mysql, EUCLEAN); @@ -129,7 +129,7 @@ static inline int mx__mysql_init(struct mx_mysql *mysql) return -errno; } -static inline int mx__mysql_options(struct mx_mysql *mysql, enum mysql_option option, const void *arg) +static int mx__mysql_options(struct mx_mysql *mysql, enum mysql_option option, const void *arg) { int res; @@ -189,7 +189,7 @@ static int mx__mysql_real_connect(struct mx_mysql *mysql, const char *host, cons return -(errno=EBADE); } -static inline int mx__mysql_ping(struct mx_mysql *mysql) +static int mx__mysql_ping(struct mx_mysql *mysql) { mx_assert_return_minus_errno(mysql, EINVAL); mx_assert_return_minus_errno(mysql->mysql, EBADF); @@ -688,7 +688,7 @@ static int mx__mysql_library_end(void) { /**********************************************************************/ -extern inline int _mx_mysql_bind_integer(struct mx_mysql_bind *b, unsigned int index, void *value, int type, int is_unsigned) +extern int _mx_mysql_bind_integer(struct mx_mysql_bind *b, unsigned int index, void *value, int type, int is_unsigned) { mx_assert_return_minus_errno(b, EINVAL); mx_assert_return_minus_errno(value, EINVAL); @@ -747,7 +747,7 @@ void _mx_mysql_bind_dump(struct mx_mysql_bind *b) } -static inline int _mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int index, char **value) +static int _mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int index, char **value) { mx_assert_return_minus_errno(b, EINVAL); mx_assert_return_minus_errno(value, EINVAL); @@ -786,7 +786,7 @@ static inline int _mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int in return 0; } -static inline int _mx_mysql_bind_validate(struct mx_mysql_bind *b) +static int _mx_mysql_bind_validate(struct mx_mysql_bind *b) { int i; @@ -1230,7 +1230,7 @@ int mx_mysql_statement_field_count(struct mx_mysql_stmt *stmt) return mx__mysql_stmt_field_count(stmt); } -extern inline int mx_mysql_stmt_field_count_set(struct mx_mysql_stmt *stmt) +extern int mx_mysql_stmt_field_count_set(struct mx_mysql_stmt *stmt) { mx_assert_return_minus_errno(stmt, EINVAL); mx_assert_return_minus_errno(stmt->stmt, EBADF); @@ -1240,7 +1240,7 @@ extern inline int mx_mysql_stmt_field_count_set(struct mx_mysql_stmt *stmt) return 0; } -inline int mx_mysql_stmt_field_count_get(struct mx_mysql_stmt *stmt, unsigned long *count) +int mx_mysql_stmt_field_count_get(struct mx_mysql_stmt *stmt, unsigned long *count) { mx_assert_return_minus_errno(stmt, EINVAL); mx_assert_return_minus_errno(count, EINVAL); @@ -1251,7 +1251,7 @@ inline int mx_mysql_stmt_field_count_get(struct mx_mysql_stmt *stmt, unsigned lo return 0; } -extern inline int mx_mysql_stmt_param_count_set(struct mx_mysql_stmt *stmt) +extern int mx_mysql_stmt_param_count_set(struct mx_mysql_stmt *stmt) { mx_assert_return_minus_errno(stmt, EINVAL); mx_assert_return_minus_errno(stmt->stmt, EBADF); @@ -1261,7 +1261,7 @@ extern inline int mx_mysql_stmt_param_count_set(struct mx_mysql_stmt *stmt) return 0; } -inline int mx_mysql_stmt_param_count_get(struct mx_mysql_stmt *stmt, unsigned long *count) +int mx_mysql_stmt_param_count_get(struct mx_mysql_stmt *stmt, unsigned long *count) { mx_assert_return_minus_errno(stmt, EINVAL); mx_assert_return_minus_errno(count, EINVAL); @@ -1502,7 +1502,7 @@ int mx_mysql_statement_close_no_bind_cleanup(struct mx_mysql_stmt **stmt) return 0; } -extern inline int mx_mysql_bind_integer(struct mx_mysql_bind *b, unsigned int index, void *value, int type, int is_unsigned) +extern int mx_mysql_bind_integer(struct mx_mysql_bind *b, unsigned int index, void *value, int type, int is_unsigned) { int res; @@ -1514,7 +1514,7 @@ extern inline int mx_mysql_bind_integer(struct mx_mysql_bind *b, unsigned int in return res; } -inline int mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int index, char **value) +int mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int index, char **value) { int res; @@ -1527,42 +1527,42 @@ inline int mx_mysql_bind_string(struct mx_mysql_bind *b, unsigned int index, cha } -inline int mx_mysql_bind_int8(struct mx_mysql_bind *b, unsigned int index, int8_t *value) +int mx_mysql_bind_int8(struct mx_mysql_bind *b, unsigned int index, int8_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_TINY, 0); } -inline int mx_mysql_bind_uint8(struct mx_mysql_bind *b, unsigned int index, uint8_t *value) +int mx_mysql_bind_uint8(struct mx_mysql_bind *b, unsigned int index, uint8_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_TINY, 1); } -inline int mx_mysql_bind_int16(struct mx_mysql_bind *b, unsigned int index, int16_t *value) +int mx_mysql_bind_int16(struct mx_mysql_bind *b, unsigned int index, int16_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_SHORT, 0); } -inline int mx_mysql_bind_uint16(struct mx_mysql_bind *b, unsigned int index, uint16_t *value) +int mx_mysql_bind_uint16(struct mx_mysql_bind *b, unsigned int index, uint16_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_SHORT, 1); } -inline int mx_mysql_bind_int32(struct mx_mysql_bind *b, unsigned int index, int32_t *value) +int mx_mysql_bind_int32(struct mx_mysql_bind *b, unsigned int index, int32_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_LONG, 0); } -inline int mx_mysql_bind_uint32(struct mx_mysql_bind *b, unsigned int index, uint32_t *value) +int mx_mysql_bind_uint32(struct mx_mysql_bind *b, unsigned int index, uint32_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_LONG, 1); } -inline int mx_mysql_bind_int64(struct mx_mysql_bind *b, unsigned int index, int64_t *value) +int mx_mysql_bind_int64(struct mx_mysql_bind *b, unsigned int index, int64_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_LONGLONG, 0); } -inline int mx_mysql_bind_uint64(struct mx_mysql_bind *b, unsigned int index, uint64_t *value) +int mx_mysql_bind_uint64(struct mx_mysql_bind *b, unsigned int index, uint64_t *value) { return mx_mysql_bind_integer(b, index, (void *)value, MYSQL_TYPE_LONGLONG, 1); } diff --git a/mx_util.c b/mx_util.c index b693ab6d..c1d5f314 100644 --- a/mx_util.c +++ b/mx_util.c @@ -20,7 +20,7 @@ #include "mx_log.h" #include "mx_util.h" -static inline int _mx_strbeginswith(char *str, const char *start, char **endptr, short ignore_case) +static int _mx_strbeginswith(char *str, const char *start, char **endptr, short ignore_case) { size_t len; int res; @@ -42,17 +42,17 @@ static inline int _mx_strbeginswith(char *str, const char *start, char **endptr, return 1; } -inline int mx_strbeginswith(char *str, const char *start, char **endptr) +int mx_strbeginswith(char *str, const char *start, char **endptr) { return _mx_strbeginswith(str, start, endptr, 0); } -inline int mx_stribeginswith(char *str, const char *start, char **endptr) +int mx_stribeginswith(char *str, const char *start, char **endptr) { return _mx_strbeginswith(str, start, endptr, 1); } -static inline int _mx_strbeginswithany(char *str, char **starts, char **endptr, short ignore_case) +static int _mx_strbeginswithany(char *str, char **starts, char **endptr, short ignore_case) { char **s; char *end; @@ -73,7 +73,7 @@ static inline int _mx_strbeginswithany(char *str, char **starts, char **endptr, return 0; } -inline int mx_strbeginswithany(char *str, char **starts, char **endptr) +int mx_strbeginswithany(char *str, char **starts, char **endptr) { return _mx_strbeginswithany(str, starts, endptr, 0); } @@ -83,7 +83,7 @@ int mx_stribeginswithany(char *str, char **starts, char **endptr) return _mx_strbeginswithany(str, starts, endptr, 1); } -inline int mx_strtobytes(char *str, unsigned long long int *bytes) +int mx_strtobytes(char *str, unsigned long long int *bytes) { unsigned long long int s = 0; unsigned long long int t; @@ -149,7 +149,7 @@ inline int mx_strtobytes(char *str, unsigned long long int *bytes) return 0; } -inline int mx_strtoseconds(char *str, unsigned long long int *seconds) +int mx_strtoseconds(char *str, unsigned long long int *seconds) { unsigned long long int s = 0; unsigned long long int t; @@ -219,7 +219,7 @@ inline int mx_strtoseconds(char *str, unsigned long long int *seconds) return 0; } -inline int mx_strtominutes(char *str, unsigned long long int *minutes) +int mx_strtominutes(char *str, unsigned long long int *minutes) { int res; @@ -231,7 +231,7 @@ inline int mx_strtominutes(char *str, unsigned long long int *minutes) return res; } -inline char *mx_strskipwhitespaces(char *str) +char *mx_strskipwhitespaces(char *str) { char *s; @@ -245,7 +245,7 @@ inline char *mx_strskipwhitespaces(char *str) /* wrapper unsigned */ -inline int mx_strtoul(char *str, unsigned long int *to) +int mx_strtoul(char *str, unsigned long int *to) { unsigned long int ul; char *end; @@ -273,7 +273,7 @@ inline int mx_strtoul(char *str, unsigned long int *to) return 0; } -inline int mx_strtoull(char *str, unsigned long long int *to) +int mx_strtoull(char *str, unsigned long long int *to) { unsigned long long int ull; char *end; @@ -303,7 +303,7 @@ inline int mx_strtoull(char *str, unsigned long long int *to) /* wrapper signed */ -inline int mx_strtol(char *str, signed long int *to) +int mx_strtol(char *str, signed long int *to) { long int l; char *end; @@ -328,7 +328,7 @@ inline int mx_strtol(char *str, signed long int *to) return 0; } -inline int mx_strtoll(char *str, signed long long int *to) +int mx_strtoll(char *str, signed long long int *to) { long long int ll; char *end; diff --git a/mxq_group.c b/mxq_group.c index 92cd4084..bb82712e 100644 --- a/mxq_group.c +++ b/mxq_group.c @@ -126,7 +126,7 @@ void mxq_group_free_content(struct mxq_group *g) } -extern inline uint64_t mxq_group_jobs_done(struct mxq_group *g) +extern uint64_t mxq_group_jobs_done(struct mxq_group *g) { uint64_t done = 0; @@ -138,7 +138,7 @@ extern inline uint64_t mxq_group_jobs_done(struct mxq_group *g) return done; } -extern inline uint64_t mxq_group_jobs_active(struct mxq_group *g) +extern uint64_t mxq_group_jobs_active(struct mxq_group *g) { uint64_t active; @@ -152,7 +152,7 @@ extern inline uint64_t mxq_group_jobs_active(struct mxq_group *g) return active; } -extern inline uint64_t mxq_group_jobs_inq(struct mxq_group *g) +extern uint64_t mxq_group_jobs_inq(struct mxq_group *g) { uint64_t inq;