]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
re-run ./scripts/maint/annotate_ifdef_directives
authorNick Mathewson <nickm@torproject.org>
Tue, 21 Nov 2017 19:07:43 +0000 (14:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 21 Nov 2017 19:07:43 +0000 (14:07 -0500)
12 files changed:
src/common/compat_threads.c
src/common/compat_threads.h
src/common/sandbox.c
src/or/config.c
src/or/confparse.h
src/or/git_revision.h
src/or/hs_circuit.h
src/or/main.c
src/or/protover.c
src/or/protover.h
src/or/protover_rust.c
src/or/tor_api_internal.h

index e8a97f125429ff755ccf43f9502d3aa796d39ab9..6adcaab95659264d7c5aa260c8fced422b2817cb 100644 (file)
@@ -403,5 +403,5 @@ atomic_counter_exchange(atomic_counter_t *counter, size_t newval)
   tor_mutex_release(&counter->mutex);
   return oldval;
 }
-#endif
+#endif /* !defined(HAVE_STDATOMIC_H) */
 
index b452648ea5a497fbe1b9d92ff7d2d61b07b0c14d..ce86b15e9d9144ee7eccab37fa7a2eff3e08c619 100644 (file)
@@ -159,13 +159,13 @@ typedef struct atomic_counter_t {
   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);
@@ -214,8 +214,8 @@ atomic_counter_exchange(atomic_counter_t *counter, size_t newval)
   return atomic_exchange(&counter->val, newval);
 }
 
-#else
-#endif
+#else /* !(defined(HAVE_STDATOMIC_H)) */
+#endif /* defined(HAVE_STDATOMIC_H) */
 
 #endif /* !defined(TOR_COMPAT_THREADS_H) */
 
index 92fdd60221aec6c38e52d9014a84cf57b4e78c30..aec9857e94dbf9a209eff07c3da5b333660e1993 100644 (file)
@@ -429,9 +429,9 @@ libc_uses_openat_for_everything(void)
     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,
@@ -1126,7 +1126,7 @@ sb_kill(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
        SCMP_CMP(1, SCMP_CMP_EQ, 0));
 #else
   return 0;
-#endif
+#endif /* defined(__NR_kill) */
 }
 
 /**
index b0a140d23bf7afb52db74e172b45c81efa21f462..f7383c89fa61cbdc0cb2b710b36fcc1480f7a4a2 100644 (file)
@@ -1787,7 +1787,7 @@ options_act(const or_options_t *old_options)
                "given FD.");
       return -1;
     }
-#endif
+#endif /* defined(_WIN32) */
   }
 
   /* Load state */
index 6f0b3b325c24cbcb3faaa2fdc501f24008f3bc5f..022886e811c50994c483f97dc083bd2c03c98400 100644 (file)
@@ -68,7 +68,7 @@ typedef union {
   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 {
@@ -132,13 +132,13 @@ typedef struct config_var_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
index 1ceaeedf16990e4c9f79598f76d783f74d94446a..5613cb4335f0b03b8b0d52d150e10ab949a27a00 100644 (file)
@@ -8,5 +8,5 @@
 
 extern const char tor_git_revision[];
 
-#endif
+#endif /* !defined(TOR_GIT_REVISION_H) */
 
index 0a1186dbaac0e938c4fe5cc84a4070b7d012cbff..b92fb4e494e8453899fd816e731602b631316308 100644 (file)
@@ -67,7 +67,7 @@ create_rp_circuit_identifier(const hs_service_t *service,
                              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) */
 
index e349703918f075af95bdeaa7b9f01042d34fe213..dd7b0134eedbb53c993e357fc4476a79542881d2 100644 (file)
@@ -3207,7 +3207,7 @@ tor_init(int argc, char *argv[])
     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.");
index ae955296e68a53b67a6f5479211a0970d5ef9002..d6d14b24a2ab89c8685a356e37d5137cbe468ab2 100644 (file)
@@ -778,5 +778,5 @@ protover_free_all(void)
   }
 }
 
-#endif
+#endif /* !defined(HAVE_RUST) */
 
index a4dbc8bfc27d7a3403763ff4e7c50d433d4baa86..83a728e626b07960c3c7f5322734322e819482ad 100644 (file)
@@ -84,7 +84,7 @@ STATIC const char *protocol_type_to_str(protocol_type_t pr);
 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) */
 
index 0c409b1681156efd3b170500a5997ddeb95413c1..26e21cc1c5ec2cc34d845d16d561a906875a965e 100644 (file)
@@ -15,5 +15,5 @@
 /* Define for compatibility, used in main.c */
 void protover_free_all(void) {}
 
-#endif
+#endif /* defined(HAVE_RUST) */
 
index a69ba76420fbc39052ae1ab7263f28f1d22307fc..10b6278b7b37c5fafb6e75002598fdbce8aa6431 100644 (file)
@@ -16,5 +16,5 @@ struct tor_main_configuration_t {
   char **argv;
 };
 
-#endif
+#endif /* !defined(TOR_API_INTERNAL_H) */