Patch for Bug 12559

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch for Bug 12559

Samba - samba-technical mailing list
Here is a patch for Bug 12559 titled:
source3/lib/tldap.c", line 2539: non-constant initializer: op "NAME"

From 908dc2784a2b821171c96c06db1e7940f88e8b79 Mon Sep 17 00:00:00 2001
From: Tom <[hidden email]>
Date: Wed, 15 Mar 2017 12:06:19 -0400
Subject: [PATCH] Fix for Solaris C compiler.

Inspired by comment 4 in bug 12559.
Signed-off-by: Tom Schulz <[hidden email]>
---
 source3/include/tldap.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/source3/include/tldap.h b/source3/include/tldap.h
index 74279a4..23e3f1b 100644
--- a/source3/include/tldap.h
+++ b/source3/include/tldap.h
@@ -47,9 +47,15 @@ struct tldap_mod {
  DATA_BLOB *values;
 };
 
+#if defined(HAVE_IMMEDIATE_STRUCTURES)
 typedef struct { uint8_t rc; } TLDAPRC;
 #define TLDAP_RC(x) ((TLDAPRC){.rc = x})
 #define TLDAP_RC_V(x) ((x).rc)
+#else
+typedef uint8_t TLDAPRC;
+#define TLDAP_RC(x) (x)
+#define TLDAP_RC_V(x) (x)
+#endif
 
 #define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
 #define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)
--
2.6.1


Tom Schulz
Applied Dynamics Intl.
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Patch for Bug 12559

Samba - samba-technical mailing list
On Wed, Mar 15, 2017 at 02:00:01PM -0400, Thomas Schulz via samba-technical wrote:
> Here is a patch for Bug 12559 titled:
> source3/lib/tldap.c", line 2539: non-constant initializer: op "NAME"

With the commit message modified to include the bug link,
RB+ Jeremy Allison <[hidden email]>.

Can I get a second Team reviewer ?

> From 908dc2784a2b821171c96c06db1e7940f88e8b79 Mon Sep 17 00:00:00 2001
> From: Tom <[hidden email]>
> Date: Wed, 15 Mar 2017 12:06:19 -0400
> Subject: [PATCH] Fix for Solaris C compiler.
>
> Inspired by comment 4 in bug 12559.
> Signed-off-by: Tom Schulz <[hidden email]>
> ---
>  source3/include/tldap.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/source3/include/tldap.h b/source3/include/tldap.h
> index 74279a4..23e3f1b 100644
> --- a/source3/include/tldap.h
> +++ b/source3/include/tldap.h
> @@ -47,9 +47,15 @@ struct tldap_mod {
>   DATA_BLOB *values;
>  };
>  
> +#if defined(HAVE_IMMEDIATE_STRUCTURES)
>  typedef struct { uint8_t rc; } TLDAPRC;
>  #define TLDAP_RC(x) ((TLDAPRC){.rc = x})
>  #define TLDAP_RC_V(x) ((x).rc)
> +#else
> +typedef uint8_t TLDAPRC;
> +#define TLDAP_RC(x) (x)
> +#define TLDAP_RC_V(x) (x)
> +#endif
>  
>  #define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
>  #define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)
> --
> 2.6.1
>
>
> Tom Schulz
> Applied Dynamics Intl.
> [hidden email]
>

Reply | Threaded
Open this post in threaded view
|

Re: Patch for Bug 12559

Samba - samba-technical mailing list
On Wed, 15 Mar 2017 16:47:54 -0700, Jeremy Allison via samba-technical
<[hidden email]> wrote:

> On Wed, Mar 15, 2017 at 02:00:01PM -0400, Thomas Schulz via samba-technical wrote:
> > Here is a patch for Bug 12559 titled:
> > source3/lib/tldap.c", line 2539: non-constant initializer: op "NAME"  
>
> With the commit message modified to include the bug link,
> RB+ Jeremy Allison <[hidden email]>.
>
> Can I get a second Team reviewer ?

Reviewed-by: Martin Schwenke <[hidden email]>

Do you have other things to push?  :-)

peace & happiness,
martin

