diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-02-08 00:44:47 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2016-02-08 00:44:47 +0300 |
| commit | 548b9150e663e66725227b60bf042e843e3bdacd (patch) | |
| tree | 2901bb11dc6ac44c93d408532bea7fb018faa9d0 /libguile-ssh | |
| parent | key-func.h (public_key_to_ssh_string): Remove (diff) | |
| download | guile-ssh-548b9150e663e66725227b60bf042e843e3bdacd.tar.gz | |
Bugfix: Use regular procedures instead of non-static inlines
There are ill-defined non-static inlines that lead to linkage errors; it
appears that these inlines are the root cause for errors that can be seen on
Arch GNU/Linux. Replace them with regular procedures.
Reported by: SaffronSnail in <https://github.com/artyom-poptsov/guile-ssh/issues/1>
* libguile-ssh/common.c, libguile-ssh/common.h, libguile-ssh/error.c,
libguile-ssh/error.h, libguile-ssh/key-func.h, libguile-ssh/key-type.c,
libguile-ssh/key-type.h: Bugfix: Remove all non-static inlines; use regular
procedures instead.
Diffstat (limited to 'libguile-ssh')
| -rw-r--r-- | libguile-ssh/common.c | 2 | ||||
| -rw-r--r-- | libguile-ssh/common.h | 2 | ||||
| -rw-r--r-- | libguile-ssh/error.c | 6 | ||||
| -rw-r--r-- | libguile-ssh/error.h | 6 | ||||
| -rw-r--r-- | libguile-ssh/key-type.c | 4 | ||||
| -rw-r--r-- | libguile-ssh/key-type.h | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/libguile-ssh/common.c b/libguile-ssh/common.c index bfa259e..e0b2e27 100644 --- a/libguile-ssh/common.c +++ b/libguile-ssh/common.c @@ -55,7 +55,7 @@ _scm_to_ssh_const (struct symbol_mapping *types, SCM value) /* Return an address of the object OBJ as an hexadecimal number represented as a string. */ -inline SCM +SCM _scm_object_hex_address (SCM obj) { return scm_number_to_string (scm_object_address (obj), scm_from_uint (16U)); diff --git a/libguile-ssh/common.h b/libguile-ssh/common.h index 2d7b794..cc848dd 100644 --- a/libguile-ssh/common.h +++ b/libguile-ssh/common.h @@ -39,7 +39,7 @@ _ssh_const_to_scm (struct symbol_mapping *types, int value); extern struct symbol_mapping * _scm_to_ssh_const (struct symbol_mapping *types, SCM value); -inline SCM +extern SCM _scm_object_hex_address (SCM obj); #endif /* ifndef __COMMON_H__ */ diff --git a/libguile-ssh/error.c b/libguile-ssh/error.c index 7da751a..c0e8936 100644 --- a/libguile-ssh/error.c +++ b/libguile-ssh/error.c @@ -24,14 +24,14 @@ #include "error.h" /* Report an error */ -inline void +void guile_ssh_error (const char *proc, const char *msg, SCM args, SCM rest) { scm_error (scm_from_locale_symbol (GUILE_SSH_ERROR), proc, msg, args, rest); } /* Report an error (shorter version). */ -inline void +void guile_ssh_error1 (const char *proc, const char *msg, SCM args) { scm_error (scm_from_locale_symbol (GUILE_SSH_ERROR), proc, msg, args, @@ -39,7 +39,7 @@ guile_ssh_error1 (const char *proc, const char *msg, SCM args) } /* Report a session error. */ -inline void +void guile_ssh_session_error1 (const char *proc, ssh_session session, SCM args) { guile_ssh_error1 (proc, ssh_get_error (session), args); diff --git a/libguile-ssh/error.h b/libguile-ssh/error.h index f4c28a6..f511b1e 100644 --- a/libguile-ssh/error.h +++ b/libguile-ssh/error.h @@ -21,11 +21,11 @@ #define GUILE_SSH_ERROR "guile-ssh-error" -extern inline void guile_ssh_error (const char *proc, const char *msg, +extern void guile_ssh_error (const char *proc, const char *msg, SCM args, SCM rest); -extern inline void guile_ssh_error1 (const char *proc, const char *msg, +extern void guile_ssh_error1 (const char *proc, const char *msg, SCM args); -inline void +extern void guile_ssh_session_error1 (const char *proc, ssh_session session, SCM args); #endif /* ifndef __GUILE_SSH_ERROR_H__ */ diff --git a/libguile-ssh/key-type.c b/libguile-ssh/key-type.c index 2b95912..6a6ad75 100644 --- a/libguile-ssh/key-type.c +++ b/libguile-ssh/key-type.c @@ -219,14 +219,14 @@ _scm_to_key_data (SCM x) } /* Check that KEY is a SSH private key. */ -inline int +int _private_key_p (struct key_data *key) { return ssh_key_is_private (key->ssh_key); } /* Check that KEY is a SSH public key */ -inline int +int _public_key_p (struct key_data *key) { return ssh_key_is_public (key->ssh_key); diff --git a/libguile-ssh/key-type.h b/libguile-ssh/key-type.h index d9d8a42..bd12cc7 100644 --- a/libguile-ssh/key-type.h +++ b/libguile-ssh/key-type.h @@ -51,8 +51,8 @@ extern void init_key_type (void); /* Helper procedures */ extern SCM _scm_from_ssh_key (ssh_key key, SCM x); extern struct key_data *_scm_to_key_data (SCM x); -extern inline int _private_key_p (struct key_data *key); -extern inline int _public_key_p (struct key_data *key); +extern int _private_key_p (struct key_data *key); +extern int _public_key_p (struct key_data *key); extern SCM _ssh_key_type_to_scm (int arg1); extern struct symbol_mapping *_scm_to_ssh_key_type (SCM arg1); |
