Skip to content

Commit e87f490

Browse files
committed
remove code duplication between android_stubs.h and linux_stubs.h, whitespace
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
1 parent 4339056 commit e87f490

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

src/shims/android_stubs.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,4 @@
1616
#ifndef __DISPATCH__ANDROID__STUBS__INTERNAL
1717
#define __DISPATCH__ANDROID__STUBS__INTERNAL
1818

19-
/*
20-
* Missing sys/queue.h macro stubs
21-
*/
22-
23-
#ifndef TAILQ_FOREACH_SAFE
24-
# define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
25-
for ((var) = TAILQ_FIRST((head)); \
26-
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
27-
(var) = (tvar))
28-
#endif /* TAILQ_FOREACH_SAFE */
29-
30-
#if DISPATCH_DEBUG
31-
#ifndef TRASHIT
32-
# define TRASHIT(x) do {(x) = (void *)-1;} while (0)
33-
#endif /* TRASHIT */
34-
#endif
35-
3619
#endif /* __DISPATCH__ANDROID__STUBS__INTERNAL */

src/shims/linux_stubs.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define __DISPATCH__STUBS__INTERNAL
1818

1919
#ifndef TAILQ_FOREACH_SAFE
20-
#define TAILQ_FOREACH_SAFE(var, head, field, temp) \
20+
#define TAILQ_FOREACH_SAFE(var, head, field, temp) \
2121
for ((var) = TAILQ_FIRST((head)); \
2222
(var) && ((temp) = TAILQ_NEXT((var), field), 1); (var) = (temp))
2323
#endif
@@ -70,7 +70,9 @@ typedef void (*dispatch_mach_handler_function_t)(void*, dispatch_mach_reason_t,
7070
typedef void (*dispatch_mach_msg_destructor_t)(void*);
7171

7272
// Print a warning when an unported code path executes.
73-
#define LINUX_PORT_ERROR() do { printf("LINUX_PORT_ERROR_CALLED %s:%d: %s\n",__FILE__,__LINE__,__FUNCTION__); } while (0)
73+
#define LINUX_PORT_ERROR() do { \
74+
printf("LINUX_PORT_ERROR_CALLED %s:%d: %s\n",\
75+
__FILE__,__LINE__,__FUNCTION__); } while (0)
7476

7577
/*
7678
* Stub out defines for other missing types

0 commit comments

Comments
 (0)