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: <20040106013026.21604.qmail@linuxmail.org> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "peter garrone" To: cygwin AT cygwin DOT com Date: Tue, 06 Jan 2004 09:30:26 +0800 Subject: lstat symbolic link size X-Originating-Ip: 192.10.200.223 X-Originating-Server: ws5-7.us4.outblaze.com lstat returns an incorrect symbolic link size, with size 11 bytes too large. This causes mkcramfs to fail. CYGWIN variable is set to nowinsymlinks. Set to winsymlinks, the size is about 80 bytes too large. This is for a cygwin snapshot from September. This program generates the error for me. Create a symbolic link, e.g. ln -s -f x x compile program. e.g. gcc chklnk.c -o chklnk test. e.g. ./chklnk x Source for chklnk.c --------------------------------------------------- #include #include #include int main(int argc, char ** argv) { int r; struct stat st; if(argc != 2)exit(-1); r = lstat(argv[1],&st); if(r != 0){ printf("lstat fails\n");exit(-1);} if(!S_ISLNK(st.st_mode)){printf("Not a symbolic link\n");exit(0);} printf("Size %d\n",(int)(st.st_size)); return 0; } -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze -- 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/