/** \file afs_common.c Functions common to all audio file selectors. */
+#include <sys/types.h>
+#include <dirent.h>
+
+
#include "para.h"
+#include "fd.h"
#include "server.cmdline.h"
#include "afh.h"
#include "server.h"
int find_audio_files(const char *dirname, int (*f)(const char *, const char *))
{
DIR *dir = NULL;
+ int ret, ret2, cwd_fd;
struct dirent *entry;
- /*
- * Opening the current directory (".") and calling fchdir() to return
- * is usually faster and more reliable than saving cwd in some buffer
- * and calling chdir() afterwards (see man 3 getcwd).
- */
- int cwd_fd = open(".", O_RDONLY);
- struct stat s;
- int ret;
- if (cwd_fd < 0)
- return -E_GETCWD;
- ret = -E_CHDIR;
- if (chdir(dirname) < 0)
- goto out;
- ret = -E_OPENDIR;
- dir = opendir(".");
- if (!dir)
- goto out;
+ ret = para_opendir(dirname, &dir, &cwd_fd);
+ if (ret < 0)
+ return ret;
/* scan cwd recursively */
while ((entry = readdir(dir))) {
mode_t m;
char *tmp;
+ struct stat s;
if (!strcmp(entry->d_name, "."))
continue;
out:
if (dir)
closedir(dir);
- if (fchdir(cwd_fd) < 0)
- ret = -E_CHDIR;
+ ret2 = fchdir(cwd_fd);
+ if (ret2 < 0 && ret >= 0)
+ ret = ret2;
close(cwd_fd);
if (ret < 0)
PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
* based on the vplay program by Michael Beck.
*/
+#include <sys/types.h>
+#include <dirent.h>
+#include <alsa/asoundlib.h>
+
#include "para.h"
#include "fd.h"
#include "string.h"
#include "list.h"
#include "sched.h"
#include "write.h"
-
-#include <alsa/asoundlib.h>
-
#include "alsa_write.cmdline.h"
#include "error.h"
/** \file audioc.c the client program used to connect to para_audiod */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "audioc.cmdline.h"
#include "para.h"
#include "error.h"
*/
/** \file audiod.c the paraslash's audio daemon */
+#include <sys/types.h>
+#include <dirent.h>
#include "para.h"
#include "error.h"
/** \file audiod_command.c commands for para_audiod */
-#include "para.h"
+#include <sys/types.h>
+#include <dirent.h>
+#include "para.h"
#include "audiod.cmdline.h"
#include "list.h"
#include "close_on_fork.h"
/** \file client_common.c common functions of para_client and para_audiod */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "list.h"
/** \file command.c does client authentication and executes server commands */
-#include <sys/time.h> /* gettimeofday */
-#include "para.h" /* gettimeofday */
+#include <sys/time.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <openssl/rc4.h>
+#include "para.h"
#include "server.cmdline.h"
#include "afs_common.h"
#include "afh.h"
#include "vss.h"
#include "send.h"
#include "rc4.h"
-#include <openssl/rc4.h>
#include "error.h"
#include "net.h"
#include "daemon.h"
client_ldflags=""
fsck_cmdline_objs="fsck.cmdline"
-fsck_errlist_objs="osl rbtree fsck string sha1"
+fsck_errlist_objs="osl rbtree fsck string sha1 fd"
########################################################################### ssl
* (C) 2005 Ian McDonald <imcdnzl@gmail.com>
*/
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "dccp.h"
* (C) 2005 Ian McDonald <imcdnzl@gmail.com>
*/
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "dccp.h"
* (C) 2005 Ian McDonald <imcdnzl@gmail.com>
*/
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "afh.h"
#define OSL_ERRORS \
- PARA_ERROR(OSL_OPENDIR, "can not open directory"), \
- PARA_ERROR(OSL_CHDIR, "failed to change directory"), \
PARA_ERROR(BAD_DB_DIR, "invalid database directory"), \
PARA_ERROR(NO_COLUMN_DESC, "missing column description"), \
PARA_ERROR(BAD_NAME, "invalid name for a column/table"), \
PARA_ERROR(BAD_SIZE, "invalid size specified"), \
PARA_ERROR(TRUNC, "failed to truncate file"), \
PARA_ERROR(UNLINK, "failed to remove file"), \
- PARA_ERROR(EXIST, "file or directory already exists"), \
- PARA_ERROR(ISDIR, "error: is a directory"), \
PARA_ERROR(NOTDIR, "error: not a directory"), \
- PARA_ERROR(NOENT, "no such file or directory"), \
- PARA_ERROR(OSL_PERM, "permission denied"), \
PARA_ERROR(BAD_TABLE, "table not open"), \
- PARA_ERROR(BAD_TABLE_HEADER, "table header corruption"), \
PARA_ERROR(BAD_TABLE_DESC, "invalid table description"), \
PARA_ERROR(RB_KEY_EXISTS, "key already exists in rbtree"), \
PARA_ERROR(RB_KEY_NOT_FOUND, "key not found in rbtree"), \
PARA_ERROR(BAD_ROW_NUM, "invalid row number"), \
PARA_ERROR(INDEX_CORRUPTION, "index corruption detected"), \
PARA_ERROR(INVALID_OBJECT, "reference to invalid object"), \
- PARA_ERROR(MKDIR, "failed to create directory"), \
- PARA_ERROR(OPEN, "failed to open file"), \
PARA_ERROR(STAT, "can not stat file"), \
PARA_ERROR(FSTAT, "fstat error"), \
PARA_ERROR(RENAME, "rename failed"), \
PARA_ERROR(EMPTY, "file empty"), \
- PARA_ERROR(NOSPC, "no space left on device"), \
PARA_ERROR(MMAP, "mmap error"), \
PARA_ERROR(MUNMAP, "munmap failed"), \
PARA_ERROR(WRITE, "write error"), \
PARA_ERROR(VERSION_MISMATCH, "table version not suppoerted"), \
PARA_ERROR(BAD_COLUMN_NUM, "invalid column number"), \
PARA_ERROR(BAD_TABLE_FLAGS, "invalid flags in table description"), \
- PARA_ERROR(RBTREE_EMPTY, "rbtree is empty"), \
PARA_ERROR(BAD_ROW, "invalid row"), \
- PARA_ERROR(OSL_GETCWD, "can not get current working directory"), \
#define RBTREE_ERRORS \
#define AFS_ERRORS \
- PARA_ERROR(AFS_SYNTAX, "afs syntax error"), \
- PARA_ERROR(FORK, "fork error"), \
PARA_ERROR(BAD_TABLE_NAME, "invalid table"), \
PARA_ERROR(INPUT_TOO_LARGE, "input too large for stdin command"), \
+ PARA_ERROR(READ, "read error"), \
+ PARA_ERROR(ATOL, "failed to convert to long"), \
#define MOOD_ERRORS \
PARA_ERROR(MOOD_LOADED, "mood loaded"), \
PARA_ERROR(MOOD_BUSY, "mood is in use"), \
PARA_ERROR(NOT_ADMISSIBLE, "file is not admussible"), \
- PARA_ERROR(READ, "read error"), \
- PARA_ERROR(ATOL, "failed to convert to long"), \
#define ATTRIBUTE_ERRORS \
#define AFS_COMMON_ERRORS \
PARA_ERROR(GETCWD, "can not get current working directory"), \
- PARA_ERROR(CHDIR, "can not change directory"), \
- PARA_ERROR(OPENDIR, "can not open directory"), \
PARA_ERROR(LSTAT, "lstat error"), \
PARA_ERROR(F_GETFL, "failed to get fd flags"), \
PARA_ERROR(F_SETFL, "failed to set fd flags"), \
PARA_ERROR(FGETS, "fgets error"), \
+ PARA_ERROR(EXIST, "file or directory already exists"), \
+ PARA_ERROR(ISDIR, "error: is a directory"), \
+ PARA_ERROR(NOENT, "no such file or directory"), \
+ PARA_ERROR(OPEN_PERM, "open error (permission denied)"), \
+ PARA_ERROR(MKDIR_PERM, "mkdir error (permission denied)"), \
+ PARA_ERROR(MKDIR, "failed to create directory"), \
+ PARA_ERROR(CHDIR, "failed to change directory"), \
+ PARA_ERROR(FCHDIR, "fchdir failed"), \
+ PARA_ERROR(OPENDIR, "can not open directory"), \
+ PARA_ERROR(NOSPC, "no space left on device"), \
+ PARA_ERROR(OPEN, "failed to open file"), \
#define WRITE_ERRORS \
/** \file fade.c a volume fader and alarm clock */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "fade.cmdline.h"
#include "para.h"
#include "fd.h"
/** \file fd.c helper functions for file descriptor handling */
-#include "para.h"
+#include <sys/types.h>
+#include <dirent.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/select.h>
+#include "para.h"
#include "error.h"
/**
* check whether a file exists
}
/**
- * *paraslash's wrapper for mmap
+ * Paraslash's wrapper for mmap.
*
* \param length number of bytes to mmap
* \param prot either PROT_NONE or the bitwise OR of one or more of
exit(EXIT_FAILURE);
}
+/**
+ * Wrapper for the open(2) system call.
+ *
+ * \param path The filename.
+ * \param flags The usual open(2) flags.
+ * \param mode Specifies the permissions to use.
+ *
+ * The mode parameter must be specified when O_CREAT is in the flags, and is ignored
+ * otherwise.
+ *
+ * \return Positive on success, negative on errors.
+ *
+ * \sa open(2).
+ */
+int para_open(const char *path, int flags, mode_t mode)
+{
+ int ret = open(path, flags, mode);
+
+ if (ret >= 0)
+ return ret;
+ switch (errno) {
+ case EEXIST:
+ ret = -E_EXIST;
+ break;
+ case EISDIR:
+ ret = -E_ISDIR;
+ break;
+ case ENOENT:
+ ret = -E_NOENT;
+ break;
+ case EPERM:
+ ret = -E_OPEN_PERM;
+ break;
+ };
+ PARA_ERROR_LOG("failed to open %s: %s\n", path, strerror(errno));
+ return ret;
+}
+
+/**
+ * Save the cwd and open a given directory.
+ *
+ * \param dirname Path to the directory to open.
+ * \param dir Result pointer.
+ * \param cwd File descriptor of the current working directory.
+ *
+ * \return Positive on success, negative on errors.
+ *
+ * Opening the current directory (".") and calling fchdir() to return is
+ * usually faster and more reliable than saving cwd in some buffer and calling
+ * chdir() afterwards.
+ *
+ * If \a cwd is not \p NULL "." is opened and the resulting file descriptor is
+ * stored in \a cwd. If the function returns success, and \a cwd is not \p
+ * NULL, the caller must close this file descriptor (probably after calling
+ * fchdir(*cwd)).
+ *
+ * On errors, the function undos everything, so the caller needs neither close
+ * any files, nor change back to the original working directory.
+ *
+ * \sa getcwd(3).
+ *
+ */
+int para_opendir(const char *dirname, DIR **dir, int *cwd)
+{
+ int ret;
+
+ if (cwd) {
+ ret = para_open(".", O_RDONLY, 0);
+ if (ret < 0)
+ return ret;
+ *cwd = ret;
+ }
+ ret = -E_CHDIR;
+ if (chdir(dirname) < 0)
+ goto close_cwd;
+ ret = -E_OPENDIR;
+ *dir = opendir(".");
+ if (!*dir)
+ goto change_to_orig_dir;
+ return 1;
+/* Ignore return value of fchdir() and close(). We're busted anyway. */
+change_to_orig_dir:
+ if (cwd)
+ fchdir(*cwd);
+close_cwd:
+ if (cwd)
+ close(*cwd);
+ return ret;
+}
+
+/**
+ * A wrapper for fchdir().
+ *
+ * \param fd An open file descriptor
+ *
+ * \return Positive on success, negative on errors.
+ */
+int para_fchdir(int fd)
+{
+ if (fchdir(fd) < 0)
+ return -E_FCHDIR;
+ return 1;
+}
+
+/**
+ * A wrapper for mkdir(2).
+ *
+ * \param path Name of the directory to create.
+ * \param mode The permissions to use.
+ *
+ * \return positive on success, negative on errors.
+ */
+int para_mkdir(const char *path, mode_t mode)
+{
+ if (!mkdir(path, mode))
+ return 1;
+ if (errno == EEXIST)
+ return -E_EXIST;
+ if (errno == ENOSPC)
+ return -E_NOSPC;
+ if (errno == ENOTDIR)
+ return -E_NOTDIR;
+ if (errno == EPERM)
+ return -E_MKDIR_PERM;
+ return -E_MKDIR;
+}
void para_fd_set(int fd, fd_set *fds, int *max_fileno);
__must_check int para_fgets(char *line, int size, FILE *f);
void *para_mmap(size_t length, int prot, int flags, int fd, off_t offset);
+int para_open(const char *path, int flags, mode_t mode);
+int para_opendir(const char *dirname, DIR **dir, int *cwd);
+int para_mkdir(const char *path, mode_t mode);
+int para_fchdir(int fd);
/** \file file_write.c simple output plugin for testing purposes */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "list.h"
#include "sched.h"
/** \file filter_chain.c common helper functions for filter input/output */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "list.h"
#include "sched.h"
+/*
+ * Copyright (C) 1997-2007 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file fsck.c The program used to check an osl table. */
+
+
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
+#include "fd.h"
#include "error.h"
#include "osl_core.h"
#include "fsck.cmdline.h"
return ret;
}
+static int check_table(char *base_dir, char *table_name)
+{
+ struct osl_table_description desc = {
+ .column_descriptions = NULL,
+ .dir = base_dir,
+ .name = table_name
+ };
+ int ret;
+
+ if (!conf.no_fsck_given) {
+ ret = fsck(&desc);
+ if (ret < 0)
+ return ret;
+ }
+ if (!conf.dump_dir_given || !*conf.dump_dir_arg)
+ return 1;
+ return dump_table(conf.dump_dir_arg, &desc);
+}
+
+static int check_all_tables(char *base_dir)
+{
+ DIR *dir;
+ struct dirent *entry;
+ int cwd_fd, ret2, ret = para_opendir(base_dir, &dir, &cwd_fd);
+
+ if (ret < 0)
+ return ret;
+ while ((entry = readdir(dir))) {
+ mode_t m;
+ struct stat s;
+ if (!strcmp(entry->d_name, "."))
+ continue;
+ if (!strcmp(entry->d_name, ".."))
+ continue;
+ if (lstat(entry->d_name, &s) == -1)
+ continue;
+ m = s.st_mode;
+ if (!S_ISDIR(m))
+ continue;
+ ret = check_table(base_dir, entry->d_name);
+ if (ret < 0)
+ break;
+ }
+ closedir(dir);
+ ret2 = para_fchdir(cwd_fd);
+ if (ret2 < 0 && ret >= 0)
+ ret = ret2;
+ close(cwd_fd);
+ return ret;
+}
+
int main(__a_unused int argc, char **argv)
{
int i, ret;
- struct osl_table_description desc = {.column_descriptions = NULL};
char *base_dir = NULL;
ret = fsck_cmdline_parser(argc, argv, &conf);
goto out;
}
HANDLE_VERSION_FLAG("fsck", conf);
- if (!conf.inputs_num) {
- /* FIXME: Find all subdirs */
- ret = -E_FSCK_SYNTAX;
- goto out;
- }
- desc.dir = conf.base_dir_arg;
- if (!conf.base_dir_given) {
+ if (conf.base_dir_given)
+ base_dir = conf.base_dir_arg;
+ else {
char *home = para_homedir();
base_dir = make_message("%s/.paraslash/afs_database", home);
free(home);
- desc.dir = base_dir;
+ }
+ if (!conf.inputs_num) {
+ ret = check_all_tables(base_dir);
+ goto out;
}
for (i = 0; i < conf.inputs_num; i++) {
- desc.name = conf.inputs[i];
- if (!conf.no_fsck_given) {
- ret = fsck(&desc);
- if (ret < 0)
- break;
- }
- if (conf.dump_dir_given && *conf.dump_dir_arg) {
- ret = dump_table(conf.dump_dir_arg, &desc);
- if (ret < 0)
- break;
- }
+ ret = check_table(base_dir, conf.inputs[i]);
+ if (ret < 0)
+ break;
}
- free(base_dir);
- ret = 1;
out:
+ if (!conf.base_dir_given)
+ free(base_dir);
if (ret < 0)
PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;
* \sa filter_chain filter_chain_info filter
*/
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "grab_client.cmdline.h"
#include "list.h"
/** \file gui.c ncurses-based interface for paraslash */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "gui.cmdline.h"
#include "para.h"
#include "gui.h"
+/*
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file gui_common.c Functions used by the guis of paraslash. */
+
+
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "string.h"
#include "fd.h"
/** \file http_recv.c paraslash's http receiver */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "http.h"
/** \file http_send.c paraslash's http sender */
+#include <sys/types.h>
+#include <dirent.h>
#include "para.h"
#include "server.cmdline.h"
*/
/** \file osl.c Object storage layer functions. */
+#include <dirent.h> /* readdir() */
+#include <assert.h>
+
+
#include "para.h"
#include "error.h"
+#include "fd.h"
#include "list.h"
#include "osl_core.h"
-#include <dirent.h> /* readdir() */
-#include <assert.h>
-
/**
* A wrapper for lseek(2).
*
}
return 1;
}
-/**
- * Wrapper for the open(2) system call.
- *
- * \param path The filename.
- * \param flags The usual open(2) flags.
- * \param mode Specifies the permissions to use.
- *
- * The mode parameter must be specified when O_CREAT is in the flags, and is ignored
- * otherwise.
- *
- * \return Positive on success, negative on errors. Possible errors: \p
- * E_EXIST, \p E_ISDIR, \p E_NOENT, \p E_OSL_PERM.
- *
- * \sa open(2).
- */
-int para_open(const char *path, int flags, mode_t mode)
-{
- PARA_DEBUG_LOG("opening %s\n", path);
- int ret = open(path, flags, mode);
-
- if (ret >= 0)
- return ret;
- switch (errno) {
- case EEXIST:
- ret = -E_EXIST;
- break;
- case EISDIR:
- ret = -E_ISDIR;
- break;
- case ENOENT:
- ret = -E_NOENT;
- break;
- case EPERM:
- ret = -E_OSL_PERM;
- break;
- };
- PARA_ERROR_LOG("failed to open %s: %s\n", path, strerror(errno));
- return ret;
-}
-
/**
* Open a file, write the given buffer and close the file.
*
int for_each_file_in_dir(const char *dirname,
int (*func)(const char *, const void *), const void *private_data)
{
- DIR *dir = NULL;
+ DIR *dir;
struct dirent *entry;
- /*
- * Opening the current directory (".") and calling fchdir() to return
- * is usually faster and more reliable than saving cwd in some buffer
- * and calling chdir() afterwards (see man 3 getcwd).
- */
- int cwd_fd = open(".", O_RDONLY);
- int ret = -1;
-
-// PARA_DEBUG_LOG("dirname: %s\n", dirname);
- if (cwd_fd < 0)
- return -E_OSL_GETCWD;
- ret = -E_OSL_CHDIR;
- if (chdir(dirname) < 0)
- goto out;
- ret = -E_OSL_OPENDIR;
- dir = opendir(".");
- if (!dir)
- goto out;
+ int cwd_fd, ret2, ret = para_opendir(dirname, &dir, &cwd_fd);
+
+ if (ret < 0)
+ return ret;
/* scan cwd recursively */
while ((entry = readdir(dir))) {
mode_t m;
}
ret = 1;
out:
- if (dir)
- closedir(dir);
- if (fchdir(cwd_fd) < 0 && ret >= 0)
- ret = -E_OSL_CHDIR;
+ closedir(dir);
+ ret2 = para_fchdir(cwd_fd);
+ if (ret2 < 0 && ret >= 0)
+ ret = ret2;
close(cwd_fd);
return ret;
}
-int para_mkdir(const char *path, mode_t mode)
-{
- if (!mkdir(path, mode))
- return 1;
- if (errno == EEXIST)
- return -E_EXIST;
- if (errno == ENOSPC)
- return -E_NOSPC;
- if (errno == ENOTDIR)
- return -E_NOTDIR;
- if (errno == EPERM)
- return E_OSL_PERM;
- return -E_MKDIR;
-}
-
static int verify_name(const char *name)
{
if (!name)
ret = -E_BAD_TABLE_FLAGS;
if (desc.flags != t->desc->flags)
goto out;
- ret = E_BAD_COLUMN_NUM;
+ ret = -E_BAD_COLUMN_NUM;
if (desc.num_columns != t->desc->num_columns)
goto out;
FOR_EACH_COLUMN(i, t->desc, cd1) {
* \param t Pointer to a mapped table.
* \param flags Options for unmapping.
*
- * \return Positive on success, negative on errors. Possible errors include:
- * E_NOT_MAPPED, E_MUNMAP.
+ * \return Positive on success, negative on errors.
*
* \sa map_table(), enum osl_close_flags, para_munmap().
*/
int for_each_file_in_dir(const char *dirname,
int (*func)(const char *, const void *), const void *private_data);
-int para_open(const char *pathname, int flags, mode_t mode);
int mmap_full_file(const char *filename, int open_mode, struct osl_object *obj);
ssize_t para_write_all(int fd, const void *buf, size_t size);
int para_lseek(int fd, off_t *offset, int whence);
int para_write_file(const char *filename, const void *buf, size_t size);
-int para_mkdir(const char *path, mode_t mode);
/**
* A wrapper for munmap(2).
/** \file recv.c the stand-alone audio stream receiver */
-#include "para.h"
+#include <sys/types.h>
+#include <dirent.h>
+#include "para.h"
#include "list.h"
#include "sched.h"
#include "recv.h"
/** \file sched.c paraslash's scheduling functions */
+#include <dirent.h> /* readdir() */
+#include <assert.h>
#include <sys/time.h>
+
#include "para.h"
#include "ipc.h"
#include "fd.h"
/** \file sdl_gui.c SDL-based interface for paraslash */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "gui_common.h"
#include "fd.h"
*
*/
+#include <sys/types.h>
+#include <dirent.h>
#include "para.h"
#include "server.cmdline.h"
*/
/** \file signal.c signal handling functions */
-
+#include <signal.h>
+#include <sys/types.h>
+#include <dirent.h>
#include "para.h"
+#include "error.h"
#include "fd.h"
-#include <signal.h>
-
-#include "error.h"
static int signal_pipe[2];
/**
* \file stat.c functions used for sending/receiving the status of para_server
* and para_audiod
*/
+
+
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "close_on_fork.h"
#include "list.h"
/** \file stdin.c functions that deal with reading from stdin */
+#include <dirent.h> /* readdir() */
+#include <assert.h>
+
+
#include "para.h"
#include "string.h"
#include "list.h"
/** \file stdout.c functions that deal with writing to stdout */
+#include <dirent.h> /* readdir() */
+#include <assert.h>
+
#include "para.h"
#include "string.h"
#include "list.h"
/** \file user_list.c user handling for para_server */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "error.h"
#include "fd.h"
* senders.
*/
+#include <sys/mman.h> /* mmap */
+#include <sys/time.h> /* gettimeofday */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "afh.h"
#include "server.h"
-#include <sys/mman.h> /* mmap */
-#include <sys/time.h> /* gettimeofday */
#include "server.cmdline.h"
#include "afs_common.h"
#include "vss.h"
/** \file write.c Paraslash's standalone wav/raw player */
+#include <sys/types.h>
+#include <dirent.h>
+
#include "para.h"
#include "string.h"
#include "write.cmdline.h"