> > From 908dc2784a2b821171c96c06db1e7940f88e8b79 Mon Sep 17 00:00:00 2001
> > From: Tom <[hidden email]>
> > Date: Wed, 15 Mar 2017 12:06:19 -0400
> > Subject: [PATCH] Fix for Solaris C compiler.
> >
> > Inspired by comment 4 in bug 12559.
> > Signed-off-by: Tom Schulz <[hidden email]>
> > ---
> >  source3/include/tldap.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/source3/include/tldap.h b/source3/include/tldap.h
> > index 74279a4..23e3f1b 100644
> > --- a/source3/include/tldap.h
> > +++ b/source3/include/tldap.h
> > @@ -47,9 +47,15 @@ struct tldap_mod {
> >   DATA_BLOB *values;
> >  };
> >  
> > +#if defined(HAVE_IMMEDIATE_STRUCTURES)
> >  typedef struct { uint8_t rc; } TLDAPRC;
> >  #define TLDAP_RC(x) ((TLDAPRC){.rc = x})
> >  #define TLDAP_RC_V(x) ((x).rc)
> > +#else
> > +typedef uint8_t TLDAPRC;
> > +#define TLDAP_RC(x) (x)
> > +#define TLDAP_RC_V(x) (x)
> > +#endif
> >  
> >  #define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
> >  #define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)
> > --
> > 2.6.1
> >
> >
> > Tom Schulz
> > Applied Dynamics Intl.
> > [hidden email]
> >  
>

Reply | Threaded
Open this post in threaded view
|

Re: Patch for Bug 12559

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
> On Wed, 15 Mar 2017 16:47:54 -0700, Jeremy Allison via samba-technical
> <[hidden email]> wrote:
>
> > On Wed, Mar 15, 2017 at 02:00:01PM -0400, Thomas Schulz via samba-technical wrote:
> > > Here is a patch for Bug 12559 titled:
> > > source3/lib/tldap.c", line 2539: non-constant initializer: op "NAME"  
> >
> > With the commit message modified to include the bug link,
> > RB+ Jeremy Allison <[hidden email]>.
> >
> > Can I get a second Team reviewer ?
>
> Reviewed-by: Martin Schwenke <[hidden email]>
>
> Do you have other things to push?  :-)
>
> peace & happiness,
> martin

Just out of curiosity, why are you using a structure of one element here?
Also, has this been pushed yet?

>
>>> From 908dc2784a2b821171c96c06db1e7940f88e8b79 Mon Sep 17 00:00:00 2001
>>> From: Tom <[hidden email]>
>>> Date: Wed, 15 Mar 2017 12:06:19 -0400
>>> Subject: [PATCH] Fix for Solaris C compiler.
>>>
>>> Inspired by comment 4 in bug 12559.
>>> Signed-off-by: Tom Schulz <[hidden email]>
>>> ---
>>>  source3/include/tldap.h | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/source3/include/tldap.h b/source3/include/tldap.h
>>> index 74279a4..23e3f1b 100644
>>> --- a/source3/include/tldap.h
>>> +++ b/source3/include/tldap.h
>>> @@ -47,9 +47,15 @@ struct tldap_mod {
>>>   DATA_BLOB *values;
>>>  };
>>>  
>>> +#if defined(HAVE_IMMEDIATE_STRUCTURES)
>>>  typedef struct { uint8_t rc; } TLDAPRC;
>>>  #define TLDAP_RC(x) ((TLDAPRC){.rc = x})
>>>  #define TLDAP_RC_V(x) ((x).rc)
>>> +#else
>>> +typedef uint8_t TLDAPRC;
>>> +#define TLDAP_RC(x) (x)
>>> +#define TLDAP_RC_V(x) (x)
>>> +#endif
>>>  
>>>  #define TLDAP_RC_EQUAL(x,y) (TLDAP_RC_V(x)==TLDAP_RC_V(y))
>>>  #define TLDAP_RC_IS_SUCCESS(x) TLDAP_RC_EQUAL(x,TLDAP_SUCCESS)
>>> --
>>> 2.6.1

Tom Schulz
Applied Dynamics Intl.
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Patch for Bug 12559

Samba - samba-technical mailing list
On Thu, Mar 16, 2017 at 01:31:06PM -0400, Thomas Schulz via samba-technical wrote:

> > On Wed, 15 Mar 2017 16:47:54 -0700, Jeremy Allison via samba-technical
> > <[hidden email]> wrote:
> >
> > > On Wed, Mar 15, 2017 at 02:00:01PM -0400, Thomas Schulz via samba-technical wrote:
> > > > Here is a patch for Bug 12559 titled:
> > > > source3/lib/tldap.c", line 2539: non-constant initializer: op "NAME"  
> > >
> > > With the commit message modified to include the bug link,
> > > RB+ Jeremy Allison <[hidden email]>.
> > >
> > > Can I get a second Team reviewer ?
> >
> > Reviewed-by: Martin Schwenke <[hidden email]>
> >
> > Do you have other things to push?  :-)
> >
> > peace & happiness,
> > martin
>
> Just out of curiosity, why are you using a structure of one element here?
> Also, has this been pushed yet?

Pushed but not yet landed, the new substitute tests patch
failed. I've re-pushed.