[xinit] XSLASHGLOB

Alan Coopersmith alan.coopersmith at oracle.com
Mon Apr 1 22:18:10 PDT 2013


On 07/12/12 04:57 AM, Thomas Klausner wrote:
> Hi!
> 
> While looking at NetBSD xsrc patches I found one for xinit.
> 
> Index: xinit/dist/xinitrc.cpp
> ===================================================================
> RCS file: /cvsroot/xsrc/external/mit/xinit/dist/xinitrc.cpp,v
> retrieving revision 1.1.1.3
> retrieving revision 1.2
> diff -u -r1.1.1.3 -r1.2
> --- xinit/dist/xinitrc.cpp      21 Nov 2010 03:47:48 -0000      1.1.1.3
> +++ xinit/dist/xinitrc.cpp      6 Mar 2011 01:05:51 -0000       1.2
> @@ -84,8 +84,9 @@
>  XCOMM This is the fallback case if nothing else is executed above
>  #endif /* !defined(__SCO__)  && !defined(__UNIXWARE__) */
> 
> +XCOMM do not use slash-star in the glob; slash-questionmark-star is equivalent
>  if [ -d XINITDIR/xinitrc.d ] ; then
> -       for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
> +       for f in XINITDIR/xinitrc.d/?*.sh ; do
>                 [ -x "$f" ] && . "$f"
>         done
>         unset f
> 
> The commit message was:
> Use xinitrc.d/?*.sh as the matching pattern instead of needing a
> fragile sed substitution XSLASHGLOB to produce xinitrc.d/*.sh. (If
> that were used literally the slash-star would confuse cpp.)
> 
> Fixes PR 44619. Patch has been sent upstream.
> 
> 
> I don't know where it was sent or if the discussion had a result, so
> I'd like to know if the patch would be accepted? (with an additional
> patch removing it from cpprules.in as well).

Seems reasonable to me - I don't remember discussing it before, and does
seem cleaner than patching it up in sed.

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list