view m4/fcntl-safer.m4 @ 11937:ded3ad24a7f4

openat-safer: new module * modules/openat-safer: New file. * lib/openat-safer.c: Likewise. * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro. * lib/fcntl-safer.h (openat_safer): Declare. * lib/fcntl--.h (openat): Override. * MODULES.html.sh (File descriptor based I/O): Mention it. * lib/openat.h: Add double-inclusion guards. * lib/openat.c (includes): Only include "fcntl-safer.h", not "fcntl--.h", so we can implement openat. * modules/openat-safer-tests: New test. * tests/test-openat-safer.c: New file. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 02 Sep 2009 06:07:54 -0600
parents 35f0931dc243
children c2cbabec01dd
line wrap: on
line source

#serial 7
dnl Copyright (C) 2005-2007, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_FCNTL_SAFER],
[
  AC_LIBOBJ([open-safer])
  AC_LIBOBJ([creat-safer])
  # Prerequisites of lib/open-safer.c.
  AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
])

AC_DEFUN([gl_OPENAT_SAFER],
[
  AC_REQUIRE([gl_FCNTL_SAFER])
  AC_LIBOBJ([openat-safer])
])