Debian Codegraph @

m4/open-cloexec.m4

raw
1 # open-cloexec.m4
2 # serial 1
3 dnl Copyright 2017-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7 dnl This file is offered as-is, without any warranty.
8
9 # Test whether O_CLOEXEC is defined.
10
11 AC_DEFUN([gl_PREPROC_O_CLOEXEC],
12 [
13 AC_CACHE_CHECK([for O_CLOEXEC],
14 [gl_cv_macro_O_CLOEXEC],
15 [AC_COMPILE_IFELSE(
16 [AC_LANG_PROGRAM([[#include <fcntl.h>
17 #ifndef O_CLOEXEC
18 choke me;
19 #endif
20 ]],
21 [[return O_CLOEXEC;]])],
22 [gl_cv_macro_O_CLOEXEC=yes],
23 [gl_cv_macro_O_CLOEXEC=no])])
24 ])