Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199911030327.TAA23623@aleph.ssd.hal.com> Subject: Re: Bug report -- gcc-2.95 To: cygwin AT sourceware DOT cygnus DOT com Date: Tue, 2 Nov 1999 19:27:48 -0800 (PST) In-Reply-To: <199911030249.VAA07143@lpb.niams.nih.gov> from "Mark Schoenberg" at Nov 2, 99 09:49:09 pm From: "J. J. Farrell" X-Mailer: ELM [version 2.4 PL23] Content-Type: text > From: Mark Schoenberg > > Mumit Khan's port of gcc-2.95 for Cygwin failed to compile the following > simple subroutine with the command "gcc -v -O2 -mno-cygwin -c mdate.c -o > mdate.o". > > #include > char *mdate() > { > > time_t ts; > char *ntime, *ctime(), buf[100]; > int ni; > > time(&ts); > ntime = ctime(&ts); > strcpy(buf,ntime); > ni= strlen(buf); > buf[ni-1] = '\0'; > strcpy(ntime,buf); > return (ntime); > } > > mdate.c: In function `mdate': > mdate.c:5: `time_t' undeclared (first use in this function) For POSIX and C compliance you should be including rather than . I don't know if this will fix your problem, but it will give you stronger grounds for complaint if it doesn't. Just as an aside: ctime() is declared in so would be better not declared here; you should also be including ; and it seems a waste of effort to copy from and to ntime! -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com