From: "cwg" Newsgroups: comp.os.msdos.djgpp References: <3BB5378E DOT 8E596BC8 AT worldnet DOT att DOT net> <3BB56F83 DOT 5DD6EEAB AT yahoo DOT com> <3BB5FAAD DOT AB8B09C1 AT worldnet DOT att DOT net> Subject: Re: what's #include ? Lines: 80 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: X-Complaints-To: abuse AT usenetserver DOT com X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly. NNTP-Posting-Date: Sat, 29 Sep 2001 14:51:55 EDT Organization: BELLSOUTH.net Date: Sat, 29 Sep 2001 14:00:54 -0500 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alright you acronymizers, GREP? Have no idea yet where to relocate the 'C Standard', done been eight years since I last coded, now I find myself in a bit of a crunch because I needs to create a com port driven version of a SB recording/playback program I found out there, mainly, S B 1 6 S o u n d Written by Ethan Brodsky Copyright 1995 by Ethan Brodsky. All rights reserved. Did locate a disk which contained Borland C/C++, in ALLOC.H: void _FAR *_Cdecl calloc(size_t __nitems, size_t __size); void _Cdecl free(void _FAR *__block); void _FAR *_Cdecl malloc(size_t __size); void _FAR *_Cdecl realloc(void _FAR *__block, size_t __size); So, in the below header, I comment out the unused include; #include #include #include #include #include using Rhide, Make, and I get this: sbio.c(78) Error: parse error before `*' sbio.c(78) Error: `interrupt' declared as function returning a function sbio.c(78) Error: function `interrupt' is initialized like a variable sbio.c(247) Error: parse error before `inthandler' (78) void interrupt (*oldintvector)() = NULL; "Les Cargill" wrote in message news:3BB5FAAD DOT AB8B09C1 AT worldnet DOT att DOT net... > CBFalconer wrote: > > Les Cargill wrote: > > > cwg wrote: > > > > it's in the turbo-c project i'm working on. > > > > what would be the djgpp replacement? > > > Possibly ? grep is our friend... > > No, it is in . The C standard is your friend. > If he was interested in the 'C' standard, he would have looked there > first. > > Just to be persnickety, he asked about . There are things > declared there other than malloc(). There is probably no direct > replacement in GNU. I don't know. Never had to ask the > question before. > > I also noticed, in the Borland , this: > File MALLOC.H: > /* malloc.h > #if !defined(__MALLOC_H) > #define __MALLOC_H > #if !defined(__ALLOC_H) > #include > > > Borland's is sorta disjoint from > the GNU usual stuff. malloc() does get prototyped in both > places in Borland. There are other malloc() variants, and > more of them appear in than in . I always > disliked that - it should appear in one place. > > In general, my preferred method of resolving includes when porting > to an unfmailiar environment is to remove the offending include, > making sure -Wall(or equivalent) is on, and making a list of all > the prototype errors. > > grep for those, then massage until warnings disappear. > > > > -- > > Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) > > (Remove "XXXX" from reply address. yahoo works unmodified) > > mailto:uce AT ftc DOT gov (for spambots to harvest) > > -- > http://home.att.net/~lcargill