tor_mutex_release(&counter->mutex);
return oldval;
}
-#endif
+#endif /* !defined(HAVE_STDATOMIC_H) */
atomic_size_t val;
} atomic_counter_t;
#define ATOMIC_LINKAGE static
-#else
+#else /* !(defined(HAVE_STDATOMIC_H)) */
typedef struct atomic_counter_t {
tor_mutex_t mutex;
size_t val;
} atomic_counter_t;
#define ATOMIC_LINKAGE
-#endif
+#endif /* defined(HAVE_STDATOMIC_H) */
ATOMIC_LINKAGE void atomic_counter_init(atomic_counter_t *counter);
ATOMIC_LINKAGE void atomic_counter_destroy(atomic_counter_t *counter);
return atomic_exchange(&counter->val, newval);
}
-#else
-#endif
+#else /* !(defined(HAVE_STDATOMIC_H)) */
+#endif /* defined(HAVE_STDATOMIC_H) */
#endif /* !defined(TOR_COMPAT_THREADS_H) */
return 1;
else
return 0;
-#else
+#else /* !(defined(CHECK_LIBC_VERSION)) */
return 0;
-#endif
+#endif /* defined(CHECK_LIBC_VERSION) */
}
/** Allow a single file to be opened. If <b>use_openat</b> is true,
SCMP_CMP(1, SCMP_CMP_EQ, 0));
#else
return 0;
-#endif
+#endif /* defined(__NR_kill) */
}
/**
"given FD.");
return -1;
}
-#endif
+#endif /* defined(_WIN32) */
}
/* Load state */
config_line_t **LINELIST_V;
routerset_t **ROUTERSET;
} confparse_dummy_values_t;
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
/** An abbreviation for a configuration option allowed on the command line. */
typedef struct config_abbrev_t {
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL, { .INT=NULL } }
#define DUMMY_TYPECHECK_INSTANCE(tp) \
static tp tp ## _dummy
-#else
+#else /* !(defined(TOR_UNIT_TESTS)) */
#define CONF_TEST_MEMBERS(tp, conftype, member)
#define END_OF_CONFIG_VARS { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
/* Repeatedly declarable incomplete struct to absorb redundant semicolons */
#define DUMMY_TYPECHECK_INSTANCE(tp) \
struct tor_semicolon_eater
-#endif
+#endif /* defined(TOR_UNIT_TESTS) */
/** Type of a callback to validate whether a given configuration is
* well-formed and consistent. See options_trial_assign() for documentation
extern const char tor_git_revision[];
-#endif
+#endif /* !defined(TOR_GIT_REVISION_H) */
const curve25519_public_key_t *server_pk,
const hs_ntor_rend_cell_keys_t *keys);
-#endif
+#endif /* defined(HS_CIRCUIT_PRIVATE) */
#endif /* !defined(TOR_HS_CIRCUIT_H) */
log_notice(LD_GENERAL, "%s", rust_str);
}
tor_free(rust_str);
-#endif
+#endif /* defined(HAVE_RUST) */
if (network_init()<0) {
log_err(LD_BUG,"Error initializing network; exiting.");
}
}
-#endif
+#endif /* !defined(HAVE_RUST) */
STATIC int str_to_protocol_type(const char *s, protocol_type_t *pr_out);
STATIC void proto_entry_free(proto_entry_t *entry);
-#endif
+#endif /* !defined(HAVE_RUST) && defined(TOR_UNIT_TESTS) */
#endif /* defined(PROTOVER_PRIVATE) */
/* Define for compatibility, used in main.c */
void protover_free_all(void) {}
-#endif
+#endif /* defined(HAVE_RUST) */
char **argv;
};
-#endif
+#endif /* !defined(TOR_API_INTERNAL_H) */