1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Switch from exit(1) to abort() in assert_success

This commit is contained in:
Tobias Bergkvist 2021-12-01 22:56:18 +01:00
parent 4e55d34535
commit 97d62a90f5
6 changed files with 6 additions and 6 deletions

View file

@ -138,7 +138,7 @@ makeCWrapper() {
[ -z "$uses_concat3" ] || printf '%s\n' "#include <string.h>"
[ -z "$uses_assert" ] || printf '%s\n' "#include <assert.h>"
[ -z "$uses_assert_success" ] || printf '%s\n' "#include <stdio.h>"
[ -z "$uses_assert_success" ] || printf '\n%s\n' "#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)"
[ -z "$uses_assert_success" ] || printf '\n%s\n' "#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)"
[ -z "$uses_concat3" ] || printf '\n%s\n' "$(concat3Fn)"
[ -z "$uses_prefix" ] || printf '\n%s\n' "$(setEnvPrefixFn)"
[ -z "$uses_suffix" ] || printf '\n%s\n' "$(setEnvSuffixFn)"

View file

@ -12,7 +12,7 @@
#include <assert.h>
#include <stdio.h>
#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
char *concat3(char *x, char *y, char *z) {
int xn = strlen(x);

View file

@ -8,7 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
int main(int argc, char **argv) {
putenv("PART1=HELLO");

View file

@ -6,7 +6,7 @@
#include <stdlib.h>
#include <stdio.h>
#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
int main(int argc, char **argv) {
putenv("==TEST1");

View file

@ -8,7 +8,7 @@
#include <assert.h>
#include <stdio.h>
#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
char *concat3(char *x, char *y, char *z) {
int xn = strlen(x);

View file

@ -8,7 +8,7 @@
#include <assert.h>
#include <stdio.h>
#define assert_success(e) do { if ((e) < 0) { perror(#e); exit(1); } } while (0)
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
char *concat3(char *x, char *y, char *z) {
int xn = strlen(x);