[Samba] Samba 3.0.20pre2 Available for Download
Thomas Bork
knuffelmail at gmx.de
Wed Jul 13 11:24:43 GMT 2005
Gerald (Jerry) Carter wrote:
> This is a preview release of the Samba 3.0.20 code base and
Since 3.0.20pre2 samba_vscan 0.3.6 doesn't compile anymore. This has
somthing todo with Samba changes, because with 3.0.20pre1 samba_vscan
compiles fine (samba_vscan wasn't changed between versions):
Compiling global/vscan-fileaccesslog.c with -fPIC
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:156: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:158: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:158: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c:158: warning: preprocessing directive not
recognized within macro arg
global/vscan-fileaccesslog.c: In function `lrufiles_add':
global/vscan-fileaccesslog.c:131: parse error before `#'
global/vscan-fileaccesslog.c:142: `found' undeclared (first use in this
function)
global/vscan-fileaccesslog.c:142: (Each undeclared identifier is
reported only once
global/vscan-fileaccesslog.c:142: for each function it appears in.)
global/vscan-fileaccesslog.c:153: undefined or invalid # directive
global/vscan-fileaccesslog.c:154: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:156: parse error before `#'
global/vscan-fileaccesslog.c:158: parse error before `#'
global/vscan-fileaccesslog.c:158: parse error before `#'
global/vscan-fileaccesslog.c:158: parse error before `#'
global/vscan-fileaccesslog.c:159: undefined or invalid # directive
global/vscan-fileaccesslog.c:160: undefined or invalid # directive
global/vscan-fileaccesslog.c:161: undefined or invalid # directive
global/vscan-fileaccesslog.c:167: `tmp' undeclared (first use in this
function)
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:173: parse error before `#'
global/vscan-fileaccesslog.c:174: parse error before `#'
global/vscan-fileaccesslog.c:178: parse error before `#'
make: *** [global/vscan-fileaccesslog.po] Error 1
Here is /vscan-fileaccesslog.c from line 120 to 180:
/**
* Adds a new entry, or if the entry already exists, mtime and infected
values
* are updated
* @param fname the file name
* @param mtime time the file was last modified
* @param infected marks a file as infected or not infected
* @return returns a pointer of the new entry, the updated entry or NULL
* if no memory could be allocated
*
*/
struct lrufiles_struct *lrufiles_add(pstring fname, time_t mtime, BOOL
infected) {
struct lrufiles_struct *new, *tmp, *found = NULL;
/* check if lru file access was disabled by setting the corresponding
value in the configuration file to zero (or below zero) */
if ( lrufiles_max_entries <= 0 ) {
DEBUG(1, ("lru files feature is disabled, do nothing\n"));
/* do nothing, simply return NULL */
return NULL;
}
DEBUG(10, ("file '%s' should be added\n", fname));
/* check if file has already been added */
found = lrufiles_search(fname);
if ( found != NULL ) {
/* has already been added, update mtime and infected only */
DEBUG(10, ("file '%s' in list, update mtime and infected\n", fname));
found->mtime = mtime;
found->infected = infected;
/* FIXME hm, should we updated it or not?! */
/* found->time_added = time(NULL); */
return found;
} else {
DEBUG(10, ("alloc space for file entry '%s'\n", fname));
new = (struct lrufiles_struct *)malloc(sizeof(*new));
if (!new) return NULL;
ZERO_STRUCTP(new);
pstrcpy(new->fname, fname);
new->mtime = mtime;
new->infected = infected;
new->time_added = time(NULL);
/* reached maximum? */
if ( lrufiles_count == lrufiles_max_entries ) {
DEBUG(10, ("lru maximum reached '%d'\n", lrufiles_count));
/* remove the first one - it really removes only the first one */
tmp = Lrufiles;
DEBUG(10, ("removing first entry..."));
lrufiles_delete_p(tmp);
}
DEBUG(10, ("adding new entry to list...\n"));
DLIST_ADD_END(Lrufiles, new, tmp);
LrufilesEnd = new;
lrufiles_count++;
DEBUG(10, ("entry '%s' added, count '%d'\n", fname, lrufiles_count));
return new;
}
}
--
der tom
More information about the samba
mailing list