/usr/include/CLAM/EmbeddedFile.hxx is in libclam-dev 1.4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #ifndef EmbeddedFile_hxx
#define EmbeddedFile_hxx
/// Include a given file as binary data
/// @arg varname is the variable that will hold the var (const char[])
/// @arg file is an absolute path or a relative path from the build point (not the source file!!)
/// @todo Try to make CLAM_EMBEDDED_FILE work with path relatives to the source that uses the macro.
#if defined __MINGW32__
// COFF binary target version
#define CLAM_EMBEDDED_FILE(varname, file) \
asm ( \
" .section \".rodata\"\n" \
" .def _" #varname "\n" \
" _" #varname ":\n" \
" .incbin \"" file "\"\n" \
" .byte 0\n" \
" .scl 2\n" \
" .size . - _" #varname "\n" \
" .endef\n" \
); \
extern const char varname[];
// This was needed but at some version it made it not to compile
// " .scl 1\n"
#elif defined __ELF__
// ELF binary target version
#define CLAM_EMBEDDED_FILE(varname, file) \
asm ( \
" .section \".rodata\"\n" \
" .type " #varname ", @object\n" \
" " #varname ":\n" \
" .incbin \"" file "\"\n" \
" .byte 0\n" \
" .size " #varname ", .-" #varname "\n" \
); \
extern const char varname[];
#else
#error "No support for embedded files in your platform"
#define CLAM_EMBEDDED_FILE(varname, file) \
extern const char varname[];
#endif
/// Alias to CLAM_EMBEDDED_FILE, for compatibility
#define CLAM_EXTERNAL_FILE_DATA(varname, file) CLAM_EMBEDDED_FILE(varname, file)
#endif//EmbeddedFile_hxx
|