~yolanda.robla/ubuntu/saucy/clamav/dep-8-tests

« back to all changes in this revision

Viewing changes to libclamav/others.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-11-02 23:27:19 UTC
  • mfrom: (0.35.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091102232719-61ay35095dhbuxfm
Tags: 0.95.3+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop build-dep on electric-fence (in Universe)
  - Build-dep on libltdl3-dev instead of libltdl-dev for updating earlier
    releases more easily
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 * in re-enabling affected modules.
46
46
 */
47
47
 
48
 
#define CL_FLEVEL 43
 
48
#define CL_FLEVEL 44
49
49
#define CL_FLEVEL_DCONF CL_FLEVEL
50
50
 
51
51
extern uint8_t cli_debug_flag;
306
306
#ifdef HAVE_SAR
307
307
#define CLI_SRS(n,s) ((n)>>(s))
308
308
#else
309
 
#define CLI_SRS(n,s) (((n)>>(s)) ^ (1<<(sizeof(n)*8-1-s)) - (1<<(sizeof(n)*8-1-s)))
 
309
#define CLI_SRS(n,s) ((((n)>>(s)) ^ (1<<(sizeof(n)*8-1-s))) - (1<<(sizeof(n)*8-1-s)))
310
310
#endif
311
311
#define CLI_SAR(n,s) n = CLI_SRS(n,s)
312
312
 
359
359
void cli_dbgmsg_internal(const char *str, ...);
360
360
#endif
361
361
 
 
362
#if HAVE_SYSCONF_SC_PAGESIZE
 
363
static inline int cli_getpagesize(void) { return sysconf(_SC_PAGESIZE); }
 
364
#define HAVE_CLI_GETPAGESIZE 1
 
365
#else
 
366
#if HAVE_GETPAGESIZE
 
367
static inline int cli_getpagesize(void) { return getpagesize(); }
 
368
#define HAVE_CLI_GETPAGESIZE 1
 
369
#endif
 
370
#define HAVE_CLI_GETPAGESIZE 0
 
371
#endif
 
372
 
362
373
void *cli_malloc(size_t nmemb);
363
374
void *cli_calloc(size_t nmemb, size_t size);
364
375
void *cli_realloc(void *ptr, size_t size);
423
434
typedef int (*cli_ftw_cb)(struct stat *stat_buf, char *filename, const char *path, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data);
424
435
 
425
436
/*
 
437
 * returns 1 if the path should be skipped and 0 otherwise
 
438
 * uses callback data
 
439
 */
 
440
typedef int (*cli_ftw_pathchk)(const char *path, struct cli_ftw_cbdata *data);
 
441
 
 
442
/*
426
443
 * returns 
427
444
 *  CL_SUCCESS if it traversed all files and subdirs
428
445
 *  CL_BREAK if traversal has stopped at some point
436
453
 * which one it is.
437
454
 * If it is a file, it simply calls the callback once, otherwise recurses.
438
455
 */
439
 
int cli_ftw(char *base, int flags, int maxdepth, cli_ftw_cb callback, struct cli_ftw_cbdata *data);
 
456
int cli_ftw(char *base, int flags, int maxdepth, cli_ftw_cb callback, struct cli_ftw_cbdata *data, cli_ftw_pathchk pathchk);
440
457
 
441
458
const char *cli_strerror(int errnum, char* buf, size_t len);
442
459
#endif