summaryrefslogtreecommitdiff
path: root/rpmio/rpmglob.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-05-31 16:34:45 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-05-31 16:48:52 +0300
commit0d9cfcc07f3f117e808e45db0e2669908485e616 (patch)
tree595d315de5b58c3dc59b37a6a6f170fec9a9b7c5 /rpmio/rpmglob.c
parent68f991e50cb3745df20eae02eb7f376baa4219cf (diff)
downloadrpm-0d9cfcc07f3f117e808e45db0e2669908485e616.tar.gz
Eliminate unnecessary glob portability fiddles
- Flags available to our internal glob implementation do not depend on posix/gnu/bsd defines
Diffstat (limited to 'rpmio/rpmglob.c')
-rw-r--r--rpmio/rpmglob.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/rpmio/rpmglob.c b/rpmio/rpmglob.c
index fd8844aa6..237f0d3fc 100644
--- a/rpmio/rpmglob.c
+++ b/rpmio/rpmglob.c
@@ -40,8 +40,6 @@
#define GLOB_NOESCAPE (1 << 6) /* Backslashes don't quote metacharacters. */
#define GLOB_PERIOD (1 << 7) /* Leading `.' can be matched by metachars. */
-#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \
- || defined _GNU_SOURCE)
#define GLOB_MAGCHAR (1 << 8) /* Set in gl_flags if any metachars seen. */
#define GLOB_ALTDIRFUNC (1 << 9) /* Use gl_opendir et al functions. */
#define GLOB_BRACE (1 << 10) /* Expand "{a,b}" to "a" "b". */
@@ -54,22 +52,12 @@
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
-#else
-#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
- GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
- GLOB_PERIOD)
-#endif
/* Error returns from `glob'. */
#define GLOB_NOSPACE 1 /* Ran out of memory. */
#define GLOB_ABORTED 2 /* Read error. */
#define GLOB_NOMATCH 3 /* No matches found. */
#define GLOB_NOSYS 4 /* Not implemented. */
-#ifdef _GNU_SOURCE
-/* Previous versions of this file defined GLOB_ABEND instead of
- GLOB_ABORTED. Provide a compatibility definition here. */
-#define GLOB_ABEND GLOB_ABORTED
-#endif
/* Structure describing a globbing run. */
typedef struct {
@@ -936,10 +924,8 @@ int rpmGlob(const char * patterns, int * argcPtr, ARGV_t * argvPtr)
continue;
}
-#ifdef GLOB_ONLYDIR
if (dir_only)
flags |= GLOB_ONLYDIR;
-#endif
gl.gl_pathc = 0;
gl.gl_pathv = NULL;