summaryrefslogtreecommitdiff
path: root/gnulib/m4/unlink-busy.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib/m4/unlink-busy.m4')
m---------gnulib0
-rw-r--r--gnulib/m4/unlink-busy.m440
2 files changed, 40 insertions, 0 deletions
diff --git a/gnulib b/gnulib
deleted file mode 160000
-Subproject 443bc5ffcf7429e557f4a371b0661abe98ddbc1
diff --git a/gnulib/m4/unlink-busy.m4 b/gnulib/m4/unlink-busy.m4
new file mode 100644
index 0000000..f5739c2
--- /dev/null
+++ b/gnulib/m4/unlink-busy.m4
@@ -0,0 +1,40 @@
+#serial 12
+
+dnl From J. David Anglin.
+
+dnl HPUX and other systems can't unlink shared text that is being executed.
+
+# Copyright (C) 2000-2001, 2004, 2007, 2009-2011 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT],
+[dnl
+ AC_CACHE_CHECK([whether a running program can be unlinked],
+ gl_cv_func_unlink_busy_text,
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_INCLUDES_DEFAULT[
+ int
+ main (int argc, char **argv)
+ {
+ int result = 0;
+ if (argc == 0)
+ result |= 1;
+ else if (unlink (argv[0]) != 0)
+ result |= 2;
+ return result;
+ }]])],
+ gl_cv_func_unlink_busy_text=yes,
+ gl_cv_func_unlink_busy_text=no,
+ gl_cv_func_unlink_busy_text=no
+ )
+ ]
+ )
+
+ if test $gl_cv_func_unlink_busy_text = no; then
+ INSTALL=$ac_install_sh
+ fi
+])