You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/15 10:28:13 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6856: libc/crc: Add full suffix to avoid the the penitential symbol collision

xiaoxiang781216 commented on code in PR #6856:
URL: https://github.com/apache/incubator-nuttx/pull/6856#discussion_r945599775


##########
include/nuttx/crc8.h:
##########
@@ -28,6 +28,14 @@
 #include <sys/types.h>
 #include <stdint.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Append full suffix to avoid the penitential symbol collision */
+
+#define crc8   crc8full

Review Comment:
   > 1. why not rename function instead?
   
   To avoid modify the caller
   
   > 2. why not resolve collision at third party side?
   
   It's hard to modify other widely used library(e.g. zlib: https://github.com/madler/zlib/blob/master/zlib.h#L1727)
   
   > 3. is `#define crc8ccitt crc8ccittfull` needed?
   
   The possibility of conflict is small for crc8ccitt.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org