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.
8 # Test whether O_CLOEXEC is defined.
10 AC_DEFUN([gl_PREPROC_O_CLOEXEC],
12 AC_CACHE_CHECK([for O_CLOEXEC],
13 [gl_cv_macro_O_CLOEXEC],
15 [AC_LANG_PROGRAM([[#include <fcntl.h>
20 [[return O_CLOEXEC;]])],
21 [gl_cv_macro_O_CLOEXEC=yes],
22 [gl_cv_macro_O_CLOEXEC=no])])