encode_uint32 second parameter should be uint32_t, not unsigned long
[git-daemon2.git] / client / git-compat-util.h
blob5eef66ddd4df1c0a1b48684083e2d6c7fee0ae29
1 /*
2 * Copyright (C) Ilari Liusvaara 2009-2010
4 * This code is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8 #ifndef _compat__h__included__
9 #define _compat__h__included__
11 #include <stdlib.h>
12 #include <stdio.h>
13 #include <sys/types.h>
15 void *xmalloc(size_t size);
16 void warning(const char *fmt, ...);
17 void error(const char *fmt, ...);
18 void die(const char *fmt, ...);
19 void die_errno(const char *fmt, ...);
20 int prefixcmp(const char *str, const char *prefix);
21 FILE *xfdopen(int fd, const char *mode);
22 void write_or_die(int fd, const void *buffer, size_t size);
23 char *xstrdup(const char *str);
24 char *xstrndup(const char *str, size_t n);
26 struct child_process
28 const char **argv;
29 int in;
30 int out;
31 int err;
32 pid_t child_pid;
35 int start_command(struct child_process *child);
36 int finish_command(struct child_process *child);
38 #endif