~brianaker/gearmand/osx9-fixes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Hi!

You can obtain the latest source tree for Gearman by issuing the following command:
bzr clone lp:gearmand

You will need to have bzr installed in order for this to work (http://bazaar.canonical.com/en/).

If you are building from source control (i.e. bzr) you should setup your environment via:
./bootstrap.sh autoreconf

This will build the files you will need in order to run "./configure".

If you are working on the server here are some handy environmental variables
you can set so that you can debug make test:

GEARMAN_VALGRIND <- runs the server under valgrind.
GEARMAN_MANUAL_GDB <-- runs the server under a remote version of GDB.
GEARMAN_LOG <-- generates a log file for you with the output of the debug for the server

GDB will pause the server while you do run the GDB command.

Coding Style
------------

Variables during assignment should be like:
a= 12;

When in doubt, use (). It means I clearly know that you meant for an
operation to follow a specific order.

Cast return types void when there is a possibility of failure (don't
bother with printf, use common sense):

(void)some_function(...);

New functions should be named "object_verb_(item_to_act_on)". You
should email the list if you are extending the API.

Use spaces after while, for, do, if, else. Don't around anything else.

If/else bracket style is:
if ()
{
}
else
{
}

Make sure structs have a typedef with a _st suffix, enums have a _t
suffix, and functions have a _fn suffix. For example:

typedef struct gearman_task { ... } gearman_task_st;
typedef enum gearman_return { ... } gearman_return_t;
typedef gearman_return_t (gearman_complete_fn)(gearman_task_st *task);


Cheers,
  -Brian