Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2001 15:35:28 +0800
From:      "Wing Tim" <twchim1@hotmail.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Programming Problem
Message-ID:  <F164scroFsBuV9yFo0X00009d6c@hotmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,
  I have copied the "malloc.h" header file (without any change) from the 
directory "/usr/src/sys/sys" to a newly created directory. Then I write a 
short program "test.c" and place in the same directory. The program is as 
follows:
--------------------
#include "malloc.h"

main ()
{
  printf("Test!\n");
}
--------------------
  However, when I compiled it using "gcc s.c", I surprisingly found that the 
following errors occur:
-------------------------------------------
# gcc test.c
In file included from test.c:1:
malloc.h:59: syntax error before 'int64_t'
malloc.h:61: syntax error before 'u_long'
malloc.h:63: syntax error before 'u_short'
malloc.h:92: syntax error before 'u_short'
malloc.h:103: syntax error before 'caddr_t'
-------------------------------------------
  Do you know what's the matter? Is that the original header files in 
FreeBSD 4.2 Release have bugs? What should I do if I still want to make use 
of these header files to write programs?
  Thanks!

Regards,
Wing




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F164scroFsBuV9yFo0X00009d6c>