xcrypt 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xcrypt/version.rb +1 -1
  3. data/lib/xcrypt.rb +160 -0
  4. metadata +17 -39
  5. data/ext/libxcrypt/INSTALL +0 -380
  6. data/ext/libxcrypt/Makefile.in +0 -4110
  7. data/ext/libxcrypt/TODO +0 -1
  8. data/ext/libxcrypt/TODO.md +0 -100
  9. data/ext/libxcrypt/aclocal.m4 +0 -2617
  10. data/ext/libxcrypt/autom4te.cache/output.0 +0 -19884
  11. data/ext/libxcrypt/autom4te.cache/output.1 +0 -19884
  12. data/ext/libxcrypt/autom4te.cache/output.2 +0 -19884
  13. data/ext/libxcrypt/autom4te.cache/output.3 +0 -19885
  14. data/ext/libxcrypt/autom4te.cache/requests +0 -714
  15. data/ext/libxcrypt/autom4te.cache/traces.0 +0 -4088
  16. data/ext/libxcrypt/autom4te.cache/traces.1 +0 -1060
  17. data/ext/libxcrypt/autom4te.cache/traces.2 +0 -4088
  18. data/ext/libxcrypt/autom4te.cache/traces.3 +0 -1060
  19. data/ext/libxcrypt/build-aux/ci/ci-log-dependency-versions +0 -79
  20. data/ext/libxcrypt/build-aux/ci/ci-log-logfiles +0 -22
  21. data/ext/libxcrypt/build-aux/ci/clang-gcov-wrapper +0 -2
  22. data/ext/libxcrypt/build-aux/ci/configure-wrapper +0 -10
  23. data/ext/libxcrypt/build-aux/ci/summarize-coverage +0 -24
  24. data/ext/libxcrypt/build-aux/m4/libtool.m4 +0 -8488
  25. data/ext/libxcrypt/build-aux/m4/ltoptions.m4 +0 -467
  26. data/ext/libxcrypt/build-aux/m4/ltsugar.m4 +0 -124
  27. data/ext/libxcrypt/build-aux/m4/ltversion.m4 +0 -24
  28. data/ext/libxcrypt/build-aux/m4/lt~obsolete.m4 +0 -99
  29. data/ext/libxcrypt/build-aux/m4-autogen/compile +0 -364
  30. data/ext/libxcrypt/build-aux/m4-autogen/config.guess +0 -1815
  31. data/ext/libxcrypt/build-aux/m4-autogen/config.sub +0 -2354
  32. data/ext/libxcrypt/build-aux/m4-autogen/depcomp +0 -792
  33. data/ext/libxcrypt/build-aux/m4-autogen/install-sh +0 -541
  34. data/ext/libxcrypt/build-aux/m4-autogen/ltmain.sh +0 -11524
  35. data/ext/libxcrypt/build-aux/m4-autogen/missing +0 -236
  36. data/ext/libxcrypt/build-aux/m4-autogen/test-driver +0 -160
  37. data/ext/libxcrypt/codecov.yml +0 -4
  38. data/ext/libxcrypt/config.h.in +0 -303
  39. data/ext/libxcrypt/configure +0 -19885
  40. data/ext/libxcrypt/libxcrypt.spec.rpkg +0 -481
  41. data/ext/libxcrypt/rpkg.conf +0 -2
  42. data/ext/libxcrypt/rpkg.macros +0 -86
