1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Do not check for fcntl.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4931 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-11-30 14:33:14 +00:00 committed by exg
parent ee34525905
commit 75666168b7
2 changed files with 0 additions and 8 deletions

View File

@ -178,8 +178,6 @@ case "$host_os" in
esac
AC_CHECK_FUNCS(fcntl)
AC_CHECK_FUNC(socket, [], [
AC_CHECK_LIB(socket, socket, [
LIBS="$LIBS -lsocket"

View File

@ -32,9 +32,7 @@
#define DEFAULT_LOG_FILE_CREATE_MODE 600
#ifdef HAVE_FCNTL
static struct flock lock;
#endif
GSList *logs;
@ -129,7 +127,6 @@ int log_start_logging(LOG_REC *log)
log->failed = TRUE;
return FALSE;
}
#ifdef HAVE_FCNTL
memset(&lock, 0, sizeof(lock));
lock.l_type = F_WRLCK;
if (fcntl(log->handle, F_SETLK, &lock) == -1 && errno == EACCES) {
@ -139,7 +136,6 @@ int log_start_logging(LOG_REC *log)
log->failed = TRUE;
return FALSE;
}
#endif
lseek(log->handle, 0, SEEK_END);
log->opened = log->last = time(NULL);
@ -165,11 +161,9 @@ void log_stop_logging(LOG_REC *log)
settings_get_str("log_close_string"),
"\n", time(NULL));
#ifdef HAVE_FCNTL
memset(&lock, 0, sizeof(lock));
lock.l_type = F_UNLCK;
fcntl(log->handle, F_SETLK, &lock);
#endif
write_buffer_flush();
close(log->handle);