Skip to content

Commit 6ffa232

Browse files
committed
convert to preprocessor directives
1 parent d3301a3 commit 6ffa232

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3922,10 +3922,11 @@ INTERCEPTOR(SIZE_T, wcrtomb, char *dest, wchar_t src, void *ps) {
39223922
if (res != ((SIZE_T)-1)) {
39233923
CHECK_LE(res, sizeof(local_dest));
39243924
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3925-
if (!SANITIZER_AIX)
3925+
#if !SANITIZER_AIX
39263926
REAL(memcpy)(dest, local_dest, res);
3927-
else
3927+
#else
39283928
internal_memcpy(dest, local_dest, res);
3929+
#endif
39293930
}
39303931
return res;
39313932
}
@@ -3947,10 +3948,11 @@ INTERCEPTOR(int, wctomb, char *dest, wchar_t src) {
39473948
if (res != -1) {
39483949
CHECK_LE(res, sizeof(local_dest));
39493950
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3950-
if (!SANITIZER_AIX)
3951+
#if !SANITIZER_AIX
39513952
REAL(memcpy)(dest, local_dest, res);
3952-
else
3953+
#else
39533954
internal_memcpy(dest, local_dest, res);
3955+
#endif
39543956
}
39553957
return res;
39563958
}

0 commit comments

Comments
 (0)