summaryrefslogtreecommitdiffstats
path: root/contrib/lukemftpd/src/extern.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/lukemftpd/src/extern.h')
-rw-r--r--contrib/lukemftpd/src/extern.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/contrib/lukemftpd/src/extern.h b/contrib/lukemftpd/src/extern.h
index 3ddb6bf..25cdf11 100644
--- a/contrib/lukemftpd/src/extern.h
+++ b/contrib/lukemftpd/src/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.43 2001/12/04 13:54:12 lukem Exp $ */
+/* $NetBSD: extern.h,v 1.44 2002/05/30 00:24:47 enami Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -108,15 +108,8 @@
# define ULLFP(x) "%" x "lu"
# define ULLT unsigned long
# define STRTOLL(x,y,z) strtol(x,y,z)
-#else
-#if HAVE_PRINTF_QD
-# define LLF "%qd"
-# define LLFP(x) "%" x "qd"
-# define LLT long long
-# define ULLF "%qu"
-# define ULLFP(x) "%" x "qu"
-# define ULLT unsigned long long
-# define STRTOLL(x,y,z) strtoll(x,y,z)
+# define LLTMIN LONG_MIN
+# define LLTMAX LONG_MAX
#else
# define LLF "%lld"
# define LLFP(x) "%" x "lld"
@@ -125,7 +118,8 @@
# define ULLFP(x) "%" x "llu"
# define ULLT unsigned long long
# define STRTOLL(x,y,z) strtoll(x,y,z)
-#endif
+# define LLTMIN LLONG_MIN
+# define LLTMAX LLONG_MAX
#endif
#define FTP_BUFLEN 512
@@ -137,7 +131,7 @@ char *conffilename(const char *);
char **copyblk(char **);
void count_users(void);
void cprintf(FILE *, const char *, ...)
- ;
+ __attribute__((__format__(__printf__, 2, 3)));
void cwd(const char *);
FILE *dataconn(const char *, off_t, const char *);
void delete(const char *);
@@ -177,7 +171,7 @@ void removedir(const char *);
void renamecmd(const char *, const char *);
char *renamefrom(const char *);
void reply(int, const char *, ...)
- ;
+ __attribute__((__format__(__printf__, 2, 3)));
void retrieve(char *[], const char *);
void send_file_list(const char *);
void show_chdir_messages(int);
@@ -186,7 +180,6 @@ void statcmd(void);
void statfilecmd(const char *);
void statxfer(void);
void store(const char *, const char *, int);
-LLT strsuftoll(const char *);
void user(const char *);
char *xstrdup(const char *);
void yyerror(char *);
@@ -271,24 +264,29 @@ struct ftpclass {
char *display; /* File to display upon chdir */
char *homedir; /* Directory to chdir(2) to at login */
classflag_t flags; /* Flags; see classflag_t above */
- int limit; /* Max connections (-1 = unlimited) */
+ LLT limit; /* Max connections (-1 = unlimited) */
char *limitfile; /* File to display if limit reached */
LLT maxfilesize; /* Maximum file size of uploads */
LLT maxrateget; /* Maximum get transfer rate throttle */
LLT maxrateput; /* Maximum put transfer rate throttle */
- unsigned int maxtimeout; /* Maximum permitted timeout */
+ LLT maxtimeout; /* Maximum permitted timeout */
char *motd; /* MotD file to display after login */
char *notify; /* Files to notify about upon chdir */
- int portmin; /* Minumum port for passive mode */
- int portmax; /* Maximum port for passive mode */
+ LLT portmin; /* Minumum port for passive mode */
+ LLT portmax; /* Maximum port for passive mode */
LLT rateget; /* Get (RETR) transfer rate throttle */
LLT rateput; /* Put (STOR) transfer rate throttle */
- unsigned int timeout; /* Default timeout */
+ LLT timeout; /* Default timeout */
class_ft type; /* Class type */
mode_t umask; /* Umask to use */
+ LLT mmapsize; /* mmap window size */
+ LLT readsize; /* data read size */
+ LLT writesize; /* data write size */
+ LLT sendbufsize; /* SO_SNDBUF size */
+ LLT sendlowat; /* SO_SNDLOWAT size */
};
-extern void ftp_loop(void);
+extern void ftp_loop(void) __attribute__ ((noreturn));
extern void ftp_handle_line(char *);
#ifndef GLOBAL
@@ -355,8 +353,8 @@ extern struct tab cmdtab[];
} while (0);
#define CURCLASSTYPE curclass.type == CLASS_GUEST ? "GUEST" : \
- curclass.type == CLASS_CHROOT ? "CHROOT" : \
- curclass.type == CLASS_REAL ? "REAL" : \
+ curclass.type == CLASS_CHROOT ? "CHROOT" : \
+ curclass.type == CLASS_REAL ? "REAL" : \
"<unknown>"
#define ISDOTDIR(x) (x[0] == '.' && x[1] == '\0')
OpenPOWER on IntegriCloud