@@ -1,99 +0,0 @@
1
- # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
2
- #
3
- # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
4
- # Software Foundation, Inc.
5
- # Written by Scott James Remnant, 2004.
6
- #
7
- # This file is free software; the Free Software Foundation gives
8
- # unlimited permission to copy and/or distribute it, with or without
9
- # modifications, as long as this notice is preserved.
10
-
11
- # serial 5 lt~obsolete.m4
12
-
13
- # These exist entirely to fool aclocal when bootstrapping libtool.
14
- #
15
- # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
16
- # which have later been changed to m4_define as they aren't part of the
17
- # exported API, or moved to Autoconf or Automake where they belong.
18
- #
19
- # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
20
- # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
21
- # using a macro with the same name in our local m4/libtool.m4 it'll
22
- # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
23
- # and doesn't know about Autoconf macros at all.)
24
- #
25
- # So we provide this file, which has a silly filename so it's always
26
- # included after everything else. This provides aclocal with the
27
- # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
28
- # because those macros already exist, or will be overwritten later.
29
- # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
30
- #
31
- # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
32
- # Yes, that means every name once taken will need to remain here until
33
- # we give up compatibility with versions before 1.7, at which point
34
- # we need to keep only those names which we still refer to.
35
-
36
- # This is to help aclocal find these macros, as it can't see m4_define.
37
- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
38
-
39
- m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
40
- m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
41
- m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
42
- m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
43
- m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
44
- m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
45
- m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
46
- m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
47
- m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
48
- m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
49
- m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
50
- m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
51
- m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
52
- m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
53
- m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
54
- m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
55
- m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
56
- m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
57
- m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
58
- m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
59
- m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
60
- m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
61
- m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
62
- m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
63
- m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
64
- m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
65
- m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
66
- m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
67
- m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
68
- m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
69
- m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
70
- m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
71
- m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
72
- m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
73
- m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
74
- m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
75
- m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
76
- m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
77
- m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
78
- m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
79
- m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
80
- m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
81
- m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
82
- m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
83
- m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
84
- m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
85
- m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
86
- m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
87
- m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
88
- m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
89
- m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
90
- m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
91
- m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
92
- m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
93
- m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
94
- m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
95
- m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
96
- m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
97
- m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
98
- m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
99
- m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
@@ -1,364 +0,0 @@
1
- #! /bin/sh
2
- # Wrapper for compilers which do not understand '-c -o'.
3
-
4
- scriptversion=2025-02-03.05; # UTC
5
-
6
- # Copyright (C) 1999-2025 Free Software Foundation, Inc.
7
- # Written by Tom Tromey <tromey@cygnus.com>.
8
- #
9
- # This program is free software; you can redistribute it and/or modify
10
- # it under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 2, or (at your option)
12
- # any later version.
13
- #
14
- # This program is distributed in the hope that it will be useful,
15
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- # GNU General Public License for more details.
18
- #
19
- # You should have received a copy of the GNU General Public License
20
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
21
-
22
- # As a special exception to the GNU General Public License, if you
23
- # distribute this file as part of a program that contains a
24
- # configuration script generated by Autoconf, you may include it under
25
- # the same distribution terms that you use for the rest of that program.
26
-
27
- # This file is maintained in Automake, please report
28
- # bugs to <bug-automake@gnu.org> or send patches to
29
- # <automake-patches@gnu.org>.
30
-
31
- nl='
32
- '
33
-
34
- # We need space, tab and new line, in precisely that order. Quoting is
35
- # there to prevent tools from complaining about whitespace usage.
36
- IFS=" "" $nl"
37
-
38
- file_conv=
39
-
40
- # func_file_conv build_file unneeded_conversions
41
- # Convert a $build file to $host form and store it in $file
42
- # Currently only supports Windows hosts. If the determined conversion
43
- # type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
44
- # conversion will take place.
45
- func_file_conv ()
46
- {
47
- file=$1
48
- case $file in
49
- / | /[!/]*) # absolute file, and not a UNC file
50
- if test -z "$file_conv"; then
51
- # lazily determine how to convert abs files
52
- case `uname -s` in
53
- MINGW*)
54
- if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
55
- # MSYS2 environment.
56
- file_conv=cygwin
57
- else
58
- # Original MinGW environment.
59
- file_conv=mingw
60
- fi
61
- ;;
62
- MSYS*)
63
- # Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
64
- file_conv=cygwin
65
- ;;
66
- CYGWIN*)
67
- # Cygwin environment.
68
- file_conv=cygwin
69
- ;;
70
- *)
71
- file_conv=wine
72
- ;;
73
- esac
74
- fi
75
- case $file_conv/,$2, in
76
- *,$file_conv,*)
77
- # This is the optimization mentioned above:
78
- # If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
79
- ;;
80
- mingw/*)
81
- file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
82
- ;;
83
- cygwin/*)
84
- file=`cygpath -w "$file" || echo "$file"`
85
- ;;
86
- wine/*)
87
- file=`winepath -w "$file" || echo "$file"`
88
- ;;
89
- esac
90
- ;;
91
- esac
92
- }
93
-
94
- # func_cl_dashL linkdir
95
- # Make cl look for libraries in LINKDIR
96
- func_cl_dashL ()
97
- {
98
- func_file_conv "$1"
99
- if test -z "$lib_path"; then
100
- lib_path=$file
101
- else
102
- lib_path="$lib_path;$file"
103
- fi
104
- linker_opts="$linker_opts -LIBPATH:$file"
105
- }
106
-
107
- # func_cl_dashl library
108
- # Do a library search-path lookup for cl
109
- func_cl_dashl ()
110
- {
111
- lib=$1
112
- found=no
113
- save_IFS=$IFS
114
- IFS=';'
115
- for dir in $lib_path $LIB
116
- do
117
- IFS=$save_IFS
118
- if $shared && test -f "$dir/$lib.dll.lib"; then
119
- found=yes
120
- lib=$dir/$lib.dll.lib
121
- break
122
- fi
123
- if test -f "$dir/$lib.lib"; then
124
- found=yes
125
- lib=$dir/$lib.lib
126
- break
127
- fi
128
- if test -f "$dir/lib$lib.a"; then
129
- found=yes
130
- lib=$dir/lib$lib.a
131
- break
132
- fi
133
- done
134
- IFS=$save_IFS
135
-
136
- if test "$found" != yes; then
137
- lib=$lib.lib
138
- fi
139
- }
140
-
141
- # func_cl_wrapper cl arg...
142
- # Adjust compile command to suit cl
143
- func_cl_wrapper ()
144
- {
145
- # Assume a capable shell
146
- lib_path=
147
- shared=:
148
- linker_opts=
149
- for arg
150
- do
151
- if test -n "$eat"; then
152
- eat=
153
- else
154
- case $1 in
155
- -o)
156
- # configure might choose to run compile as 'compile cc -o foo foo.c'.
157
- eat=1
158
- case $2 in
159
- *.o | *.lo | *.[oO][bB][jJ])
160
- func_file_conv "$2"
161
- set x "$@" -Fo"$file"
162
- shift
163
- ;;
164
- *)
165
- func_file_conv "$2"
166
- set x "$@" -Fe"$file"
167
- shift
168
- ;;
169
- esac
170
- ;;
171
- -I)
172
- eat=1
173
- func_file_conv "$2" mingw
174
- set x "$@" -I"$file"
175
- shift
176
- ;;
177
- -I*)
178
- func_file_conv "${1#-I}" mingw
179
- set x "$@" -I"$file"
180
- shift
181
- ;;
182
- -l)
183
- eat=1
184
- func_cl_dashl "$2"
185
- set x "$@" "$lib"
186
- shift
187
- ;;
188
- -l*)
189
- func_cl_dashl "${1#-l}"
190
- set x "$@" "$lib"
191
- shift
192
- ;;
193
- -L)
194
- eat=1
195
- func_cl_dashL "$2"
196
- ;;
197
- -L*)
198
- func_cl_dashL "${1#-L}"
199
- ;;
200
- -static)
201
- shared=false
202
- ;;
203
- -Wl,*)
204
- arg=${1#-Wl,}
205
- save_ifs="$IFS"; IFS=','
206
- for flag in $arg; do
207
- IFS="$save_ifs"
208
- linker_opts="$linker_opts $flag"
209
- done
210
- IFS="$save_ifs"
211
- ;;
212
- -Xlinker)
213
- eat=1
214
- linker_opts="$linker_opts $2"
215
- ;;
216
- -*)
217
- set x "$@" "$1"
218
- shift
219
- ;;
220
- *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
221
- func_file_conv "$1"
222
- set x "$@" -Tp"$file"
223
- shift
224
- ;;
225
- *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
226
- func_file_conv "$1" mingw
227
- set x "$@" "$file"
228
- shift
229
- ;;
230
- *)
231
- set x "$@" "$1"
232
- shift
233
- ;;
234
- esac
235
- fi
236
- shift
237
- done
238
- if test -n "$linker_opts"; then
239
- linker_opts="-link$linker_opts"
240
- fi
241
- exec "$@" $linker_opts
242
- exit 1
243
- }
244
-
245
- eat=
246
-
247
- case $1 in
248
- '')
249
- echo "$0: No command. Try '$0 --help' for more information." 1>&2
250
- exit 1;
251
- ;;
252
- -h | --h*)
253
- cat <<\EOF
254
- Usage: compile [--help] [--version] PROGRAM [ARGS]
255
-
256
- Wrapper for compilers which do not understand '-c -o'.
257
- Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
258
- arguments, and rename the output as expected.
259
-
260
- If you are trying to build a whole package this is not the
261
- right script to run: please start by reading the file 'INSTALL'.
262
-
263
- Report bugs to <bug-automake@gnu.org>.
264
- GNU Automake home page: <https://www.gnu.org/software/automake/>.
265
- General help using GNU software: <https://www.gnu.org/gethelp/>.
266
- EOF
267
- exit $?
268
- ;;
269
- -v | --v*)
270
- echo "compile (GNU Automake) $scriptversion"
271
- exit $?
272
- ;;
273
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
274
- clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
275
- icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
276
- func_cl_wrapper "$@" # Doesn't return...
277
- ;;
278
- esac
279
-
280
- ofile=
281
- cfile=
282
-
283
- for arg
284
- do
285
- if test -n "$eat"; then
286
- eat=
287
- else
288
- case $1 in
289
- -o)
290
- # configure might choose to run compile as 'compile cc -o foo foo.c'.
291
- # So we strip '-o arg' only if arg is an object.
292
- eat=1
293
- case $2 in
294
- *.o | *.obj)
295
- ofile=$2
296
- ;;
297
- *)
298
- set x "$@" -o "$2"
299
- shift
300
- ;;
301
- esac
302
- ;;
303
- *.c)
304
- cfile=$1
305
- set x "$@" "$1"
306
- shift
307
- ;;
308
- *)
309
- set x "$@" "$1"
310
- shift
311
- ;;
312
- esac
313
- fi
314
- shift
315
- done
316
-
317
- if test -z "$ofile" || test -z "$cfile"; then
318
- # If no '-o' option was seen then we might have been invoked from a
319
- # pattern rule where we don't need one. That is ok -- this is a
320
- # normal compilation that the losing compiler can handle. If no
321
- # '.c' file was seen then we are probably linking. That is also
322
- # ok.
323
- exec "$@"
324
- fi
325
-
326
- # Name of file we expect compiler to create.
327
- cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
328
-
329
- # Create the lock directory.
330
- # Note: use '[/\\:.-]' here to ensure that we don't use the same name
331
- # that we are using for the .o file. Also, base the name on the expected
332
- # object file name, since that is what matters with a parallel build.
333
- lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
334
- while true; do
335
- if mkdir "$lockdir" >/dev/null 2>&1; then
336
- break
337
- fi
338
- sleep 1
339
- done
340
- # FIXME: race condition here if user kills between mkdir and trap.
341
- trap "rmdir '$lockdir'; exit 1" 1 2 15
342
-
343
- # Run the compile.
344
- "$@"
345
- ret=$?
346
-
347
- if test -f "$cofile"; then
348
- test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
349
- elif test -f "${cofile}bj"; then
350
- test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
351
- fi
352
-
353
- rmdir "$lockdir"
354
- exit $ret
355
-
356
- # Local Variables:
357
- # mode: shell-script
358
- # sh-indentation: 2
359
- # eval: (add-hook 'before-save-hook 'time-stamp nil t)
360
- # time-stamp-start: "scriptversion="
361
- # time-stamp-format: "%:y-%02m-%02d.%02H"
362
- # time-stamp-time-zone: "UTC0"
363
- # time-stamp-end: "; # UTC"
364
- # End: