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: Wed, 11 Apr 2018 21:56:28 +0100 Organization: A noiseless patient Spider Message-ID: <87y3htzclf.fsf@bsb.me.uk> References: <86fu429udy.fsf@zoho.com> <87lgdt21a4.fsf@bsb.me.uk> <86zi29earx.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523480303 29517 195.159.176.226 (11 Apr 2018 20:58:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2018 20:58:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 11 22:58:19 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 1f6Mot-0007YB-4A for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2018 22:58:19 +0200 Original-Received: from localhost ([::1]:57607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6Mqz-0008FK-Kb for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2018 17:00:29 -0400 Original-Path: usenet.stanford.edu!goblin2!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: 27 Original-Injection-Info: reader02.eternal-september.org; posting-host="2586ae6ef9c72e9e16b31e16921940a1"; logging-data="8437"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18x81epYMUnVQX/Zdt7emkbDwEEW0fqRn0=" Cancel-Lock: sha1:1U8Q+Lxr0mjC+LoX4JyARplmjaU= sha1:Qw4q3JohGXr/M71i8A75w3xJZmg= X-BSB-Auth: 1.e654edc295f70713b8a3.20180411215628BST.87y3htzclf.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:222356 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:116474 Archived-At: Emanuel Berg writes: > Ben Bacarisse wrote: > >> this common construction can give rise to C's >> dreaded "undefined behaviour". All sorts of >> macro names are reserved to the >> implementation depending on what headers have >> been included in the source file that >> includes this one. >> >> It's common to ignore this rule, but if you >> are providing a facility for general use it >> might be better to follow letter of the law. >> Pre-pending "H_" to the label is known to >> be safe. > > I agree. So for color.c, color.h should have > H_COLOR_H? That is safe, yes. Doing it by hand, I think most people write H_COLOR but you can't even be sure there will be a .h in the name! Actually, I like the symmetry, now that I see it, and I may use this myself. -- Ben.