diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.in | 6 | ||||
-rw-r--r-- | regress/misc/sk-dummy/fatal.c | 20 |
3 files changed, 26 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 108241389..6577c0df6 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -11,6 +11,8 @@ opensshd.init | |||
11 | survey.sh | 11 | survey.sh |
12 | **/*.0 | 12 | **/*.0 |
13 | **/*.o | 13 | **/*.o |
14 | **/*.lo | ||
15 | **/*.so | ||
14 | **/*.out | 16 | **/*.out |
15 | **/*.a | 17 | **/*.a |
16 | autom4te.cache/ | 18 | autom4te.cache/ |
diff --git a/Makefile.in b/Makefile.in index d47b08345..692b00732 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -242,7 +242,7 @@ moduli: | |||
242 | echo | 242 | echo |
243 | 243 | ||
244 | clean: regressclean | 244 | clean: regressclean |
245 | rm -f *.o *.a $(TARGETS) logintest config.cache config.log | 245 | rm -f *.o *.lo *.a $(TARGETS) logintest config.cache config.log |
246 | rm -f *.out core survey | 246 | rm -f *.out core survey |
247 | rm -f regress/check-perm$(EXEEXT) | 247 | rm -f regress/check-perm$(EXEEXT) |
248 | rm -f regress/mkdtemp$(EXEEXT) | 248 | rm -f regress/mkdtemp$(EXEEXT) |
@@ -267,6 +267,7 @@ clean: regressclean | |||
267 | rm -f regress/misc/kexfuzz/*.o | 267 | rm -f regress/misc/kexfuzz/*.o |
268 | rm -f regress/misc/kexfuzz/kexfuzz$(EXEEXT) | 268 | rm -f regress/misc/kexfuzz/kexfuzz$(EXEEXT) |
269 | rm -f regress/misc/sk-dummy/*.o | 269 | rm -f regress/misc/sk-dummy/*.o |
270 | rm -f regress/misc/sk-dummy/*.lo | ||
270 | rm -f regress/misc/sk-dummy/sk-dummy.so | 271 | rm -f regress/misc/sk-dummy/sk-dummy.so |
271 | (cd openbsd-compat && $(MAKE) clean) | 272 | (cd openbsd-compat && $(MAKE) clean) |
272 | 273 | ||
@@ -596,9 +597,10 @@ regress/misc/kexfuzz/kexfuzz$(EXEEXT): ${MISC_KEX_FUZZ_OBJS} libssh.a | |||
596 | # These all need to be compiled -fPIC, so they are treated differently. | 597 | # These all need to be compiled -fPIC, so they are treated differently. |
597 | SK_DUMMY_OBJS=\ | 598 | SK_DUMMY_OBJS=\ |
598 | regress/misc/sk-dummy/sk-dummy.lo \ | 599 | regress/misc/sk-dummy/sk-dummy.lo \ |
600 | regress/misc/sk-dummy/fatal.lo \ | ||
599 | ed25519.lo hash.lo ge25519.lo fe25519.lo sc25519.lo verify.lo | 601 | ed25519.lo hash.lo ge25519.lo fe25519.lo sc25519.lo verify.lo |
600 | 602 | ||
601 | .c.lo: | 603 | .c.lo: Makefile.in config.h |
602 | $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@ | 604 | $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@ |
603 | 605 | ||
604 | regress/misc/sk-dummy/sk-dummy.so: $(SK_DUMMY_OBJS) | 606 | regress/misc/sk-dummy/sk-dummy.so: $(SK_DUMMY_OBJS) |
diff --git a/regress/misc/sk-dummy/fatal.c b/regress/misc/sk-dummy/fatal.c new file mode 100644 index 000000000..7cdc74b97 --- /dev/null +++ b/regress/misc/sk-dummy/fatal.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* public domain */ | ||
2 | |||
3 | #include <stdlib.h> | ||
4 | #include <stdio.h> | ||
5 | #include <stdarg.h> | ||
6 | #include <unistd.h> | ||
7 | |||
8 | void fatal(char *fmt, ...); | ||
9 | |||
10 | void | ||
11 | fatal(char *fmt, ...) | ||
12 | { | ||
13 | va_list ap; | ||
14 | |||
15 | va_start(ap, fmt); | ||
16 | vfprintf(stderr, fmt, ap); | ||
17 | va_end(ap); | ||
18 | fputc('\n', stderr); | ||
19 | _exit(1); | ||
20 | } | ||