Changeset 1229


Ignore:
Timestamp:
29/12/2006 17:18:17 (5 years ago)
Author:
chris
Message:

Compile fix for platforms without intercept capability (refs #3)

Location:
box/chris/merge
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • box/chris/merge/lib/common/BoxPlatform.h

    r1087 r1229  
    5151        #define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    5252#endif 
     53 
     54        #define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    5355 
    5456// Disable memory testing under Darwin, it just doesn't like it very much. 
  • box/chris/merge/lib/intercept/intercept.h

    r1187 r1229  
    1010#ifndef INTERCEPT_H 
    1111#define INTERCEPT_H 
     12#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    1213 
    1314#include <dirent.h> 
     
    3637void intercept_setup_error(const char *filename, unsigned int errorafter,  
    3738        int errortoreturn, int syscalltoerror); 
     39void intercept_setup_delay(const char *filename, unsigned int delay_after, 
     40        int delay_ms, int syscall_to_delay, int num_delays); 
     41bool intercept_triggered(); 
    3842 
    3943void intercept_setup_readdir_hook(const char *dirname,  readdir_t hookfn); 
    4044void intercept_setup_lstat_hook  (const char *filename, lstat_t   hookfn); 
    4145 
     46#endif // !PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    4247#endif // !INTERCEPT_H 
  • box/chris/merge/test/bbackupd/testbbackupd.cpp

    r1190 r1229  
    1010#include "Box.h" 
    1111 
     12#include <dirent.h> 
    1213#include <stdio.h> 
    1314#include <sys/types.h> 
     
    510511} 
    511512 
    512 void intercept_setup_delay(const char *filename, unsigned int delay_after, 
    513         int delay_ms, int syscall_to_delay, int num_delays); 
    514  
    515 bool intercept_triggered(); 
    516  
    517513int start_internal_daemon() 
    518514{ 
     
    599595struct dirent *readdir_test_hook_1(DIR *dir) 
    600596{ 
     597#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    601598        intercept_setup_readdir_hook(NULL, readdir_test_hook_2); 
     599#endif 
    602600        return NULL; 
    603601} 
     
    610608        if (time(NULL) >= readdir_stop_time) 
    611609        { 
     610#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    612611                intercept_setup_readdir_hook(NULL, NULL); 
    613612                intercept_setup_lstat_hook  (NULL, NULL); 
     613#endif 
    614614                // we will not be called again. 
    615615        } 
     
    627627                "testfiles/TestDir1/spacetest/d1/test.%d",  
    628628                readdir_test_counter); 
     629#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE 
    629630        intercept_setup_lstat_hook(stat_hook_filename, lstat_test_hook); 
     631#endif 
    630632 
    631633        return &readdir_test_dirent; 
Note: See TracChangeset for help on using the changeset viewer.