xbps-repo(8): 'search' target is now case insensitive.
Along with this change, compat code has been added (from NetBSD) for systems that don't have it. The compat code has been reorganized to be in a common place and its prototypes in compat.h. The configure scripts checks if strcasestr() is available, and uses compat code if not found. This fixes issue #2 on github.com/vanilla/xbps.
This commit is contained in:
18
include/compat.h
Normal file
18
include/compat.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef COMPAT_H
|
||||
#define COMPAT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCASESTR
|
||||
char *strcasestr(const char *, const char *);
|
||||
#endif
|
||||
|
||||
#endif /* COMPAT_H */
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef STRLCAT_H
|
||||
#define STRLCAT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef STRLCPY_H
|
||||
#define STRLCPY_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -35,9 +35,8 @@
|
||||
#include <archive_entry.h>
|
||||
|
||||
#include <xbps_api.h>
|
||||
#include "compat.h"
|
||||
#include "queue.h"
|
||||
#include "strlcpy.h"
|
||||
#include "strlcat.h"
|
||||
#include "fetch.h"
|
||||
|
||||
#define ARCHIVE_READ_BLOCKSIZE 10240
|
||||
|
||||
Reference in New Issue
Block a user