pkg: LOCAL_COPY() becomes PKG_LOCAL_COPY().

pull/15/head
William Pitcock 2012-05-06 22:52:05 -05:00
parent d86827d2dd
commit 9eea62fbc6
2 changed files with 5 additions and 10 deletions

4
pkg.c
View File

@ -224,8 +224,8 @@ pkg_compare_version(const char *a, const char *b)
if (!strcasecmp(a, b))
return 0;
str1 = LOCAL_COPY(a);
str2 = LOCAL_COPY(b);
str1 = PKG_LOCAL_COPY(a);
str2 = PKG_LOCAL_COPY(b);
one = str1;
two = str2;

11
pkg.h
View File

@ -62,16 +62,11 @@ typedef struct pkg_fragment_ pkg_fragment_t;
#define foreach_list_entry_safe(head, nextiter, value) \
for ((value) = (head), (nextiter) = (head) != NULL ? (head)->next : NULL; (value) != NULL; (value) = (nextiter), (nextiter) = (nextiter) != NULL ? (nextiter)->next : NULL)
#define LOCAL_COPY(a) \
#define PKG_LOCAL_COPY(a) \
strcpy(alloca(strlen(a) + 1), a)
#ifndef MIN
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#define PKG_MIN(a,b) (((a) < (b)) ? (a) : (b))
#define PKG_MAX(a,b) (((a) > (b)) ? (a) : (b))
struct pkg_fragment_ {
struct pkg_fragment_ *prev, *next;