From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.help Subject: Re: insert-header-preprocessor-definition Date: Sun, 15 Apr 2018 22:10:22 +0100 Organization: A noiseless patient Spider Message-ID: <87vacsnpkx.fsf@bsb.me.uk> References: <86fu429udy.fsf@zoho.com> <87lgdt21a4.fsf@bsb.me.uk> <86zi29earx.fsf@zoho.com> <87y3htzclf.fsf@bsb.me.uk> <86po317392.fsf@zoho.com> <871sfhp9hb.fsf@bsb.me.uk> <86a7u49sa7.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523826804 1872 195.159.176.226 (15 Apr 2018 21:13:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Apr 2018 21:13:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 15 23:13:20 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7oxb-0000Nk-Jn for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Apr 2018 23:13:19 +0200 Original-Received: from localhost ([::1]:43601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7ozi-0004JT-5F for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Apr 2018 17:15:30 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-Injection-Info: reader02.eternal-september.org; posting-host="55e0f35077281f3197e31e8f5f71ad20"; logging-data="18900"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/A94vtYfurdVvneJFtSG4Ph9dwNclDZ+k=" Cancel-Lock: sha1:QHLIU5+4RFTgNNdKX+J7d4Lts1w= sha1:SiP9RsB9pb5G1sHjy1t4C5qwiGs= X-BSB-Auth: 1.466883d830a039d97649.20180415221022BST.87vacsnpkx.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:222414 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116532 Archived-At: Emanuel Berg writes: > Ben Bacarisse wrote: > >> The C standard lists, for every header, any >> patterns of macro names that are reserved to >> the implementation. errno.h, for example, >> reserves all macro names that start >> E followed by a digit or another upper case >> latter. Thus a program that uses ERROR_H >> whilst also including errno.h is technically >> undefined even if errno.h does not actually >> use that macro name. >> >> None of the headers reserve any names that >> start H_ > > Right, but what about stuff that aren't part of > the C standard library? I'm not sure what to say about that. That's a well-known problem with no ideal solution. And what might be a suitable non-ideal solution will, most likely, vary from project to project. But if more and more people use H_ to start guards, that will become a de-facto standard and will discourage the use of H_ names for other uses. Alternatively, you could use a standard-C safe prefix that is very unlikely to be used by anything else: #ifdef Emanuel_Berg_EMACS_GENERATED_GUARD_FOR_COLOR_H (Em... is not reserved by errno.h) -- Ben.