[gnutls-devel] GnuTLS | Add or clean header guards in lib/ (!954)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Tue May 7 13:15:31 CEST 2019
Tim Rühsen commented on a discussion on lib/auth/srp_passwd.h: https://gitlab.com/gnutls/gnutls/merge_requests/954#note_167469721
> *
> */
>
> +#ifndef GNUTLS_LIB_AUTH_SRP_PASSWD_H
Yes. To be one the save side, the project name should be part of the header guard even for internal files.
We are not talking about strings that have to be typed somewhere - just about a world-unique string to avoid clashes. Of course we could debate at what point a string is considered world-unique and if we could make it shorter in any means. But what for ? Neither file size nor CPU utilization (when building) is affected.
Of course we could also use a SHA(1/2/3) hash as header guard... but what I found when searching was a repeating hint for header guard (also internal): project name + relative path/filename (+ file extension).
I also will enforce this rule for other projects like libidn2, wget and wget2/libwget.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/954#note_167469721
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190507/81516e22/attachment-0001.html>
More information about the Gnutls-devel
mailing list