Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <426BFD12.2060304@cwilson.fastmail.fm> Date: Sun, 24 Apr 2005 16:09:54 -0400 From: Charles Wilson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Shouldn't getopt_long() return : here? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mikael wrote: > const char *short_options = ""; This is your problem. You need to have ':' as the first character in short_options, if you want the behavior you describe. (Also, if you plan to handle errors -- including printing the error message yourself -- you need to set the global variable opterr to 0) So, you need const char *short_options = ":"; /* opterr = 0; */ /* maybe */ -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/