From owner-freebsd-questions Tue Aug 14 0:35:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f164.pav2.hotmail.com [64.4.37.164]) by hub.freebsd.org (Postfix) with ESMTP id 006C537B412 for ; Tue, 14 Aug 2001 00:35:29 -0700 (PDT) (envelope-from twchim1@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 14 Aug 2001 00:35:28 -0700 Received: from 147.8.182.115 by pv2fd.pav2.hotmail.msn.com with HTTP; Tue, 14 Aug 2001 07:35:28 GMT X-Originating-IP: [147.8.182.115] From: "Wing Tim" To: freebsd-questions@FreeBSD.ORG Subject: Programming Problem Date: Tue, 14 Aug 2001 15:35:28 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 14 Aug 2001 07:35:28.0754 (UTC) FILETIME=[B0C46D20:01C12493] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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