diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-04-21 18:25:36 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-04-21 18:25:36 +0200 |
commit | e3866c8f09e173e7d36cce25015ecfbd666cd5bc (patch) | |
tree | 9eabafeac99f0fcc7a96a83b375b04c72f6ca43f /src | |
parent | 6bda628f704707ab92b17c4006a4a8fcf6bd48dd (diff) | |
download | gnunet-e3866c8f09e173e7d36cce25015ecfbd666cd5bc.tar.gz gnunet-e3866c8f09e173e7d36cce25015ecfbd666cd5bc.zip |
update API for cleanup of handle
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_revocation_service.h | 7 | ||||
-rw-r--r-- | src/revocation/gnunet-revocation.c | 3 | ||||
-rw-r--r-- | src/revocation/revocation_api.c | 29 | ||||
-rw-r--r-- | src/revocation/test_revocation.c | 2 | ||||
-rwxr-xr-x | src/transport/test_communicator_basic-udp | 228 |
5 files changed, 250 insertions, 19 deletions
diff --git a/src/include/gnunet_revocation_service.h b/src/include/gnunet_revocation_service.h index 394f561dc..9a8918b43 100644 --- a/src/include/gnunet_revocation_service.h +++ b/src/include/gnunet_revocation_service.h | |||
@@ -244,13 +244,14 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc); | |||
244 | 244 | ||
245 | 245 | ||
246 | /** | 246 | /** |
247 | * Cleanup a PoW calculation | 247 | * Stop a PoW calculation |
248 | * | 248 | * |
249 | * @param pc the calculation to clean up | 249 | * @param pc the calculation to clean up |
250 | * @return #GNUNET_YES if pow valid, #GNUNET_NO if pow was set but is not | ||
251 | * valid | ||
250 | */ | 252 | */ |
251 | void | 253 | void |
252 | GNUNET_REVOCATION_pow_cleanup ( | 254 | GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc); |
253 | struct GNUNET_REVOCATION_PowCalculationHandle *pc); | ||
254 | 255 | ||
255 | #if 0 /* keep Emacsens' auto-indent happy */ | 256 | #if 0 /* keep Emacsens' auto-indent happy */ |
256 | { | 257 | { |
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c index 2c46a20e7..de9560172 100644 --- a/src/revocation/gnunet-revocation.c +++ b/src/revocation/gnunet-revocation.c | |||
@@ -250,7 +250,8 @@ calculate_pow_shutdown (void *cls) | |||
250 | GNUNET_SCHEDULER_cancel (pow_task); | 250 | GNUNET_SCHEDULER_cancel (pow_task); |
251 | pow_task = NULL; | 251 | pow_task = NULL; |
252 | } | 252 | } |
253 | GNUNET_REVOCATION_pow_cleanup (ph); | 253 | if (NULL != ph) |
254 | GNUNET_REVOCATION_pow_stop (ph); | ||
254 | } | 255 | } |
255 | 256 | ||
256 | 257 | ||
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 5494f379c..18a312ab8 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -320,16 +320,16 @@ GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
320 | "REVOCATION", | 320 | "REVOCATION", |
321 | "WORKBITS", | 321 | "WORKBITS", |
322 | &matching_bits))) | 322 | &matching_bits))) |
323 | { | 323 | { |
324 | GNUNET_break (0); | 324 | GNUNET_break (0); |
325 | GNUNET_free (h); | 325 | GNUNET_free (h); |
326 | return NULL; | 326 | return NULL; |
327 | } | 327 | } |
328 | if ((GNUNET_OK != | 328 | if ((GNUNET_OK != |
329 | GNUNET_CONFIGURATION_get_value_time (cfg, | 329 | GNUNET_CONFIGURATION_get_value_time (cfg, |
330 | "REVOCATION", | 330 | "REVOCATION", |
331 | "EPOCH_DURATION", | 331 | "EPOCH_DURATION", |
332 | &epoch_duration))) | 332 | &epoch_duration))) |
333 | { | 333 | { |
334 | GNUNET_break (0); | 334 | GNUNET_break (0); |
335 | GNUNET_free (h); | 335 | GNUNET_free (h); |
@@ -345,7 +345,6 @@ GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
345 | } | 345 | } |
346 | 346 | ||
347 | 347 | ||
348 | |||
349 | h->mq = GNUNET_CLIENT_connect (cfg, | 348 | h->mq = GNUNET_CLIENT_connect (cfg, |
350 | "revocation", | 349 | "revocation", |
351 | handlers, | 350 | handlers, |
@@ -454,8 +453,8 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_Pow *pow, | |||
454 | spurp.timestamp = pow->timestamp; | 453 | spurp.timestamp = pow->timestamp; |
455 | spurp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); | 454 | spurp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); |
456 | spurp.purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) | 455 | spurp.purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) |
457 | + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) | 456 | + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) |
458 | + sizeof (struct GNUNET_TIME_AbsoluteNBO)); | 457 | + sizeof (struct GNUNET_TIME_AbsoluteNBO)); |
459 | if (GNUNET_OK != | 458 | if (GNUNET_OK != |
460 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION, | 459 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION, |
461 | &spurp.purpose, | 460 | &spurp.purpose, |
@@ -555,8 +554,8 @@ GNUNET_REVOCATION_pow_init (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
555 | rp.timestamp = pow->timestamp; | 554 | rp.timestamp = pow->timestamp; |
556 | rp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); | 555 | rp.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_REVOCATION); |
557 | rp.purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) | 556 | rp.purpose.size = htonl (sizeof(struct GNUNET_CRYPTO_EccSignaturePurpose) |
558 | + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) | 557 | + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey) |
559 | + sizeof (struct GNUNET_TIME_AbsoluteNBO)); | 558 | + sizeof (struct GNUNET_TIME_AbsoluteNBO)); |
560 | GNUNET_CRYPTO_ecdsa_key_get_public (key, &pow->key); | 559 | GNUNET_CRYPTO_ecdsa_key_get_public (key, &pow->key); |
561 | rp.key = pow->key; | 560 | rp.key = pow->key; |
562 | GNUNET_assert (GNUNET_OK == | 561 | GNUNET_assert (GNUNET_OK == |
@@ -577,8 +576,8 @@ GNUNET_REVOCATION_pow_init (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
577 | */ | 576 | */ |
578 | struct GNUNET_REVOCATION_PowCalculationHandle* | 577 | struct GNUNET_REVOCATION_PowCalculationHandle* |
579 | GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_Pow *pow, | 578 | GNUNET_REVOCATION_pow_start (struct GNUNET_REVOCATION_Pow *pow, |
580 | int epochs, | 579 | int epochs, |
581 | unsigned int difficulty) | 580 | unsigned int difficulty) |
582 | { | 581 | { |
583 | struct GNUNET_REVOCATION_PowCalculationHandle *pc; | 582 | struct GNUNET_REVOCATION_PowCalculationHandle *pc; |
584 | 583 | ||
@@ -651,15 +650,17 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc) | |||
651 | 650 | ||
652 | 651 | ||
653 | /** | 652 | /** |
654 | * Cleanup a PoW calculation | 653 | * Stop a PoW calculation |
655 | * | 654 | * |
656 | * @param pc the calculation to clean up | 655 | * @param pc the calculation to clean up |
656 | * @return #GNUNET_YES if pow valid, #GNUNET_NO if pow was set but is not | ||
657 | * valid | ||
657 | */ | 658 | */ |
658 | void | 659 | void |
659 | GNUNET_REVOCATION_pow_cleanup (struct | 660 | GNUNET_REVOCATION_pow_stop (struct GNUNET_REVOCATION_PowCalculationHandle *pc) |
660 | GNUNET_REVOCATION_PowCalculationHandle *pc) | ||
661 | { | 661 | { |
662 | GNUNET_free (pc); | 662 | GNUNET_free (pc); |
663 | } | 663 | } |
664 | 664 | ||
665 | |||
665 | /* end of revocation_api.c */ | 666 | /* end of revocation_api.c */ |
diff --git a/src/revocation/test_revocation.c b/src/revocation/test_revocation.c index a7de15a3f..f193d5f6c 100644 --- a/src/revocation/test_revocation.c +++ b/src/revocation/test_revocation.c | |||
@@ -187,7 +187,7 @@ ego_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego) | |||
187 | &proof_of_work, | 187 | &proof_of_work, |
188 | &revocation_cb, | 188 | &revocation_cb, |
189 | NULL); | 189 | NULL); |
190 | GNUNET_REVOCATION_pow_cleanup (testpeers[1].pow); | 190 | GNUNET_REVOCATION_pow_stop (testpeers[1].pow); |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
diff --git a/src/transport/test_communicator_basic-udp b/src/transport/test_communicator_basic-udp new file mode 100755 index 000000000..c8e2c5e1e --- /dev/null +++ b/src/transport/test_communicator_basic-udp | |||
@@ -0,0 +1,228 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # test_communicator_basic-udp - temporary wrapper script for .libs/test_communicator_basic-udp | ||
4 | # Generated by libtool (GNU libtool) 2.4.6.44-b9b4-dirty | ||
5 | # | ||
6 | # The test_communicator_basic-udp program cannot be directly executed until all the libtool | ||
7 | # libraries that it depends on are installed. | ||
8 | # | ||
9 | # This wrapper script should never be moved out of the build directory. | ||
10 | # If it is, it will not operate correctly. | ||
11 | |||
12 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
13 | # metacharacters that are still active within double-quoted strings. | ||
14 | sed_quote_subst='s|\([`"$\\]\)|\\\1|g' | ||
15 | |||
16 | # Be Bourne compatible | ||
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | ||
18 | emulate sh | ||
19 | NULLCMD=: | ||
20 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | ||
21 | # is contrary to our usage. Disable this feature. | ||
22 | alias -g '${1+"$@"}'='"$@"' | ||
23 | setopt NO_GLOB_SUBST | ||
24 | else | ||
25 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac | ||
26 | fi | ||
27 | BIN_SH=xpg4; export BIN_SH # for Tru64 | ||
28 | DUALCASE=1; export DUALCASE # for MKS sh | ||
29 | |||
30 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
31 | # if CDPATH is set. | ||
32 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | ||
33 | |||
34 | relink_command="(cd /home/schanzen/dev/gnunet/src/transport; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/local/sbin:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/home/schanzen/software/bin; export PATH; clang -fno-strict-aliasing -Wall -g -O2 -Wno-address-of-packed-member -Wl,--unresolved-symbols=report-all -o \$progdir/\$file test_communicator_basic.o ./.libs/libgnunettransporttesting2.so /home/schanzen/dev/gnunet/src/transport/.libs/libgnunettransport.so /home/schanzen/dev/gnunet/src/ats/.libs/libgnunetats.so /home/schanzen/dev/gnunet/src/hello/.libs/libgnunethello.so ../../src/testing/.libs/libgnunettesting.so /home/schanzen/dev/gnunet/src/arm/.libs/libgnunetarm.so /home/schanzen/dev/gnunet/src/util/.libs/libgnunetutil.so ../../src/util/.libs/libgnunetutil.so -latomic -lgcrypt -lgpg-error -lltdl -lidn2 -lz -lunistring -lm -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/transport/.libs -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/ats/.libs -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/hello/.libs -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/testing/.libs -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/arm/.libs -Wl,-rpath -Wl,/home/schanzen/dev/gnunet/src/util/.libs -Wl,-rpath -Wl,/home/schanzen/software/lib)" | ||
35 | |||
36 | # This environment variable determines our operation mode. | ||
37 | if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then | ||
38 | # install mode needs the following variables: | ||
39 | generated_by_libtool_version='2.4.6.44-b9b4-dirty' | ||
40 | notinst_deplibs=' libgnunettransporttesting2.la /home/schanzen/dev/gnunet/src/transport/libgnunettransport.la /home/schanzen/dev/gnunet/src/ats/libgnunetats.la /home/schanzen/dev/gnunet/src/hello/libgnunethello.la ../../src/testing/libgnunettesting.la /home/schanzen/dev/gnunet/src/arm/libgnunetarm.la /home/schanzen/dev/gnunet/src/util/libgnunetutil.la ../../src/util/libgnunetutil.la' | ||
41 | else | ||
42 | # When we are sourced in execute mode, $file and $ECHO are already set. | ||
43 | if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then | ||
44 | file="$0" | ||
45 | |||
46 | # A function that is used when there is no print builtin or printf. | ||
47 | func_fallback_echo () | ||
48 | { | ||
49 | eval 'cat <<_LTECHO_EOF | ||
50 | $1 | ||
51 | _LTECHO_EOF' | ||
52 | } | ||
53 | ECHO="printf %s\\n" | ||
54 | fi | ||
55 | |||
56 | # Very basic option parsing. These options are (a) specific to | ||
57 | # the libtool wrapper, (b) are identical between the wrapper | ||
58 | # /script/ and the wrapper /executable/ that is used only on | ||
59 | # windows platforms, and (c) all begin with the string --lt- | ||
60 | # (application programs are unlikely to have options that match | ||
61 | # this pattern). | ||
62 | # | ||
63 | # There are only two supported options: --lt-debug and | ||
64 | # --lt-dump-script. There is, deliberately, no --lt-help. | ||
65 | # | ||
66 | # The first argument to this parsing function should be the | ||
67 | # script's ../../libtool value, followed by no. | ||
68 | lt_option_debug= | ||
69 | func_parse_lt_options () | ||
70 | { | ||
71 | lt_script_arg0=$0 | ||
72 | shift | ||
73 | for lt_opt | ||
74 | do | ||
75 | case "$lt_opt" in | ||
76 | --lt-debug) lt_option_debug=1 ;; | ||
77 | --lt-dump-script) | ||
78 | lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` | ||
79 | test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. | ||
80 | lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` | ||
81 | cat "$lt_dump_D/$lt_dump_F" | ||
82 | exit 0 | ||
83 | ;; | ||
84 | --lt-*) | ||
85 | $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 | ||
86 | exit 1 | ||
87 | ;; | ||
88 | esac | ||
89 | done | ||
90 | |||
91 | # Print the debug banner immediately: | ||
92 | if test -n "$lt_option_debug"; then | ||
93 | echo "test_communicator_basic-udp:test_communicator_basic-udp:$LINENO: libtool wrapper (GNU libtool) 2.4.6.44-b9b4-dirty" 1>&2 | ||
94 | fi | ||
95 | } | ||
96 | |||
97 | # Used when --lt-debug. Prints its arguments to stdout | ||
98 | # (redirection is the responsibility of the caller) | ||
99 | func_lt_dump_args () | ||
100 | { | ||
101 | lt_dump_args_N=1; | ||
102 | for lt_arg | ||
103 | do | ||
104 | $ECHO "test_communicator_basic-udp:test_communicator_basic-udp:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" | ||
105 | lt_dump_args_N=`expr $lt_dump_args_N + 1` | ||
106 | done | ||
107 | } | ||
108 | |||
109 | # Core function for launching the target application | ||
110 | func_exec_program_core () | ||
111 | { | ||
112 | |||
113 | if test -n "$lt_option_debug"; then | ||
114 | $ECHO "test_communicator_basic-udp:test_communicator_basic-udp:$LINENO: newargv[0]: $progdir/$program" 1>&2 | ||
115 | func_lt_dump_args ${1+"$@"} 1>&2 | ||
116 | fi | ||
117 | exec "$progdir/$program" ${1+"$@"} | ||
118 | |||
119 | $ECHO "$0: cannot exec $program $*" 1>&2 | ||
120 | exit 1 | ||
121 | } | ||
122 | |||
123 | # A function to encapsulate launching the target application | ||
124 | # Strips options in the --lt-* namespace from $@ and | ||
125 | # launches target application with the remaining arguments. | ||
126 | func_exec_program () | ||
127 | { | ||
128 | case " $* " in | ||
129 | *\ --lt-*) | ||
130 | for lt_wr_arg | ||
131 | do | ||
132 | case $lt_wr_arg in | ||
133 | --lt-*) ;; | ||
134 | *) set x "$@" "$lt_wr_arg"; shift;; | ||
135 | esac | ||
136 | shift | ||
137 | done ;; | ||
138 | esac | ||
139 | func_exec_program_core ${1+"$@"} | ||
140 | } | ||
141 | |||
142 | # Parse options | ||
143 | func_parse_lt_options "$0" ${1+"$@"} | ||
144 | |||
145 | # Find the directory that this script lives in. | ||
146 | thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` | ||
147 | test "x$thisdir" = "x$file" && thisdir=. | ||
148 | |||
149 | # Follow symbolic links until we get to the real thisdir. | ||
150 | file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` | ||
151 | while test -n "$file"; do | ||
152 | destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` | ||
153 | |||
154 | # If there was a directory component, then change thisdir. | ||
155 | if test "x$destdir" != "x$file"; then | ||
156 | case "$destdir" in | ||
157 | [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; | ||
158 | *) thisdir="$thisdir/$destdir" ;; | ||
159 | esac | ||
160 | fi | ||
161 | |||
162 | file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` | ||
163 | file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` | ||
164 | done | ||
165 | |||
166 | # Usually 'no', except on cygwin/mingw when embedded into | ||
167 | # the cwrapper. | ||
168 | WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no | ||
169 | if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then | ||
170 | # special case for '.' | ||
171 | if test "$thisdir" = "."; then | ||
172 | thisdir=`pwd` | ||
173 | fi | ||
174 | # remove .libs from thisdir | ||
175 | case "$thisdir" in | ||
176 | *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; | ||
177 | .libs ) thisdir=. ;; | ||
178 | esac | ||
179 | fi | ||
180 | |||
181 | # Try to get the absolute directory name. | ||
182 | absdir=`cd "$thisdir" && pwd` | ||
183 | test -n "$absdir" && thisdir="$absdir" | ||
184 | |||
185 | program=lt-'test_communicator_basic-udp' | ||
186 | progdir="$thisdir/.libs" | ||
187 | |||
188 | if test ! -f "$progdir/$program" || | ||
189 | { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /usr/bin/sed 1q`; \ | ||
190 | test "X$file" != "X$progdir/$program"; }; then | ||
191 | |||
192 | file="$$-$program" | ||
193 | |||
194 | if test ! -d "$progdir"; then | ||
195 | mkdir "$progdir" | ||
196 | else | ||
197 | rm -f "$progdir/$file" | ||
198 | fi | ||
199 | |||
200 | # relink executable if necessary | ||
201 | if test -n "$relink_command"; then | ||
202 | if relink_command_output=`eval $relink_command 2>&1`; then : | ||
203 | else | ||
204 | $ECHO "$relink_command_output" >&2 | ||
205 | rm -f "$progdir/$file" | ||
206 | exit 1 | ||
207 | fi | ||
208 | fi | ||
209 | |||
210 | mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || | ||
211 | { rm -f "$progdir/$program"; | ||
212 | mv -f "$progdir/$file" "$progdir/$program"; } | ||
213 | rm -f "$progdir/$file" | ||
214 | fi | ||
215 | |||
216 | if test -f "$progdir/$program"; then | ||
217 | if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then | ||
218 | # Run the actual program with our arguments. | ||
219 | func_exec_program ${1+"$@"} | ||
220 | fi | ||
221 | else | ||
222 | # The program doesn't exist. | ||
223 | $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 | ||
224 | $ECHO "This script is just a wrapper for $program." 1>&2 | ||
225 | $ECHO "See the libtool documentation for more information." 1>&2 | ||
226 | exit 1 | ||
227 | fi | ||
228 | fi | ||