{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
printf "%s\n" "$enable_fontset" >&6; }
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if shm_open is available" >&5
-printf %s "checking if shm_open is available... " >&6; }
-cppflags_save=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/mman.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-int
-main (void)
-{
-shm_open("/test", O_CREAT, 0600);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
-
-else case e in #(
- e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; } ;;
-esac
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-CPPFLAGS=$cppflags_save
-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-wayland argument" >&5
printf %s "checking --with-wayland argument... " >&6; }
fi
CPPFLAGS=$cppflags_save
CFLAGS=$cflags_save
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$enable_gui" = "xgtk4"; then
/* Define if we have flock() */
#undef HAVE_FLOCK
-/* Define if we have shm_open() */
-#undef HAVE_SHM_OPEN
-
/* Define to inline symbol or empty */
#undef inline
AC_MSG_RESULT($enable_fontset)
dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
-AC_MSG_CHECKING(if shm_open is available)
-cppflags_save=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-AC_LINK_IFELSE([AC_LANG_PROGRAM(
- [#include <sys/mman.h>
- #include <sys/stat.h>
- #include <fcntl.h>], [shm_open("/test", O_CREAT, 0600);])],
- AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SHM_OPEN),
- AC_MSG_RESULT(no))
-CPPFLAGS=$cppflags_save
-
AC_MSG_CHECKING(--with-wayland argument)
AC_ARG_WITH(wayland,
[ --with-wayland Include support for the Wayland protocol.],
fi
CPPFLAGS=$cppflags_save
CFLAGS=$cflags_save
+else
+ AC_MSG_RESULT(no)
fi
dnl GTK4 does not use X11 APIs directly, so skip X11 detection entirely.
#include "os_unixx.h" // unix includes for os_unix.c only
-#ifdef HAVE_SHM_OPEN
-# include <sys/mman.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-#endif
-
#ifdef USE_XSMP
# include <X11/SM/SMlib.h>
#endif
}
# endif // PROF_NSEC
#endif // FEAT_RELTIME
-
-/*
- * Create an anonymous/temporary file/object and return its file descriptor.
- * Returns -1 on error.
- */
- int
-mch_create_anon_file(void)
-{
- int fd = -1;
-#ifdef HAVE_SHM_OPEN
- const char template[] = "/vimXXXXXX";
-
- for (int i = 0; i < 100; i++)
- {
- mch_get_random((char_u*)template + 4, 6);
-
- errno = 0;
- fd = shm_open(template, O_CREAT | O_RDWR | O_EXCL, 0600);
-
- if (fd >= 0 || errno != EEXIST)
- break;
- }
- // Remove object name from namespace
- shm_unlink(template);
-#endif
- // Last resort
- if (fd == -1)
- {
- char_u *tempname;
- // get a name for the temp file
- if ((tempname = vim_tempname('w', FALSE)) == NULL)
- {
- emsg(_(e_cant_get_temp_file_name));
- return -1;
- }
- fd = mch_open((char *)tempname, O_CREAT | O_RDWR | O_EXCL, 0600);
- mch_remove(tempname);
- vim_free(tempname);
- }
- return fd;
-}
void stop_timeout(void);
volatile sig_atomic_t *start_timeout(long msec);
void delete_timer(void);
-int mch_create_anon_file(void);
/* vim: set ft=c : */
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 864,
/**/
863,
/**/