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:
parent
4e55d34535
commit
97d62a90f5
|
@ -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)"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue