delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/06/26/06:39:52

Message-ID: <395709F8.3102F10A@softhome.net>
Date: Mon, 26 Jun 2000 09:44:56 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.73 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp-workers AT delorie DOT com
Subject: Re: Patch: minor getcwd.c cleanup
References: <39563FB5 DOT A8C1172F AT softhome DOT net> <200006252050 DOT XAA03085 AT alpha DOT netvision DOT net DOT il>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:
> IMHO, it's not a good idea to remove <string.h>, since getcwd uses
> memcpy and strcmp.  It's true that go32.h includes string.h already,
> but how many people would expect that?  If someone removes go32.h,
> they will have a puzzle on their hands.

OK to install with <string.h>?

Laurynas

Index: getcwd.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/unistd/getcwd.c,v
retrieving revision 1.3
diff -u -r1.3 getcwd.c
--- getcwd.c	1996/08/31 22:09:32	1.3
+++ getcwd.c	2000/06/26 07:40:21
@@ -4,7 +4,6 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <ctype.h>
 #include <string.h>
 #include <fcntl.h>
 #include <errno.h>
@@ -19,7 +18,8 @@
 {
   char *bp;
   __dpmi_regs r;
-  int needed_length, c;
+  size_t needed_length;
+  int c;
   unsigned use_lfn = _USE_LFN;
   int preserve_case = _preserve_fncase();
   char *name_start;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019