Merge lp:~eday/gearmand/fix-struct-alignment into lp:gearmand/1.0
- fix-struct-alignment
- Merge into 1.0
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~eday/gearmand/fix-struct-alignment |
Merge into: | lp:gearmand/1.0 |
Diff against target: |
93 lines (+25/-4) 4 files modified
libgearman/configure.h.in (+3/-1) libgearman/connection.c (+1/-1) m4/pandora_platform.m4 (+5/-0) tests/client_test.c (+16/-2) |
To merge this branch: | bzr merge lp:~eday/gearmand/fix-struct-alignment |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gearman-developers | Pending | ||
Review via email: mp+21012@code.launchpad.net |
Commit message
Description of the change
Brian Aker (brianaker) wrote : | # |
Eric Day (eday) wrote : | # |
I don't really have a preference how this is fixed, this just seemed
like a generic way we can control from pandora-build if we want to
fine-tune it. We just can't have any public headers depending on
config.h like they do now.
-Eric
On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> The other option to this is just to turn down the optimization on
> Solaris (since that is where the bug is).
>
>
> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
>
> > Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> > into lp:gearmand.
> >
> > Requested reviews:
> > Gearman-developers (gearman-
> >
> > --
> > https:/
> > Your team Gearman-developers is subscribed to branch lp:gearmand.
> > === modified file 'libgearman/
> > --- libgearman/
> > +++ libgearman/
> > @@ -16,7 +16,9 @@
> > extern "C" {
> > #endif
> >
> > -#ifdef TARGET_OS_LINUX
> > +#define LIBGEARMAN_
> > +
> > +#if LIBGEARMAN_
> > #define LIBGEARMAN_BITFIELD :1
> > #else
> > #define LIBGEARMAN_BITFIELD
> >
> > === modified file 'libgearman/
> > --- libgearman/
> > +++ libgearman/
> > @@ -115,7 +115,7 @@
> > {
> > connection= gearman_
> >
> > - if (from || connection == NULL)
> > + if (from == NULL || connection == NULL)
> > return connection;
> >
> > connection-
> >
> > === modified file 'm4/pandora_
> > --- m4/pandora_
> > +++ m4/pandora_
> > @@ -34,11 +34,14 @@
> > ;;
> > esac
> >
> > + PANDORA_
> > +
> > case "$target_os" in
> > *linux*)
> > TARGET_LINUX="true"
> > AC_SUBST(
> > AC_DEFINE(
> > + PANDORA_
> > ;;
> > *darwin*)
> > TARGET_OSX="true"
> > @@ -60,6 +63,8 @@
> > ;;
> > esac
> >
> > + AC_SUBST(
> > +
> > AC_CHECK_
> > AC_CHECK_
> >
> >
> > === modified file 'tests/
> > --- tests/client_test.c 2010-01-28 21:45:14 +0000
> > +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> > @@ -99,6 +99,7 @@
> > test_return_t clone_test(void *object)
> > {
> > const gearman_client_st *from= (gearman_client_st *)object;
> > + gearman_client_st *from_with_host;
> > gearman_client_st *client;
> >
> > client= gearman_
> > @@ -110,8 +111,21 @@
> >
> > client= gearman_
> > test_truth(client);
> > -
> > - gearman_
> > + gearman_
> > +
> > + from_with_host= gearman_
> > + test_truth(
> > + gearman_
Brian Aker (brianaker) wrote : | # |
Ok, just disable optimizations on Solaris and pull the macro.
On Mar 9, 2010, at 3:15 PM, Eric Day wrote:
> I don't really have a preference how this is fixed, this just seemed
> like a generic way we can control from pandora-build if we want to
> fine-tune it. We just can't have any public headers depending on
> config.h like they do now.
>
> -Eric
>
> On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
>> The other option to this is just to turn down the optimization on
>> Solaris (since that is where the bug is).
>>
>>
>> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
>>
>>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
>>> into lp:gearmand.
>>>
>>> Requested reviews:
>>> Gearman-developers (gearman-
>>>
>>> --
>>> https:/
>>> Your team Gearman-developers is subscribed to branch lp:gearmand.
>>> === modified file 'libgearman/
>>> --- libgearman/
>>> +++ libgearman/
>>> @@ -16,7 +16,9 @@
>>> extern "C" {
>>> #endif
>>>
>>> -#ifdef TARGET_OS_LINUX
>>> +#define LIBGEARMAN_
>>> +
>>> +#if LIBGEARMAN_
>>> #define LIBGEARMAN_BITFIELD :1
>>> #else
>>> #define LIBGEARMAN_BITFIELD
>>>
>>> === modified file 'libgearman/
>>> --- libgearman/
>>> +++ libgearman/
>>> @@ -115,7 +115,7 @@
>>> {
>>> connection= gearman_
>>>
>>> - if (from || connection == NULL)
>>> + if (from == NULL || connection == NULL)
>>> return connection;
>>>
>>> connection-
>>>
>>> === modified file 'm4/pandora_
>>> --- m4/pandora_
>>> +++ m4/pandora_
>>> @@ -34,11 +34,14 @@
>>> ;;
>>> esac
>>>
>>> + PANDORA_
>>> +
>>> case "$target_os" in
>>> *linux*)
>>> TARGET_LINUX="true"
>>> AC_SUBST(
>>> AC_DEFINE(
>>> + PANDORA_
>>> ;;
>>> *darwin*)
>>> TARGET_OSX="true"
>>> @@ -60,6 +63,8 @@
>>> ;;
>>> esac
>>>
>>> + AC_SUBST(
>>> +
>>> AC_CHECK_
>>> AC_CHECK_
>>>
>>>
>>> === modified file 'tests/
>>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
>>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
>>> @@ -99,6 +99,7 @@
>>> test_return_t clone_test(void *object)
>>> {
>>> const gearman_client_st *from= (gearman_client_st *)object;
>>> + gearman_client_st *from_with_host;
>>> gearman_client_st *client;
>>>
>>> client= gearman_
>>> @@ -110,8 +111,21 @@
>>>
>>> client= gearman_
>>> test_truth(client);
>>> -
>>> - gearman_
>>> + gearman_
>>> +
>>> + from_with_host= gearman_
Eric Day (eday) wrote : | # |
You mean remove all references to LIBGEARMAN_
optimize for any platform? I don't see any problem with keeping
the optimization in, what specifically about the proposed branch is
an issue?
-Eric
On Tue, Mar 09, 2010 at 11:21:19PM -0000, Brian Aker wrote:
> Ok, just disable optimizations on Solaris and pull the macro.
>
> On Mar 9, 2010, at 3:15 PM, Eric Day wrote:
>
> > I don't really have a preference how this is fixed, this just seemed
> > like a generic way we can control from pandora-build if we want to
> > fine-tune it. We just can't have any public headers depending on
> > config.h like they do now.
> >
> > -Eric
> >
> > On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> >> The other option to this is just to turn down the optimization on
> >> Solaris (since that is where the bug is).
> >>
> >>
> >> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
> >>
> >>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> >>> into lp:gearmand.
> >>>
> >>> Requested reviews:
> >>> Gearman-developers (gearman-
> >>>
> >>> --
> >>> https:/
> >>> Your team Gearman-developers is subscribed to branch lp:gearmand.
> >>> === modified file 'libgearman/
> >>> --- libgearman/
> >>> +++ libgearman/
> >>> @@ -16,7 +16,9 @@
> >>> extern "C" {
> >>> #endif
> >>>
> >>> -#ifdef TARGET_OS_LINUX
> >>> +#define LIBGEARMAN_
> >>> +
> >>> +#if LIBGEARMAN_
> >>> #define LIBGEARMAN_BITFIELD :1
> >>> #else
> >>> #define LIBGEARMAN_BITFIELD
> >>>
> >>> === modified file 'libgearman/
> >>> --- libgearman/
> >>> +++ libgearman/
> >>> @@ -115,7 +115,7 @@
> >>> {
> >>> connection= gearman_
> >>>
> >>> - if (from || connection == NULL)
> >>> + if (from == NULL || connection == NULL)
> >>> return connection;
> >>>
> >>> connection-
> >>>
> >>> === modified file 'm4/pandora_
> >>> --- m4/pandora_
> >>> +++ m4/pandora_
> >>> @@ -34,11 +34,14 @@
> >>> ;;
> >>> esac
> >>>
> >>> + PANDORA_
> >>> +
> >>> case "$target_os" in
> >>> *linux*)
> >>> TARGET_LINUX="true"
> >>> AC_SUBST(
> >>> AC_DEFINE(
> >>> + PANDORA_
> >>> ;;
> >>> *darwin*)
> >>> TARGET_OSX="true"
> >>> @@ -60,6 +63,8 @@
> >>> ;;
> >>> esac
> >>>
> >>> + AC_SUBST(
> >>> +
> >>> AC_CHECK_
> >>> AC_CHECK_
> >>>
> >>>
> >>> === modified file 'tests/
> >>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> >>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> >>> @@ -99,6 +99,7 @@
> >>> test_return_t clone_...
Eric Day (eday) wrote : | # |
Ok, branch updated with default from only Linux to not Solaris.
On Tue, Mar 09, 2010 at 11:21:19PM -0000, Brian Aker wrote:
> Ok, just disable optimizations on Solaris and pull the macro.
>
> On Mar 9, 2010, at 3:15 PM, Eric Day wrote:
>
> > I don't really have a preference how this is fixed, this just seemed
> > like a generic way we can control from pandora-build if we want to
> > fine-tune it. We just can't have any public headers depending on
> > config.h like they do now.
> >
> > -Eric
> >
> > On Tue, Mar 09, 2010 at 11:09:21PM -0000, Brian Aker wrote:
> >> The other option to this is just to turn down the optimization on
> >> Solaris (since that is where the bug is).
> >>
> >>
> >> On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
> >>
> >>> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment
> >>> into lp:gearmand.
> >>>
> >>> Requested reviews:
> >>> Gearman-developers (gearman-
> >>>
> >>> --
> >>> https:/
> >>> Your team Gearman-developers is subscribed to branch lp:gearmand.
> >>> === modified file 'libgearman/
> >>> --- libgearman/
> >>> +++ libgearman/
> >>> @@ -16,7 +16,9 @@
> >>> extern "C" {
> >>> #endif
> >>>
> >>> -#ifdef TARGET_OS_LINUX
> >>> +#define LIBGEARMAN_
> >>> +
> >>> +#if LIBGEARMAN_
> >>> #define LIBGEARMAN_BITFIELD :1
> >>> #else
> >>> #define LIBGEARMAN_BITFIELD
> >>>
> >>> === modified file 'libgearman/
> >>> --- libgearman/
> >>> +++ libgearman/
> >>> @@ -115,7 +115,7 @@
> >>> {
> >>> connection= gearman_
> >>>
> >>> - if (from || connection == NULL)
> >>> + if (from == NULL || connection == NULL)
> >>> return connection;
> >>>
> >>> connection-
> >>>
> >>> === modified file 'm4/pandora_
> >>> --- m4/pandora_
> >>> +++ m4/pandora_
> >>> @@ -34,11 +34,14 @@
> >>> ;;
> >>> esac
> >>>
> >>> + PANDORA_
> >>> +
> >>> case "$target_os" in
> >>> *linux*)
> >>> TARGET_LINUX="true"
> >>> AC_SUBST(
> >>> AC_DEFINE(
> >>> + PANDORA_
> >>> ;;
> >>> *darwin*)
> >>> TARGET_OSX="true"
> >>> @@ -60,6 +63,8 @@
> >>> ;;
> >>> esac
> >>>
> >>> + AC_SUBST(
> >>> +
> >>> AC_CHECK_
> >>> AC_CHECK_
> >>>
> >>>
> >>> === modified file 'tests/
> >>> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> >>> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> >>> @@ -99,6 +99,7 @@
> >>> test_return_t clone_test(void *object)
> >>> {
> >>> const gearman_client_st *from= (gearman_client_st *)object;
> >>> + gearman_client_st *from_with_host;
> >>> gearm...
Preview Diff
1 | === modified file 'libgearman/configure.h.in' | |||
2 | --- libgearman/configure.h.in 2010-02-12 20:26:31 +0000 | |||
3 | +++ libgearman/configure.h.in 2010-03-09 23:48:32 +0000 | |||
4 | @@ -16,7 +16,9 @@ | |||
5 | 16 | extern "C" { | 16 | extern "C" { |
6 | 17 | #endif | 17 | #endif |
7 | 18 | 18 | ||
9 | 19 | #ifdef TARGET_OS_LINUX | 19 | #define LIBGEARMAN_OPTIMIZE_BITFIELD @PANDORA_OPTIMIZE_BITFIELD@ |
10 | 20 | |||
11 | 21 | #if LIBGEARMAN_OPTIMIZE_BITFIELD == 1 | ||
12 | 20 | #define LIBGEARMAN_BITFIELD :1 | 22 | #define LIBGEARMAN_BITFIELD :1 |
13 | 21 | #else | 23 | #else |
14 | 22 | #define LIBGEARMAN_BITFIELD | 24 | #define LIBGEARMAN_BITFIELD |
15 | 23 | 25 | ||
16 | === modified file 'libgearman/connection.c' | |||
17 | --- libgearman/connection.c 2010-01-28 23:46:52 +0000 | |||
18 | +++ libgearman/connection.c 2010-03-09 23:48:32 +0000 | |||
19 | @@ -115,7 +115,7 @@ | |||
20 | 115 | { | 115 | { |
21 | 116 | connection= gearman_connection_create(gearman, connection, NULL); | 116 | connection= gearman_connection_create(gearman, connection, NULL); |
22 | 117 | 117 | ||
24 | 118 | if (from || connection == NULL) | 118 | if (from == NULL || connection == NULL) |
25 | 119 | return connection; | 119 | return connection; |
26 | 120 | 120 | ||
27 | 121 | connection->options.ready= from->options.ready; | 121 | connection->options.ready= from->options.ready; |
28 | 122 | 122 | ||
29 | === modified file 'm4/pandora_platform.m4' | |||
30 | --- m4/pandora_platform.m4 2010-01-02 05:06:13 +0000 | |||
31 | +++ m4/pandora_platform.m4 2010-03-09 23:48:32 +0000 | |||
32 | @@ -34,6 +34,8 @@ | |||
33 | 34 | ;; | 34 | ;; |
34 | 35 | esac | 35 | esac |
35 | 36 | 36 | ||
36 | 37 | PANDORA_OPTIMIZE_BITFIELD=1 | ||
37 | 38 | |||
38 | 37 | case "$target_os" in | 39 | case "$target_os" in |
39 | 38 | *linux*) | 40 | *linux*) |
40 | 39 | TARGET_LINUX="true" | 41 | TARGET_LINUX="true" |
41 | @@ -47,6 +49,7 @@ | |||
42 | 47 | ;; | 49 | ;; |
43 | 48 | *solaris*) | 50 | *solaris*) |
44 | 49 | TARGET_SOLARIS="true" | 51 | TARGET_SOLARIS="true" |
45 | 52 | PANDORA_OPTIMIZE_BITFIELD=0 | ||
46 | 50 | AC_SUBST(TARGET_SOLARIS) | 53 | AC_SUBST(TARGET_SOLARIS) |
47 | 51 | AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) | 54 | AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) |
48 | 52 | ;; | 55 | ;; |
49 | @@ -60,6 +63,8 @@ | |||
50 | 60 | ;; | 63 | ;; |
51 | 61 | esac | 64 | esac |
52 | 62 | 65 | ||
53 | 66 | AC_SUBST(PANDORA_OPTIMIZE_BITFIELD) | ||
54 | 67 | |||
55 | 63 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) | 68 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
56 | 64 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) | 69 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) |
57 | 65 | 70 | ||
58 | 66 | 71 | ||
59 | === modified file 'tests/client_test.c' | |||
60 | --- tests/client_test.c 2010-01-28 21:45:14 +0000 | |||
61 | +++ tests/client_test.c 2010-03-09 23:48:32 +0000 | |||
62 | @@ -99,6 +99,7 @@ | |||
63 | 99 | test_return_t clone_test(void *object) | 99 | test_return_t clone_test(void *object) |
64 | 100 | { | 100 | { |
65 | 101 | const gearman_client_st *from= (gearman_client_st *)object; | 101 | const gearman_client_st *from= (gearman_client_st *)object; |
66 | 102 | gearman_client_st *from_with_host; | ||
67 | 102 | gearman_client_st *client; | 103 | gearman_client_st *client; |
68 | 103 | 104 | ||
69 | 104 | client= gearman_client_clone(NULL, NULL); | 105 | client= gearman_client_clone(NULL, NULL); |
70 | @@ -110,8 +111,21 @@ | |||
71 | 110 | 111 | ||
72 | 111 | client= gearman_client_clone(NULL, from); | 112 | client= gearman_client_clone(NULL, from); |
73 | 112 | test_truth(client); | 113 | test_truth(client); |
76 | 113 | 114 | gearman_client_free(client); | |
77 | 114 | gearman_client_free(client); | 115 | |
78 | 116 | from_with_host= gearman_client_create(NULL); | ||
79 | 117 | test_truth(from_with_host); | ||
80 | 118 | gearman_client_add_server(from_with_host, "127.0.0.1", 12345); | ||
81 | 119 | |||
82 | 120 | client= gearman_client_clone(NULL, from_with_host); | ||
83 | 121 | test_truth(client); | ||
84 | 122 | |||
85 | 123 | test_truth(client->universal.con_list); | ||
86 | 124 | test_truth(!strcmp(client->universal.con_list->host, from_with_host->universal.con_list->host)); | ||
87 | 125 | test_truth(client->universal.con_list->port == from_with_host->universal.con_list->port); | ||
88 | 126 | |||
89 | 127 | gearman_client_free(client); | ||
90 | 128 | gearman_client_free(from_with_host); | ||
91 | 115 | 129 | ||
92 | 116 | return TEST_SUCCESS; | 130 | return TEST_SUCCESS; |
93 | 117 | } | 131 | } |
The other option to this is just to turn down the optimization on
Solaris (since that is where the bug is).
On Mar 9, 2010, at 3:07 PM, Eric Day wrote:
> Eric Day has proposed merging lp:~eday/gearmand/fix-struct-alignment developers) /code.launchpad .net/~eday/ gearmand/ fix-struct- alignment/ +merge/ 21012 configure. h.in' configure. h.in 2010-02-12 20:26:31 +0000 configure. h.in 2010-03-09 23:07:17 +0000 OPTIMIZE_ BITFIELD @PANDORA_ OPTIMIZE_ BITFIELD@ OPTIMIZE_ BITFIELD == 1 connection. c' connection. c 2010-01-28 23:46:52 +0000 connection. c 2010-03-09 23:07:17 +0000 connection_ create( gearman, connection, NULL); >options. ready= from->options. ready; platform. m4' platform. m4 2010-01-02 05:06:13 +0000 platform. m4 2010-03-09 23:07:17 +0000 OPTIMIZE_ BITFIELD= 0 TARGET_ LINUX) [TARGET_ OS_LINUX] , [1], [Whether we build for Linux]) OPTIMIZE_ BITFIELD= 1 PANDORA_ OPTIMIZE_ BITFIELD) DECL([_ _SUNPRO_ C], [SUNCC="yes"], [SUNCC="no"]) DECL([_ _ICC], [INTELCC="yes"], [INTELCC="no"]) client_ test.c' client_ clone(NULL, NULL); client_ clone(NULL, from); client_ free(client) ; client_ free(client) ; client_ create( NULL); from_with_ host); client_ add_server( from_with_ host, "127.0.0.1", 12345); client_ clone(NULL, from_with_host); client- >universal. con_list) ; !strcmp( client- >universal. con_list- >host, host->universal .con_list- >host)) ; client- >universal. con_list- >port == from_with_host- con_list- >port); client_ free(client) ; client_ free(from_ with_host) ;
> into lp:gearmand.
>
> Requested reviews:
> Gearman-developers (gearman-
>
> --
> https:/
> Your team Gearman-developers is subscribed to branch lp:gearmand.
> === modified file 'libgearman/
> --- libgearman/
> +++ libgearman/
> @@ -16,7 +16,9 @@
> extern "C" {
> #endif
>
> -#ifdef TARGET_OS_LINUX
> +#define LIBGEARMAN_
> +
> +#if LIBGEARMAN_
> #define LIBGEARMAN_BITFIELD :1
> #else
> #define LIBGEARMAN_BITFIELD
>
> === modified file 'libgearman/
> --- libgearman/
> +++ libgearman/
> @@ -115,7 +115,7 @@
> {
> connection= gearman_
>
> - if (from || connection == NULL)
> + if (from == NULL || connection == NULL)
> return connection;
>
> connection-
>
> === modified file 'm4/pandora_
> --- m4/pandora_
> +++ m4/pandora_
> @@ -34,11 +34,14 @@
> ;;
> esac
>
> + PANDORA_
> +
> case "$target_os" in
> *linux*)
> TARGET_LINUX="true"
> AC_SUBST(
> AC_DEFINE(
> + PANDORA_
> ;;
> *darwin*)
> TARGET_OSX="true"
> @@ -60,6 +63,8 @@
> ;;
> esac
>
> + AC_SUBST(
> +
> AC_CHECK_
> AC_CHECK_
>
>
> === modified file 'tests/
> --- tests/client_test.c 2010-01-28 21:45:14 +0000
> +++ tests/client_test.c 2010-03-09 23:07:17 +0000
> @@ -99,6 +99,7 @@
> test_return_t clone_test(void *object)
> {
> const gearman_client_st *from= (gearman_client_st *)object;
> + gearman_client_st *from_with_host;
> gearman_client_st *client;
>
> client= gearman_
> @@ -110,8 +111,21 @@
>
> client= gearman_
> test_truth(client);
> -
> - gearman_
> + gearman_
> +
> + from_with_host= gearman_
> + test_truth(
> + gearman_
> +
> + client= gearman_
> + test_truth(client);
> +
> + test_truth(
> + test_truth(
> from_with_
> + test_truth(
> >universal.
> +
> + gearman_
> + gearman_
>
> return TEST_SUCCESS;
> }
>