Re: [systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

2014-09-18 Thread Tom Gundersen
On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing  wrote:
> If the standard library doesn't provide brace
> expansion users just won't get it.

I don't think we should do this, it would mean implicitly providing a
subtly different feature-set to users, which surely would lead to
confusion. I'd rather suggest implementing the missing features in the
libc.

Cheers,

Tom

> ---
>  src/shared/util.c   | 6 ++
>  src/tmpfiles/tmpfiles.c | 6 ++
>  2 files changed, 12 insertions(+)
>
> diff --git a/src/shared/util.c b/src/shared/util.c
> index 9157b2f..76899f5 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -86,6 +86,12 @@
>  #include "virt.h"
>  #include "def.h"
>
> +/* Don't fail if the standard library
> + * doesn't provide brace expansion */
> +#ifndef GLOB_BRACE
> +#define GLOB_BRACE 0
> +#endif
> +
>  int saved_argc = 0;
>  char **saved_argv = NULL;
>
> diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
> index f9830c4..8e1b80a 100644
> --- a/src/tmpfiles/tmpfiles.c
> +++ b/src/tmpfiles/tmpfiles.c
> @@ -55,6 +55,12 @@
>  #include "build.h"
>  #include "copy.h"
>
> +/* Don't fail if the standard library
> + * doesn't provide brace expansion */
> +#ifndef GLOB_BRACE
> +#define GLOB_BRACE 0
> +#endif
> +
>  /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
>   * them in the file system. This is intended to be used to create
>   * properly owned directories beneath /tmp, /var/tmp, /run, which are
> --
> 2.1.0
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

2014-09-18 Thread Emil Renner Berthing
If the standard library doesn't provide brace
expansion users just won't get it.
---
 src/shared/util.c   | 6 ++
 src/tmpfiles/tmpfiles.c | 6 ++
 2 files changed, 12 insertions(+)

diff --git a/src/shared/util.c b/src/shared/util.c
index 9157b2f..76899f5 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -86,6 +86,12 @@
 #include "virt.h"
 #include "def.h"
 
+/* Don't fail if the standard library
+ * doesn't provide brace expansion */
+#ifndef GLOB_BRACE
+#define GLOB_BRACE 0
+#endif
+
 int saved_argc = 0;
 char **saved_argv = NULL;
 
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index f9830c4..8e1b80a 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -55,6 +55,12 @@
 #include "build.h"
 #include "copy.h"
 
+/* Don't fail if the standard library
+ * doesn't provide brace expansion */
+#ifndef GLOB_BRACE
+#define GLOB_BRACE 0
+#endif
+
 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
  * them in the file system. This is intended to be used to create
  * properly owned directories beneath /tmp, /var/tmp, /run, which are
-- 
2.1.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel