X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Famanda.h;h=0958790cdfbab2ebd1e94fc4b07be995ee312b04;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=ec0653316e75bd3f0c0489bc906c3fcab8c2202b;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/common-src/amanda.h b/common-src/amanda.h index ec06533..0958790 100644 --- a/common-src/amanda.h +++ b/common-src/amanda.h @@ -44,10 +44,6 @@ /* * Force large file source even if configure guesses wrong. */ -#ifndef _LARGE_FILE_SOURCE -#define _LARGE_FILES 1 -#endif - #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE 1 #endif @@ -60,8 +56,9 @@ # include #endif -/* gnulib creates this header locally if the system doesn't provide it */ -#include +/* gnulib creates this header locally if the system doesn't provide it, + * so it uses a local ("") include */ +#include "stdint.h" /* * I would prefer that each Amanda module include only those system headers @@ -140,10 +137,6 @@ #endif #endif -#ifdef HAVE_NETDB_H -# include -#endif - #ifdef TIME_WITH_SYS_TIME # include # include @@ -295,10 +288,6 @@ struct iovec { #include #include -#ifdef HAVE_ARPA_INET_H -#include -#endif - #ifdef WORKING_IPV6 #define INET6 #endif @@ -461,40 +450,12 @@ char *debug_vstrextend(const char *file, int line, char **oldstr, ...); #define agets(f) debug_agets(__FILE__,__LINE__,(f)) #define areads(f) debug_areads(__FILE__,__LINE__,(f)) -extern int debug_amtable_alloc(const char *file, - int line, - void **table, - size_t *current, - size_t elsize, - size_t count, - int bump, - void (*init_func)(void *)); - -#define amtable_alloc(t,c,s,n,b,f) debug_amtable_alloc(__FILE__, \ - __LINE__, \ - (t), \ - (c), \ - (s), \ - (n), \ - (b), \ - (f)) - -extern void amtable_free(void **, size_t *); - -char ** safe_env(void); -char * validate_regexp(const char *regex); -char * validate_glob(const char *glob); -char * clean_regex(const char *regex); -int match(const char *regex, const char *str); -int match_no_newline(const char *regex, const char *str); -int match_glob(const char *glob, const char *str); -char * glob_to_regex(const char *glob); -int match_tar(const char *glob, const char *str); -char * tar_to_regex(const char *glob); -int match_host(const char *glob, const char *host); -int match_disk(const char *glob, const char *disk); -int match_datestamp(const char *dateexp, const char *datestamp); -int match_level(const char *levelexp, const char *level); +/* return a "safe" version of the current environment; pass this to execle */ +#define safe_env() safe_env_full(NULL) + +/* like safe_env, but optionally add additional environment variables */ +char ** safe_env_full(char **add); + time_t unctime(char *timestr); /* @@ -1067,9 +1028,12 @@ extern int vfprintf(FILE *stream, const char *format, va_list ap); extern int vprintf(const char *format, va_list ap); #endif -/* gnulib-only includes (hence "" instead of <>) */ -#include "getaddrinfo.h" -#include "inet_ntop.h" +/* these system headers are added by gnulib if they + * do not exist */ +#include "netdb.h" +#include "arpa/inet.h" + +/* gnulib-only includes */ #include "safe-read.h" #include "full-read.h" #include "full-write.h" @@ -1194,4 +1158,13 @@ typedef enum { KENCRYPT_YES /* krb5 encryption enabled on all stream */ } kencrypt_type; +#define DUMP_LEVELS 400 + +/* Constants to define the number of pre-opened pipes between amandad and + * its services */ + +/* If you change these (don't!), change them in perl/Amanda/Constants.pm, too */ +#define DATA_FD_COUNT 3 /* number of general-use pipes */ +#define DATA_FD_OFFSET 50 + #endif /* !AMANDA_H */