Only use exit(77) in configure builds

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2016-01-26 17:55:39 -08:00
parent e0ce90ea0a
commit ac796d3f9a
5 changed files with 47 additions and 10 deletions

View File

@@ -30,6 +30,16 @@
# include "../../png.h"
#endif
/* 1.6.1 added support for the configure test harness, which uses 77 to indicate
* a skipped test, in earlier versions we need to succeed on a skipped test, so:
*/
#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H)
# define SKIP 77
#else
# define SKIP 0
#endif
/* Since this program tests the ability to change the unknown chunk handling
* these must be defined:
*/
@@ -1260,7 +1270,7 @@ main(void)
fprintf(stderr,
" test ignored: no support to find out about unknown chunks\n");
/* So the test is skipped: */
return 77;
return SKIP;
}
#endif /* READ_USER_CHUNKS || SAVE_UNKNOWN_CHUNKS */
@@ -1271,6 +1281,6 @@ main(void)
fprintf(stderr,
" test ignored: no support to modify unknown chunk handling\n");
/* So the test is skipped: */
return 77;
return SKIP;
}
#endif /* SET_UNKNOWN_CHUNKS && READ*/