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 2020/12/12 14:31:58 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2488: crypto/arc4random: rename getrandom to arc4random_buf

xiaoxiang781216 edited a comment on pull request #2488:
URL: https://github.com/apache/incubator-nuttx/pull/2488#issuecomment-743764060


   > > Have you checked, if the FreeBSD and Linux versions are different from each other in some subtle way? We cannot completely ignore Solaris precedent (and others who might have implemented getrandom()), as people might port Solaris code to NuttX as well.
   > 
   > See my thoughts above about introducing some kind of CONFIG_COMPAT_LINUX, CONFIG_COMPAT_BSD options. The idea is: if none of these options are activated, NuttX will only be Posix. If CONFIG_COMPAT_LINUX, that activates some linux compatibility interfaces. If there is a question which version of an interface should be used, the CONFIG_COMPAT_* options can be used for disambiguation. The disadvantage of this idea is more difficult maintenance. The advantage is that if people want some Linux or BSD interfaces to make it easier to port programs from those OS, the interfaces can be added, but are optional. So we don't violate the Inviolables :-)
   
   libc implementer already use _XXX_SOURCE to enable the non standard functions:
   https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_node/libc_13.html
   it's better to follow this practice to improve the compatibility.


----------------------------------------------------------------
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.

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