From d37ad048732fbcef38aec001993553896dbe4198 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 15 Oct 2006 19:31:03 +0000 Subject: Merged frugalware changes (too many to list). Also added some config file handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files) --- lib/libalpm/util.h | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'lib/libalpm/util.h') diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index 9b0c9a0d..205facae 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -2,6 +2,10 @@ * util.h * * Copyright (c) 2002-2006 by Judd Vinet + * Copyright (c) 2005 by Aurelien Foret + * Copyright (c) 2005 by Christian Hamar + * Copyright (c) 2006 by David Kimpe + * Copyright (c) 2005, 2006 by Miklos Vajna * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,8 +26,13 @@ #define _ALPM_UTIL_H #include +#if defined(__OpenBSD__) +#include "/usr/local/include/archive.h" +#include "/usr/local/include/archive_entry.h" +#else #include #include +#endif #define FREE(p) do { if (p) { free(p); p = NULL; } } while(0) @@ -34,10 +43,17 @@ s1[(len)-1] = 0; \ } while(0) -#define _(str) dgettext("libalpm", str) - #define ARCHIVE_EXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_TIME +#ifdef ENABLE_NLS +#define _(str) dgettext ("libalpm", str) +#else +#define _(s) s +#endif + +#define STARTSTR "START " +#define DONESTR "DONE " + int _alpm_makepath(char *path); int _alpm_copyfile(char *src, char *dest); char *_alpm_strtoupper(char *str); @@ -46,10 +62,19 @@ int _alpm_lckmk(char *file); int _alpm_lckrm(char *file); int _alpm_unpack(char *archive, const char *prefix, const char *fn); int _alpm_rmrf(char *path); -int _alpm_archive_read_entry_data_into_fd(struct archive *archive, int fd); int _alpm_logaction(unsigned char usesyslog, FILE *f, char *fmt, ...); int _alpm_ldconfig(char *root); -int _alpm_runscriptlet(char *util, char *installfn, char *script, char *ver, char *oldver); +#ifdef _ALPM_TRANS_H +int _alpm_runscriptlet(char *util, char *installfn, char *script, char *ver, char *oldver, pmtrans_t *trans); +#ifndef __sun__ +int _alpm_check_freespace(pmtrans_t *trans, PMList **data); +#endif +#endif +int _alpm_reg_match(char *string, char *pattern); +#ifdef __sun__ +char* strsep(char** str, const char* delims); +char* mkdtemp(char *template); +#endif #endif /* _ALPM_UTIL_H */ -- cgit v1.2.3-54-g00ecf