public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Where's sbrk()?
@ 1998-03-20  8:45 Richard Stanton
  1998-03-23 16:39 ` Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Richard Stanton @ 1998-03-20  8:45 UTC (permalink / raw)
  To: egcs

I'm trying to compile the dbmalloc debugging malloc library for use
with egcs (under Windows 95/NT). I'm almost there, but I get the
following error messages:

gcc  -o testmalloc.exe testmalloc.o dbmalloc.a
testmalloc.o(.text+0x3bf):testmalloc.c: undefined reference to `sbrk'
testmalloc.o(.text+0x3ce):testmalloc.c: undefined reference to `end'

What do I need to do to get rid of these errors? 

Looking further, I get a similar message about fork().

Thanks for any help.

Richard Stanton


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where's sbrk()?
  1998-03-20  8:45 Where's sbrk()? Richard Stanton
@ 1998-03-23 16:39 ` Jeffrey A Law
  1998-03-23 19:24 ` Mumit Khan
  1998-03-23 19:24 ` Jim Wilson
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1998-03-23 16:39 UTC (permalink / raw)
  To: Richard Stanton; +Cc: egcs

  In message < 199803200654.WAA29509@shell.wco.com >you write:
  > I'm trying to compile the dbmalloc debugging malloc library for use
  > with egcs (under Windows 95/NT). I'm almost there, but I get the
  > following error messages:
  > 
  > gcc  -o testmalloc.exe testmalloc.o dbmalloc.a
  > testmalloc.o(.text+0x3bf):testmalloc.c: undefined reference to `sbrk'
  > testmalloc.o(.text+0x3ce):testmalloc.c: undefined reference to `end'
sbrk is typically found in the C library.

I have no idea where it would be found for Windows/NT.

Similarly for fork, and many other system calls.

jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where's sbrk()?
  1998-03-20  8:45 Where's sbrk()? Richard Stanton
  1998-03-23 16:39 ` Jeffrey A Law
  1998-03-23 19:24 ` Mumit Khan
@ 1998-03-23 19:24 ` Jim Wilson
  2 siblings, 0 replies; 5+ messages in thread
From: Jim Wilson @ 1998-03-23 19:24 UTC (permalink / raw)
  To: Richard Stanton; +Cc: egcs

	gcc  -o testmalloc.exe testmalloc.o dbmalloc.a
	testmalloc.o(.text+0x3bf):testmalloc.c: undefined reference to `sbrk'
	testmalloc.o(.text+0x3ce):testmalloc.c: undefined reference to `end'

You might try asking on one of the gnuwin32 lists.  This looks more like a
gnuwin32 problem than an EGCS problem.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where's sbrk()?
  1998-03-20  8:45 Where's sbrk()? Richard Stanton
  1998-03-23 16:39 ` Jeffrey A Law
@ 1998-03-23 19:24 ` Mumit Khan
  1998-03-23 19:24 ` Jim Wilson
  2 siblings, 0 replies; 5+ messages in thread
From: Mumit Khan @ 1998-03-23 19:24 UTC (permalink / raw)
  To: Richard Stanton; +Cc: egcs

On Thu, 19 Mar 1998, Richard Stanton wrote:

> I'm trying to compile the dbmalloc debugging malloc library for use
> with egcs (under Windows 95/NT). I'm almost there, but I get the
> following error messages:
> 
> gcc  -o testmalloc.exe testmalloc.o dbmalloc.a
> testmalloc.o(.text+0x3bf):testmalloc.c: undefined reference to `sbrk'
> testmalloc.o(.text+0x3ce):testmalloc.c: undefined reference to `end'
> 
> What do I need to do to get rid of these errors? 
> 
> Looking further, I get a similar message about fork().
> 

Hi Richard,

This has *nothing* to do with egcs. It's a runtime library issue, and
you'll have to either use a runtime that provides sbrk, fork etc (eg.,
Cygwin32 B19 at http://www.cygnus.com/misc/gnu-win32/ or AT&T UWIN
at http://www.research.att.com/sw/tools/uwin/ ) or modify dbmalloc to
use Win32 API (good luck).

Mumit


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Where's sbrk()?
@ 1998-03-23 10:41 Kaz Kylheku
  0 siblings, 0 replies; 5+ messages in thread
From: Kaz Kylheku @ 1998-03-23 10:41 UTC (permalink / raw)
  To: 'Richard Stanton', egcs

On Thursday, March 19, 1998 10:55 PM, Richard Stanton 
[SMTP:stanton@haas.berkeley.edu] wrote:
> I'm trying to compile the dbmalloc debugging malloc library for use
> with egcs (under Windows 95/NT). I'm almost there, but I get the
> following error messages:
>
> gcc  -o testmalloc.exe testmalloc.o dbmalloc.a
> testmalloc.o(.text+0x3bf):testmalloc.c: undefined reference to `sbrk'
> testmalloc.o(.text+0x3ce):testmalloc.c: undefined reference to `end'
>
> What do I need to do to get rid of these errors?

The sbrk() function is the UNIX method (or one of the methods) for
obtaining memory from the operating system. This function
isn't available in the Win32 API.

Why are you asking about this in the EGCS bugs list? Is dbmalloc
a component of EGCS? The compiler can't resolve all your portability
problems. Just because you have GCC running on some operating
system doesn't mean that it has turned into UNIX or that its libraries
magically conform to standards like ANSI C, POSIX.1 or XPG4.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-03-23 19:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-20  8:45 Where's sbrk()? Richard Stanton
1998-03-23 16:39 ` Jeffrey A Law
1998-03-23 19:24 ` Mumit Khan
1998-03-23 19:24 ` Jim Wilson
1998-03-23 10:41 Kaz Kylheku

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).