A small patch for C++ VFS modules.

Ben Martin monkeyiq at users.sourceforge.net
Fri Jun 24 01:23:40 GMT 2005


On Thu, 2005-06-23 at 14:07 -0700, Jeremy Allison wrote:
> On Thu, Jun 23, 2005 at 10:02:28PM +1000, Ben Martin wrote:
> > On Thu, 2005-06-23 at 15:38 +0400, Alexander Bokovoy wrote:
> > > On Thu, Jun 23, 2005 at 05:15:52PM +1000, Ben Martin wrote:
> > > > OK patch attached this time :/
> > > Could you make it against current SVN for SAMBA_3_0? There were changes,
> > > particulary in popt and VFS support which clutter your patch: 
> > 
> > OK, new patch against 
> > svn://svnanon.samba.org/samba/branches/SAMBA_3_0
> > 
> > I have elected to make the "class" and "private" keywords conditional on
> > if the code is being compiled with a C++ compiler. This makes the patch
> > much less intrusive into the existing code and is less likely to annoy
> > folks IMHO.
> 
> No - it's more annoying (IMHO) :-). I'd rather you change all uses of
> these keywords over the entire source code (don't use leading underscores,
> make the change more meaningful - leading underscores may be reserved for
> use by the system). Can you give me a list of keywords you need to avoid ?

OK, I had started doing it this way and reverted to header only. I'm
happy to resubmit with the more intrusive versions. 

What is the best renaming solution? 
struct foo {
	int class;
};
does class become m_class? I think its best to sort out the prefix
before I start resolving it into the code.

main keywords coming to mind: new, private, template, class.
new+template mainly used in param names
private+class used in a few structs (more intrusive patch)

> 
> I'd rather fix this by doing :
> 
> #define class #error DONT_USE_C_PLUS_PLUS_KEYWORDS
> #define template #error DONT_USE_C_PLUS_PLUS_KEYWORDS
> 
> etc...
> 
> then fix the code so everything compiles. Once that's done
> we can surround these defines with an #ifndef __cplusplus
> and we'll be done.
> 
> Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20050624/1c1571c1/attachment.bin


More information about the samba-technical mailing list