Fix broken or missing includes

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-10-22 21:33:47 -07:00
parent 46eaa5c542
commit 0c4f7d821c
4 changed files with 11 additions and 8 deletions

View file

@ -22,13 +22,14 @@
#include "config.h" #include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <string.h> #include <string.h>
#include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <time.h>
#include <errno.h>
#include <download.h> #include <download.h>
/* libalpm */ /* libalpm */

View file

@ -27,20 +27,20 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <libintl.h> /* here so it doesn't need to be included elsewhere */
#include <time.h> #include <time.h>
#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0)
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
/* define _() as shortcut for gettext() */
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
#include <libintl.h> /* here so it doesn't need to be included elsewhere */
/* define _() as shortcut for gettext() */
#define _(str) dgettext ("libalpm", str) #define _(str) dgettext ("libalpm", str)
#else #else
#define _(s) s #define _(s) s
#endif #endif
#define FREE(p) do { if (p) { free(p); p = NULL; } } while(0)
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
int _alpm_makepath(const char *path); int _alpm_makepath(const char *path);
int _alpm_copyfile(const char *src, const char *dest); int _alpm_copyfile(const char *src, const char *dest);
char *_alpm_strtrim(char *str); char *_alpm_strtrim(char *str);

View file

@ -24,6 +24,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h>
#include <unistd.h> #include <unistd.h>
#include <dirent.h> #include <dirent.h>

View file

@ -24,6 +24,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>