| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:reply-to:message-id:to:subject | |
| :in-reply-to:references:mime-version:content-type | |
| :content-transfer-encoding; q=dns; s=default; b=AxO0HnCXT8bpV2Ie | |
| Ouj3xY5rVuya8r2UV2XvjXQ1eFxgPLI9Zd6LnbCKtI8JgaR+TigS236rVmsxvTtu | |
| IvrHRSHuiaMchb2OnwFlLc7ihtHQm6m7qpQavZXVzhzCdTYa2yLdKvwYbXBH/cpt | |
| mZ2khEtxqe4g3Qm4jPSRc6p2iz0= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:reply-to:message-id:to:subject | |
| :in-reply-to:references:mime-version:content-type | |
| :content-transfer-encoding; s=default; bh=F1syissc4hYxK7atJmXRbt | |
| cVqf4=; b=dohsUewWZbnNo1no35XmzkR3zcWzUcnRczhC4+QmY8NDhldxrBXOKu | |
| hkuqQTo6XqqIk23uOs58Kr05IgQFEtqfonygsJSqIe506xLMGnSPGOiDLNJ7WrHF | |
| XeXlmASFboo+3D35jtXFRH7XmOK3WwEwUsIvs9RkEnOz5brWMVdS4= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=3.5 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 |
| X-HELO: | smtpback.ht-systems.ru |
| Date: | Sat, 15 Feb 2014 22:57:08 +0400 |
| From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
| Reply-To: | Andrey Repin <cygwin AT cygwin DOT com> |
| Message-ID: | <1745533059.20140215225708@mtu-net.ru> |
| To: | Corinna Vinschen <cygwin AT cygwin DOT com> |
| Subject: | Re: Little cygpath improvement request |
| In-Reply-To: | <20140215125606.GM2246@calimero.vinschen.de> |
| References: | <111910987 DOT 20140214222230 AT mtu-net DOT ru> <52FE6397 DOT 5010105 AT cygwin DOT com> <187072112 DOT 20140214234339 AT mtu-net DOT ru> <20140215125606 DOT GM2246 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
Greetings, Corinna Vinschen!
>> >> I would like to request a small functional change for cygpath.
>> >> In the event of empty given path argument (i.e. `cygpath -ml ""') silently
>> >> return an empty result without error message.
>> >> This would greatly simplify wrapper scripts.
>>
>> > Why isn't redirecting the message to /dev/null not sufficient, something
>> > like this (bash syntax)?
>>
>> Because it'll require creating a redirection? And this kind of redundant
>> inserts blurring the code.
>> Returning a non-zero exit code would suffice for debugging purposes.
>>
>> > cygpath -ml "" >/dev/null 2&>1
>>
>> Err, not > /dev/null !!! :D
> dos_path=$( [ -n "${posix_path}" ] && cygpath -ml "${posix_path}" )
> ?
I appreciate the effort, bit this even MORE complicating the possible use
case.
Look, I'm asking for simplification without loosing functionality.
If I NEED to check the path for existence, I would write something to the
extent of
NATIVE=$(cygpath -ml "$2")
if [ $? -gt 0 ]; then yell at user; fi
anyway.
But if I (and the program that I would feed it to) don't care (which is often
the case), the message printed from cygpath doesn't add to functionality.
P.S.
I've tried to rebuild it myself, but hit a roadblock.
While trying to rebuild only winsup/utils, this happens
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for i686-w64-mingw32-g++... i686-w64-mingw32-g++
configure: creating ./config.status
config.status: creating Makefile
c++wrap -fno-exceptions -fno-rtti -O2 -g -fno-threadsafe-statics -fno-rtti -fno-exceptions -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o cygpath.o /c/dev/sdc1/cygwin/src/winsup/utils/cygpath.cc
make: *** No rule to make target '/c/dev/sdc1/cygwin/build/winsup/cygwin/Makefile', needed by '/c/dev/sdc1/cygwin/build/winsup/cygwin/libcygwin.a'. Stop.
An attempt to rebuild whole suite crashes more epically.
make[2]: Entering directory '/c/dev/sdc1/cygwin/build/binutils'
gcc -c -I. -I/c/dev/sdc1/cygwin/src/binutils -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -Wno-error /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l: In function 'yylex':
syslex.l:55:2: error: 'yylval' undeclared (first use in this function)
syslex.l:55:2: note: each undeclared identifier is reported only once for each function it appears in
syslex.l:58:16: error: 'NAME' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l:63:10: error: 'NUMBER' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l:72:23: error: 'UNIT' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l:77:28: error: 'TYPE' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l:84:10: error: 'COND' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.l:85:10: error: 'REPEAT' undeclared (first use in this function)
In file included from /c/dev/sdc1/cygwin/src/binutils/syslex_wrap.c:25:0:
syslex.c: In function 'yy_get_next_buffer':
syslex.c:641:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( n = 0; n < max_size && \
^
syslex.c:1175:3: note: in expansion of macro 'YY_INPUT'
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
^
Makefile:1332: recipe for target 'syslex_wrap.o' failed
make[2]: *** [syslex_wrap.o] Error 1
make[2]: Leaving directory '/c/dev/sdc1/cygwin/build/binutils'
Makefile:3485: recipe for target 'all-binutils' failed
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory '/c/dev/sdc1/cygwin/build'
Makefile:833: recipe for target 'all' failed
make: *** [all] Error 2
I know I'm doing something wrong, but hell if I know, what...
P.P.S.
I've sent a reply with some interesting discoveries to the "new cygwin1"
thread, but it didn't made it to the list, and I did not receive a bounce
either.
Should I bug cygwin-owner about it? Message-id is 41636493 DOT 20140214234111 AT mtu-net DOT ru
--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 15.02.2014, <20:04>
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |