ARCHFLAGS="" ;;
esac
-my_am_cflags="-Wall $ARCHFLAGS -pipe"
+my_am_cflags="-Wall -Wstrict-prototypes $ARCHFLAGS -pipe"
AC_SUBST([AM_CPPFLAGS], ["-I\${top_srcdir}/support/include"])
AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
/* grow_addrs - extend list of local interface addresses */
-static int grow_addrs()
+static int grow_addrs(void)
{
struct in_addr *new_addrs;
int new_num;
/* find_local - find all IP addresses for this host */
static int
-find_local()
+find_local(void)
{
struct ifconf ifc;
struct ifreq ifreq;
/* from_local - determine whether request comes from the local system */
int
-from_local(addr)
-struct sockaddr_in *addr;
+from_local(struct sockaddr_in *addr)
{
int i;
#include <rpc/rpcent.h>
#endif
-static void logit();
-static void toggle_verboselog();
+static void logit(int severity, struct sockaddr_in *addr,
+ u_long procnum, u_long prognum, char *text);
+static void toggle_verboselog(int sig);
int verboselog = 0;
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
/* check_startup - additional startup code */
-void check_startup()
+void check_startup(void)
{
/*
/* check_privileged_port - additional checks for privileged-port updates */
int
-check_privileged_port(addr, proc, prog, port)
-struct sockaddr_in *addr;
-u_long proc;
-u_long prog;
-u_long port;
+check_privileged_port(struct sockaddr_in *addr,
+ u_long proc, u_long prog, u_long port)
{
#ifdef CHECK_PORT
if (!legal_port(addr, port)) {
/* toggle_verboselog - toggle verbose logging flag */
-static void toggle_verboselog(sig)
-int sig;
+static void toggle_verboselog(int sig)
{
(void) signal(sig, toggle_verboselog);
verboselog = !verboselog;
/* logit - report events of interest via the syslog daemon */
-static void logit(severity, addr, procnum, prognum, text)
-int severity;
-struct sockaddr_in *addr;
-u_long procnum;
-u_long prognum;
-char *text;
+static void logit(int severity, struct sockaddr_in *addr,
+ u_long procnum, u_long prognum, char *text)
{
char *procname;
char procbuf[16 + 4 * sizeof(u_long)];
static void read_fstab(void);
static struct mntentchn *
-mtab_head() {
+mtab_head(void) {
if (!got_mtab)
read_mounttable();
return &mounttable;
}
static struct mntentchn *
-fstab_head()
+fstab_head(void)
{
if (!got_fstab)
read_fstab();
int _rpcsvcdirty = 0;
void
-rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport)
+rpc_init(char *name, int prog, int vers,
+ void (*dispatch)(struct svc_req *, register SVCXPRT *),
+ int defport)
{
struct sockaddr_in saddr;
SVCXPRT *transp;
** Match text and p, return TRUE, FALSE, or ABORT.
*/
static int
-DoMatch(text, p)
- register char *text;
- register char *p;
+DoMatch(char *text, char *p)
{
register int last;
register int matched;
** User-level routine. Returns TRUE or FALSE.
*/
int
-wildmat(text, p)
- char *text;
- char *p;
+wildmat(char *text, char *p)
{
#ifdef OPTIMIZE_JUST_STAR
if (p[0] == '*' && p[1] == '\0')
return result;
}
-void mount_usage()
+void mount_usage(void)
{
printf("usage: %s remotetarget dir [-rvVwfnh] [-o nfsoptions]\n",
progname);
extern int verbose;
extern int sloppy;
-extern int linux_version_code();
+extern int linux_version_code(void);
static inline enum clnt_stat
nfs3_mount(CLIENT *clnt, mnt3arg_t *mnt3arg, mnt3res_t *mnt3res)
{ NULL, 0, 0, 0 }
};
-void umount_usage()
+void umount_usage(void)
{
printf("usage: %s dir [-fvnrlh]\n", progname);
printf("options:\n\t-f\t\tforce unmount\n");
int nfsumount(int, char **);
int nfs_call_umount(clnt_addr_t *, dirpath *);
-void umount_usage();
+void umount_usage(void);
#endif
#define MAXHOSTLEN 256
-int dump_cmp(p, q)
-char **p;
-char **q;
+static int dump_cmp(const void *pv, const void *qv)
{
+ const char **p = (const char **)pv;
+ const char **q = (const char **)qv;
return strcmp(*p, *q);
}
-static void usage(fp, n)
-FILE *fp;
-int n;
+static void usage(FILE *fp, int n)
{
fprintf(fp, "Usage: %s [-adehv]\n", program_name);
fprintf(fp, " [--all] [--directories] [--exports]\n");
return htons(port);
}
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
{
char hostname_buf[MAXHOSTLEN];
char *hostname;
static int opt_debug = 0; /* Will be command-line option, eventually */
#endif
-void log_init()
+void log_init(void)
{
if (!(run_mode & MODE_LOG_STDERR))
openlog(name_p, LOG_PID | LOG_NDELAY, LOG_DAEMON);
#include <syslog.h>
-void log_init();
+void log_init(void);
void log_background(void);
void log_enable(int facility);
int log_enabled(int facility);
b = strchr(buf, '\n');
if (b) *b = 0;
sscanf(buf, "%x %x %x %x ",
- &addr, &prog, &vers, &proc, myname);
+ &addr, &prog, &vers, &proc);
b = buf+36;
for (i=0; i<SM_PRIV_SIZE; i++) {
sscanf(b, "%2x", &p);
static void addr_set_port(nsm_address *, int);
static struct addrinfo *host_lookup(int, const char *);
void nsm_log(int fac, const char *fmt, ...);
-static int record_pid();
+static int record_pid(void);
static void drop_privs(void);
static void set_kernel_nsm_state(int state);
* program exits.
* If file already exists, fail.
*/
-static int record_pid()
+static int record_pid(void)
{
char pid[20];
int fd;
* help the occasional admin.
*/
static void
-usage()
+usage(void)
{
fprintf(stderr,"usage: %s [options]\n", name_p);
fprintf(stderr," -h, -?, --help Print this help screen.\n");
/* Child. */
- log_init (name_p,version_p);
+ log_init (/*name_p,version_p*/);
log_modes();
* Function prototypes.
*/
extern void change_state(void);
-extern void do_regist(u_long, void (*)());
extern void my_svc_run(void);
extern void notify_hosts(void);
extern void shuffle_dirs(void);