mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
Work around lack of flock(2) declaration on Tru64 5.1b.
* configure.in: Check for the declaration of flock(2). * libguile/posix.c [!__MINGW32__][!HAVE_DECL_FLOCK]: Provide an flock(2) declaration, needed on Tru64 5.1b.
This commit is contained in:
parent
2b76a65566
commit
5d8f339fd8
2 changed files with 10 additions and 1 deletions
|
@ -774,10 +774,12 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround ftime
|
||||||
# declaration isn't anywhere.
|
# declaration isn't anywhere.
|
||||||
# cuserid - on Tru64 5.1b the declaration is documented to be available
|
# cuserid - on Tru64 5.1b the declaration is documented to be available
|
||||||
# only with `_XOPEN_SOURCE' or some such.
|
# only with `_XOPEN_SOURCE' or some such.
|
||||||
|
# flock - on Tru64 5.1b the declaration is available from <sys/fcntl.h>
|
||||||
|
# but only if `_BSD' is defined.
|
||||||
#
|
#
|
||||||
AC_CHECK_HEADERS(crypt.h netdb.h pthread.h sys/param.h sys/resource.h sys/file.h)
|
AC_CHECK_HEADERS(crypt.h netdb.h pthread.h sys/param.h sys/resource.h sys/file.h)
|
||||||
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
|
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
|
||||||
AC_CHECK_DECLS([sethostname, strncasecmp, unsetenv, hstrerror, cuserid])
|
AC_CHECK_DECLS([sethostname, strncasecmp, unsetenv, hstrerror, cuserid, flock])
|
||||||
|
|
||||||
# crypt() may or may not be available, for instance in some countries there
|
# crypt() may or may not be available, for instance in some countries there
|
||||||
# are restrictions on cryptography.
|
# are restrictions on cryptography.
|
||||||
|
|
|
@ -1856,6 +1856,13 @@ static int flock (int fd, int operation)
|
||||||
#endif /* __MINGW32__ */
|
#endif /* __MINGW32__ */
|
||||||
|
|
||||||
#if HAVE_FLOCK || defined (__MINGW32__)
|
#if HAVE_FLOCK || defined (__MINGW32__)
|
||||||
|
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
# if !HAVE_DECL_FLOCK
|
||||||
|
extern int flock (int, int);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
SCM_DEFINE (scm_flock, "flock", 2, 0, 0,
|
SCM_DEFINE (scm_flock, "flock", 2, 0, 0,
|
||||||
(SCM file, SCM operation),
|
(SCM file, SCM operation),
|
||||||
"Apply or remove an advisory lock on an open file.\n"
|
"Apply or remove an advisory lock on an open file.\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue