summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-17 15:33:13 +0000
committerGerald Carter <jerry@samba.org>2002-06-17 15:33:13 +0000
commit7b60e2304052c5603740ea11ce1345a32e1b9175 (patch)
tree121a6e788e22d5c46627050b8b9848aaf1896084 /source3/smbd
parentaaf43bbc8fc113527cb4bb6da5fa9be06b2a1548 (diff)
downloadsamba-7b60e2304052c5603740ea11ce1345a32e1b9175.tar.gz
samba-7b60e2304052c5603740ea11ce1345a32e1b9175.tar.bz2
samba-7b60e2304052c5603740ea11ce1345a32e1b9175.zip
compile warngin fixes merged from 2.2
(This used to be commit 29874f4b8fecdc7cbd84d656dafce54cca49e0b1)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/notify_kernel.c18
-rw-r--r--source3/smbd/oplock_linux.c12
-rw-r--r--source3/smbd/process.c4
-rw-r--r--source3/smbd/server.c4
4 files changed, 19 insertions, 19 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index 77186ac6c8..8454917163 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -24,8 +24,8 @@
#if HAVE_KERNEL_CHANGE_NOTIFY
#define FD_PENDING_SIZE 20
-static VOLATILE sig_atomic_t fd_pending_array[FD_PENDING_SIZE];
-static VOLATILE sig_atomic_t signals_received;
+static SIG_ATOMIC_T fd_pending_array[FD_PENDING_SIZE];
+static SIG_ATOMIC_T signals_received;
#ifndef DN_ACCESS
#define DN_ACCESS 0x00000001 /* File accessed in directory */
@@ -71,7 +71,7 @@ struct change_data {
static void signal_handler(int sig, siginfo_t *info, void *unused)
{
if (signals_received < FD_PENDING_SIZE - 1) {
- fd_pending_array[signals_received] = (sig_atomic_t)info->si_fd;
+ fd_pending_array[signals_received] = (SIG_ATOMIC_T)info->si_fd;
signals_received++;
} /* Else signal is lost. */
sys_select_signal();
@@ -99,10 +99,10 @@ static BOOL kernel_check_notify(connection_struct *conn, uint16 vuid, char *path
path, i, (int)fd_pending_array[i], (int)signals_received ));
close((int)fd_pending_array[i]);
- fd_pending_array[i] = (sig_atomic_t)-1;
+ fd_pending_array[i] = (SIG_ATOMIC_T)-1;
if (signals_received - i - 1) {
- memmove(&fd_pending_array[i], &fd_pending_array[i+1],
- sizeof(sig_atomic_t)*(signals_received-i-1));
+ memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
+ sizeof(SIG_ATOMIC_T)*(signals_received-i-1));
}
data->directory_handle = -1;
signals_received--;
@@ -128,10 +128,10 @@ static void kernel_remove_notify(void *datap)
for (i = 0; i < signals_received; i++) {
if (fd == (int)fd_pending_array[i]) {
close(fd);
- fd_pending_array[i] = (sig_atomic_t)-1;
+ fd_pending_array[i] = (SIG_ATOMIC_T)-1;
if (signals_received - i - 1) {
- memmove(&fd_pending_array[i], &fd_pending_array[i+1],
- sizeof(sig_atomic_t)*(signals_received-i-1));
+ memmove((void *)&fd_pending_array[i], (void *)&fd_pending_array[i+1],
+ sizeof(SIG_ATOMIC_T)*(signals_received-i-1));
}
data->directory_handle = -1;
signals_received--;
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index 459d987272..85f89c12a0 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -22,9 +22,9 @@
#if HAVE_KERNEL_OPLOCKS_LINUX
-static VOLATILE sig_atomic_t signals_received;
+static SIG_ATOMIC_T signals_received;
#define FD_PENDING_SIZE 100
-static VOLATILE sig_atomic_t fd_pending_array[FD_PENDING_SIZE];
+static SIG_ATOMIC_T fd_pending_array[FD_PENDING_SIZE];
#ifndef F_SETLEASE
#define F_SETLEASE 1024
@@ -53,7 +53,7 @@ static VOLATILE sig_atomic_t fd_pending_array[FD_PENDING_SIZE];
static void signal_handler(int sig, siginfo_t *info, void *unused)
{
if (signals_received < FD_PENDING_SIZE - 1) {
- fd_pending_array[signals_received] = (sig_atomic_t)info->si_fd;
+ fd_pending_array[signals_received] = (SIG_ATOMIC_T)info->si_fd;
signals_received++;
} /* Else signal is lost. */
sys_select_signal();
@@ -131,10 +131,10 @@ static BOOL linux_oplock_receive_message(fd_set *fds, char *buffer, int buffer_l
BlockSignals(True, RT_SIGNAL_LEASE);
fd = fd_pending_array[0];
fsp = file_find_fd(fd);
- fd_pending_array[0] = (sig_atomic_t)-1;
+ fd_pending_array[0] = (SIG_ATOMIC_T)-1;
if (signals_received > 1)
- memmove(&fd_pending_array[0], &fd_pending_array[1],
- sizeof(sig_atomic_t)*(signals_received-1));
+ memmove((void *)&fd_pending_array[0], (void *)&fd_pending_array[1],
+ sizeof(SIG_ATOMIC_T)*(signals_received-1));
signals_received--;
/* now we can receive more signals */
BlockSignals(False, RT_SIGNAL_LEASE);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 0cfb4a6264..43d3c6c531 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -42,8 +42,8 @@ extern int last_message;
extern int global_oplock_break;
extern userdom_struct current_user_info;
extern int smb_read_error;
-extern VOLATILE sig_atomic_t reload_after_sighup;
-extern VOLATILE sig_atomic_t got_sig_term;
+SIG_ATOMIC_T reload_after_sighup;
+SIG_ATOMIC_T got_sig_term;
extern BOOL global_machine_password_needs_changing;
extern fstring global_myworkgroup;
extern pstring global_myname;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 6296e13f1c..107282d36c 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -63,7 +63,7 @@ static void smbd_set_server_fd(int fd)
Terminate signal.
****************************************************************************/
-VOLATILE sig_atomic_t got_sig_term = 0;
+SIG_ATOMIC_T got_sig_term = 0;
static void sig_term(void)
{
@@ -75,7 +75,7 @@ static void sig_term(void)
Catch a sighup.
****************************************************************************/
-VOLATILE sig_atomic_t reload_after_sighup = 0;
+SIG_ATOMIC_T reload_after_sighup = 0;
static void sig_hup(int sig)
{