summaryrefslogtreecommitdiff
path: root/libftpconn
diff options
context:
space:
mode:
Diffstat (limited to 'libftpconn')
-rw-r--r--libftpconn/fname.c2
-rw-r--r--libftpconn/ftpconn.h15
-rw-r--r--libftpconn/priv.h12
-rw-r--r--libftpconn/reply.c2
-rw-r--r--libftpconn/unix.c2
-rw-r--r--libftpconn/xinl.c2
6 files changed, 25 insertions, 10 deletions
diff --git a/libftpconn/fname.c b/libftpconn/fname.c
index afa0852b..3be6eeec 100644
--- a/libftpconn/fname.c
+++ b/libftpconn/fname.c
@@ -23,7 +23,7 @@
#include "ftpconn.h"
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t
ftp_conn_append_name (struct ftp_conn *conn,
diff --git a/libftpconn/ftpconn.h b/libftpconn/ftpconn.h
index e445130e..6bff5918 100644
--- a/libftpconn/ftpconn.h
+++ b/libftpconn/ftpconn.h
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <features.h>
#define __need_error_t
#include <errno.h>
@@ -35,8 +36,10 @@ typedef int error_t;
#define __error_t_defined
#endif
-#ifndef FTP_CONN_EI
-# define FTP_CONN_EI extern inline
+#ifdef FTP_CONN_DEFINE_EI
+#define FTP_CONN_EI
+#else
+#define FTP_CONN_EI __extern_inline
#endif
struct ftp_conn;
@@ -91,7 +94,7 @@ struct ftp_conn_syshooks
ftp_conn_add_stat_fun_t add_stat, void *hook);
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering
+ directory, this should return in COMPOSITE the composite name referring
to that name in that directory, in malloced storage. */
error_t (*append_name) (struct ftp_conn *conn,
const char *dir, const char *name,
@@ -242,6 +245,9 @@ error_t ftp_conn_open (struct ftp_conn *conn);
void ftp_conn_close (struct ftp_conn *conn);
+extern error_t ftp_conn_validate_syshooks (struct ftp_conn *conn);
+
+#if defined(__USE_EXTERN_INLINES) || defined(FTP_CONN_DEFINE_EI)
/* Makes sure that CONN's syshooks are set according to the remote system
type. */
FTP_CONN_EI error_t
@@ -253,6 +259,7 @@ ftp_conn_validate_syshooks (struct ftp_conn *conn)
/* Opening the connection should set the syshooks. */
return ftp_conn_open (conn);
}
+#endif /* Use extern inlines. */
/* Create a new ftp connection as specified by PARAMS, and return it in CONN;
HOOKS contains customization hooks used by the connection. Neither PARAMS
@@ -371,7 +378,7 @@ error_t ftp_conn_get_names (struct ftp_conn *conn, const char *name,
ftp_conn_add_name_fun_t add_name, void *hook);
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t ftp_conn_append_name (struct ftp_conn *conn,
const char *dir, const char *name,
diff --git a/libftpconn/priv.h b/libftpconn/priv.h
index fb4dae50..570ea290 100644
--- a/libftpconn/priv.h
+++ b/libftpconn/priv.h
@@ -21,8 +21,12 @@
#ifndef __FTPCONN_PRIV_H__
#define __FTPCONN_PRIV_H__
-#ifndef FTP_CONN_EI
-# define FTP_CONN_EI extern inline
+#include <features.h>
+
+#ifdef FTP_CONN_DEFINE_EI
+#define FTP_CONN_EI
+#else
+#define FTP_CONN_EI __extern_inline
#endif
/* Ftp reply codes. */
@@ -61,6 +65,9 @@
#define REPLY_IS_TRANSIENT(rep) ((rep) >= 400 && (rep) < 500)
#define REPLY_IS_FAILURE(rep) ((rep) >= 500 && (rep) < 600)
+extern error_t unexpected_reply (struct ftp_conn *conn, int reply, const char *reply_txt,
+ const error_t *poss_errs);
+#if defined(__USE_EXTERN_INLINES) || defined(FTP_CONN_DEFINE_EI)
FTP_CONN_EI error_t
unexpected_reply (struct ftp_conn *conn, int reply, const char *reply_txt,
const error_t *poss_errs)
@@ -79,6 +86,7 @@ unexpected_reply (struct ftp_conn *conn, int reply, const char *reply_txt,
else
return EGRATUITOUS;
}
+#endif /* Use extern inlines. */
/* Error codes we think may result from file operations we do. */
extern const error_t ftp_conn_poss_file_errs[];
diff --git a/libftpconn/reply.c b/libftpconn/reply.c
index 4f30f751..d39cdb02 100644
--- a/libftpconn/reply.c
+++ b/libftpconn/reply.c
@@ -78,7 +78,7 @@ ftp_conn_getline (struct ftp_conn *conn, const char **line, size_t *line_len)
offs = nl + 1 - l; /* Consume the line */
/* Null terminate the result by overwriting the newline; if
- there's a CR preceeding it, get rid of that too. */
+ there's a CR preceding it, get rid of that too. */
if (nl > *line && nl[-1] == '\r')
nl--;
*nl = '\0';
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index d279a7a6..28efefdd 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -732,7 +732,7 @@ finished:
}
/* Give a name which refers to a directory file, and a name in that
- directory, this should return in COMPOSITE the composite name refering to
+ directory, this should return in COMPOSITE the composite name referring to
that name in that directory, in malloced storage. */
error_t
ftp_conn_unix_append_name (struct ftp_conn *conn,
diff --git a/libftpconn/xinl.c b/libftpconn/xinl.c
index a975b80d..72b7fdcf 100644
--- a/libftpconn/xinl.c
+++ b/libftpconn/xinl.c
@@ -19,6 +19,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define FTP_CONN_EI
+#define FTP_CONN_DEFINE_EI
#include <ftpconn.h>
#include "priv.h"