Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-ID: <3B4B2FAB.CF780EF5@eagercon.com> Date: Tue, 10 Jul 2001 09:39:07 -0700 From: Michael Eager X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Cygwin CC: eager@mvista.com Subject: Error in access() with long file names Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Using the most recent version of Cygwin. The access function return success when given a long string argument which does not represent a valid file. There is some sensitivity to the characters in the string. Removing the colon (and perhaps some other characters) in the example program below gives correct results. Anyone know of a fix? =================================== #include #include char name[] = "aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhh" "hhhhhhhiiiiiiiiiijjjjjjjjjjkkkkkkkkkkkllllllllllmmmmmmmmmmnnnnnnnnnnooooo" "oooooppppppppppqqqqqqqqqqrrrrrrrrrrssssssssssttttttttttuuuuuuuuuuvvvvvvvv" "vvwwwwwwwwwwxxxxxxxxxxyyyyyyyyyyzzzzzzzzzz01234567890:/"; int main() { if (access (name, R_OK) == 0) printf ("%s is readable\n", name); else printf ("%s is NOT readable\n", name); return 0; } -- Michael Eager Eager Consulting eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/