Bug 1230759: Part 5 - added comments to ifdef's draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Wed, 08 Nov 2017 21:38:41 -0800
changeset 697514 2498537bdbcb8f0636840e82d97e45a23bb7d736
parent 697513 5e43eb6ec1763dec47bde53f5ab5ccc8b49e33b3
child 697515 bba786cf2c19164944558d3149be3ac31f185df9
push id89030
push userdrno@ohlmeier.org
push dateTue, 14 Nov 2017 06:38:04 +0000
bugs1230759
milestone58.0a1
Bug 1230759: Part 5 - added comments to ifdef's MozReview-Commit-ID: DRR8NOk8qTh
netwerk/srtp/src/crypto/include/datatypes.h
--- a/netwerk/srtp/src/crypto/include/datatypes.h
+++ b/netwerk/srtp/src/crypto/include/datatypes.h
@@ -269,51 +269,51 @@ void octet_string_set_to_zero(void *s, s
 /* Nothing to do. */
 #define be32_to_cpu(x) (x)
 #define be64_to_cpu(x) (x)
 #elif defined(HAVE_BYTESWAP_H)
 /* We have (hopefully) optimized versions in byteswap.h */
 #include <byteswap.h>
 #define be32_to_cpu(x) bswap_32((x))
 #define be64_to_cpu(x) bswap_64((x))
-#else
+#else /* WORDS_BIGENDIAN */
 
 #if defined(__GNUC__) && defined(HAVE_X86)
 /* Fall back. */
 static inline uint32_t be32_to_cpu(uint32_t v)
 {
     /* optimized for x86. */
     asm("bswap %0" : "=r"(v) : "0"(v));
     return v;
 }
 #else /* HAVE_X86 */
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #elif defined HAVE_WINSOCK2_H
 #include <winsock2.h>
-#endif
+#endif /* HAVE_NETINET_IN_H */
 #define be32_to_cpu(x) ntohl((x))
 #endif /* HAVE_X86 */
 
 static inline uint64_t be64_to_cpu(uint64_t v)
 {
 #ifdef NO_64BIT_MATH
     /* use the make64 functions to do 64-bit math */
     v = make64(htonl(low32(v)), htonl(high32(v)));
-#else
+#else /* NO_64BIT_MATH */
     /* use the native 64-bit math */
     v = (uint64_t)((be32_to_cpu((uint32_t)(v >> 32))) |
                    (((uint64_t)be32_to_cpu((uint32_t)v)) << 32));
-#endif
+#endif /* NO_64BIT_MATH */
     return v;
 }
 
-#endif
+#endif /* WORDS_BIGENDIAN */
 
-#endif /* WORDS_BIGENDIAN */
+#endif /* HAVE_CONFIG_H */
 
 /*
  * functions manipulating bitvector_t
  *
  * A bitvector_t consists of an array of words and an integer
  * representing the number of significant bits stored in the array.
  * The bits are packed as follows: the least significant bit is that
  * of word[0], while the most significant bit is the nth most