diff options
author | Gerald Carter <jerry@samba.org> | 2002-09-25 15:19:00 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-09-25 15:19:00 +0000 |
commit | a834a73e341059be154426390304a42e4a011f72 (patch) | |
tree | 7f53b0f7819238e0ee0396daccf5d924cb9b8d29 /source3/profile | |
parent | 115a39775cb923d026dde58633b6ba6aef3a1943 (diff) | |
download | samba-a834a73e341059be154426390304a42e4a011f72.tar.gz samba-a834a73e341059be154426390304a42e4a011f72.tar.bz2 samba-a834a73e341059be154426390304a42e4a011f72.zip |
sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
Diffstat (limited to 'source3/profile')
-rw-r--r-- | source3/profile/profile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c index 595593c6f0..689f67da99 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -21,10 +21,14 @@ #include "includes.h" +#ifdef WITH_PROFILE #define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6)) +#endif /* WITH_PROFILE */ +#ifdef WITH_PROFILE static int shm_id; static BOOL read_only; +#endif struct profile_header *profile_h; struct profile_stats *profile_p; @@ -45,6 +49,7 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len) int level; memcpy(&level, buf, sizeof(int)); +#ifdef WITH_PROFILE switch (level) { case 0: /* turn off profiling */ do_profile_flag = False; @@ -66,6 +71,9 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len) DEBUG(1,("INFO: Profiling values cleared from pid %d\n", (int)src)); break; } +#else /* WITH_PROFILE */ + DEBUG(1,("INFO: Profiling support unavailable in this build.\n")); +#endif /* WITH_PROFILE */ } /**************************************************************************** @@ -87,6 +95,7 @@ void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len) /******************************************************************* open the profiling shared memory area ******************************************************************/ +#ifdef WITH_PROFILE BOOL profile_setup(BOOL rdonly) { struct shmid_ds shm_ds; @@ -154,3 +163,4 @@ BOOL profile_setup(BOOL rdonly) message_register(MSG_REQ_PROFILELEVEL, reqprofile_message); return True; } +#endif /* WITH_PROFILE */ |