Merge lp:~olafvdspek/drizzle/refactor13 into lp:drizzle

Proposed by Olaf van der Spek
Status: Superseded
Proposed branch: lp:~olafvdspek/drizzle/refactor13
Merge into: lp:drizzle
Diff against target: 136 lines (+13/-24)
4 files modified
drizzled/atomic/gcc_traits.h (+1/-3)
drizzled/atomic/pthread_traits.h (+0/-4)
drizzled/atomics.h (+4/-9)
drizzled/drizzled.cc (+8/-8)
To merge this branch: bzr merge lp:~olafvdspek/drizzle/refactor13
Reviewer Review Type Date Requested Status
Drizzle Trunk Pending
Review via email: mp+108496@code.launchpad.net

This proposal has been superseded by a proposal from 2012-08-01.

Description of the change

Take 2

To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

Is your editor adjusting white space noise?

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

It's trimming trailing whitespace.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/atomic/gcc_traits.h'
2--- drizzled/atomic/gcc_traits.h 2011-03-14 05:40:28 +0000
3+++ drizzled/atomic/gcc_traits.h 2012-06-03 17:43:20 +0000
4@@ -25,7 +25,6 @@
5 template<typename T, typename D>
6 class gcc_traits
7 {
8-
9 public:
10 typedef T value_type;
11
12@@ -66,7 +65,7 @@
13
14 inline value_type fetch(const volatile value_type *value) const volatile
15 {
16- /*
17+ /*
18 * This is necessary to ensure memory barriers are respected when
19 * simply returning the value pointed at. However, this does not
20 * compile on ICC.
21@@ -91,4 +90,3 @@
22
23 } /* namespace internal */
24 } /* namespace drizzled */
25-
26
27=== modified file 'drizzled/atomic/pthread_traits.h'
28--- drizzled/atomic/pthread_traits.h 2011-03-14 05:40:28 +0000
29+++ drizzled/atomic/pthread_traits.h 2012-06-03 17:43:20 +0000
30@@ -21,7 +21,6 @@
31 #pragma once
32
33 namespace drizzled {
34-
35 namespace internal {
36
37 class mutex_wrapper
38@@ -61,7 +60,6 @@
39 mutex_wrapper my_lock;
40
41 public:
42-
43 typedef T value_type;
44
45 pthread_traits() {}
46@@ -147,5 +145,3 @@
47
48 } /* namespace internal */
49 } /* namespace drizzled */
50-
51-
52
53=== modified file 'drizzled/atomics.h'
54--- drizzled/atomics.h 2011-08-14 17:04:01 +0000
55+++ drizzled/atomics.h 2012-06-03 17:43:20 +0000
56@@ -38,21 +38,16 @@
57 namespace drizzled {
58 namespace internal {
59
60-template<typename I> // Primary template
61-struct atomic_base {
62- volatile I my_value;
63- atomic_base() : my_value(0) {}
64- virtual ~atomic_base() {}
65-};
66-
67 template<typename I, typename D, typename T >
68-class atomic_impl: private atomic_base<I>
69+class atomic_impl
70 {
71+private:
72 T traits;
73+ volatile I my_value;
74 public:
75 typedef I value_type;
76
77- atomic_impl() : atomic_base<I>(), traits() {}
78+ atomic_impl() : my_value(0) {}
79
80 value_type add_and_fetch( D addend )
81 {
82
83=== modified file 'drizzled/drizzled.cc'
84--- drizzled/drizzled.cc 2012-04-22 00:50:10 +0000
85+++ drizzled/drizzled.cc 2012-06-03 17:43:20 +0000
86@@ -417,7 +417,7 @@
87 if ((file = open(pid_file.file_string().c_str(), O_CREAT|O_WRONLY|O_TRUNC|O_CLOEXEC, S_IRWXU|S_IRGRP|S_IROTH)) > 0)
88 {
89 char buff[1024];
90- int length= snprintf(buff, sizeof(buff), "%ld\n", (long) getpid());
91+ int length= snprintf(buff, sizeof(buff), "%ld\n", (long) getpid());
92
93 if ((write(file, buff, length)) == length)
94 {
95@@ -606,7 +606,7 @@
96 {
97 // Allow a numeric uid to be used
98 const char *pos= user;
99- for (; my_charset_utf8_general_ci.isdigit(*pos); pos++)
100+ for (; my_charset_utf8_general_ci.isdigit(*pos); pos++)
101 { }
102 if (*pos) // Not numeric id
103 {
104@@ -643,7 +643,7 @@
105 initgroups(user, user_info_arg->pw_gid);
106 if (setgid(user_info_arg->pw_gid) == -1)
107 {
108- unireg_abort << _("Set process group ID failed ") << strerror(errno);
109+ unireg_abort << _("Set process group ID failed ") << strerror(errno);
110 }
111 if (setuid(user_info_arg->pw_uid) == -1)
112 {
113@@ -1345,7 +1345,7 @@
114 }
115 catch (po::validation_error &err)
116 {
117- unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
118+ unireg_abort << err.what() << ". " << "Use --help to get a list of available options. ";
119 }
120
121 if (vm.count("version"))
122@@ -2243,10 +2243,10 @@
123 {
124 if (errno != EEXIST)
125 {
126- unireg_abort << "There was an error creating the '"
127- << fs::path(drizzle_tmpdir).leaf()
128- << "' part of the path '"
129- << drizzle_tmpdir
130+ unireg_abort << "There was an error creating the '"
131+ << fs::path(drizzle_tmpdir).leaf()
132+ << "' part of the path '"
133+ << drizzle_tmpdir
134 << "'. Please check the path exists and is writable.";
135 }
136 }

Subscribers

People subscribed via source and target branches