RT RT/krbdev.mit.edu: Ticket #2603 namespace cleanliness in k5-platform.h Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
2603
Status
resolved
Worked
0 min
Priority
0/0
Queue
krb5
 

 Keyword Selections  
Component
  • krb5-libs
Version_reported
Version_Fixed
  • 1.4
Target_Version
Tags
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
Referred to by:
 
 Dates  
Created: Thu Jun 17 18:36:32 2004
Starts: Not set
Started: Fri Jun 25 15:42:13 2004
Last Contact: Fri Jun 25 15:42:15 2004
Due: Not set
Updated: Mon Nov 15 22:22:13 2004 by tlyu
 

 People  
Owner
 raeburn
Requestors
 tlyu@mit.edu
Cc
 
AdminCc
 
 

 More about Tom Yu  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Thu Jun 17 18:36:34 2004  tlyu - Ticket created    
     
Subject: namespace cleanliness in k5-platform.h

k5-platform.h contains a number of instances of JOIN2(foo, __bar).  This
can cause a macro in the reserved namespace to get expanded.  It might
be better to make a macro such as

#define JOINX__Y_2(x,y) x ## _ ## _ ## y
#define JOINX__Y(x,y) JOINX__Y_2(x,y)

or something like that, so that macros in the reserved namespace don't
get expanded.  The example above doesn't use x ## __ ## y because that
might still invoke undefined behavior. (prefixes _[A-Z_] are reserved
for any use, while prefixes _[^A-Z_] are only reserved for file scope
ordinary and tag identifiers.  It's conceivable, though perhaps
unlikely, that an compiler vendor could implement a preprocessor
extension using identifiers with a prefix of the form _[A-Z_], e.g., the
__VA_ARGS__ facility in c99.)


Download (untitled) 772b
      Fri Jun 25 15:42:14 2004  raeburn - Status changed from new to resolved    
      Fri Jun 25 15:42:14 2004  raeburn - Correspondence added    
     
From: raeburn@mit.edu
Subject: CVS Commit

* k5-platform.h (JOIN4, JOIN4_2, JOIN3, JOIN3_2): Unused macros deleted.
(JOIN__2, JOIN__2_2): Renamed from JOIN2 and JOIN2_2.  Insert two underscores
between the tokens supplied.  All uses changed to use new macros, and not use
identifiers with leading underscores.


To generate a diff of this commit:



	cvs diff -r1.428 -r1.429 krb5/src/include/ChangeLog
	cvs diff -r1.7 -r1.8 krb5/src/include/k5-platform.h


Download (untitled) 413b
      Mon Nov 15 22:22:13 2004  tlyu - Version_Fixed 1.4 added