~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/lib/child-wait.h

  • Committer: Package Import Robot
  • Author(s): Jaldhar H. Vyas
  • Date: 2013-09-09 00:57:32 UTC
  • mfrom: (1.13.11)
  • mto: (4.8.5 experimental) (1.16.1)
  • mto: This revision was merged to the branch mainline in revision 97.
  • Revision ID: package-import@ubuntu.com-20130909005732-dn1eell8srqbhh0e
Tags: upstream-2.2.5
ImportĀ upstreamĀ versionĀ 2.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
struct child_wait *
15
15
child_wait_new_with_pid(pid_t pid, child_wait_callback_t *callback,
16
 
                        void *context);
17
 
#ifdef CONTEXT_TYPE_SAFETY
18
 
#  define child_wait_new_with_pid(pid, callback, context) \
19
 
        ({(void)(1 ? 0 : callback((const struct child_wait_status *)0, \
20
 
                                  context)); \
21
 
          child_wait_new_with_pid(pid, (child_wait_callback_t *)callback, context); })
22
 
#else
23
 
#  define child_wait_new_with_pid(pid, callback, context) \
24
 
          child_wait_new_with_pid(pid, (child_wait_callback_t *)callback, context)
25
 
#endif
 
16
                        void *context) ATTR_NULL(3);
 
17
#define child_wait_new_with_pid(pid, callback, context) \
 
18
        child_wait_new_with_pid(pid + \
 
19
                CALLBACK_TYPECHECK(callback, void (*)( \
 
20
                        const struct child_wait_status *status, typeof(context))), \
 
21
        (child_wait_callback_t *)callback, context)
26
22
#define child_wait_new(callback, context) \
27
23
        child_wait_new_with_pid((pid_t)-1, callback, context)
28
24
void child_wait_free(struct child_wait **wait);