site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2CmRcwf/gb6Oz6jN9yptOdYYDhMsrESyR8dL/0yrEjA=; b=gdDcK/m4kSEVbzBhmiWkEx3QfFxhGkjsWjIaOp+tFU9+qwYARze6ioT0Rj51pEhX99 yvLgpA9FNdpjgxLzeuBKLb8jj5nJNdQ1Qni2yDpsuG1JiJruid9Lpgjr1lG/2uFJ2du0 oaSCFOLb6MRr3pNyH3ryxCrsNLN7QFDByk0mU= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=GHAV2c4ZOuGoEgRwXVjZijKMCD80Qis7CouiSyy4BSX2V2h6YuUN7o2eHmgU9p79hp zERNrmGpnHoEuRH05AadvTY0/mN6xF79gdMPot3ByUIC4c9RKW/dBfb/T9iTKXk/cSDz NDgyHSPewpHDrMo6hbw2z2XClYlO66VXp4HJ4= _P means prototype, this is an old concern and in 2009, you should not pay attention to K&R patch syntax (ten year after the last major revision of the standard), this is a bad idea to dig into BSD Lite/2 code, prefer a modern BSD source that you can run on descent modern CPU, if you are confused by the "size of" you may remove other arch-dependency entries. what was the trick: # ifdef ANSI #define PROTOTYPE(symbol) symbol #else #define PROTOTYPE(symbol) () // NIL for K&R #endif K&R prototype is an oxymoron. Best, On Mon, May 18, 2009 at 11:52 PM, Terry Lambert <tlambert@apple.com> wrote:
Look at the BSD Lite/2 <sys/cdefs.h>.
PS: You can't use the BSD Lite2 <stdio.h> with Mac OS X; things will seriously break.
-- Terry
On May 18, 2009, at 10:12 PM, alex alex wrote:
hi,guy:
Thanks for you answer and now whether the definition __P is a macro definition or not? If yes, where it is declarated and what's the declaration?
thanks!
alex
2009-5-19
Date: Mon, 18 May 2009 21:10:12 -0700 Subject: Re: help in the declaration in stdio.h From: 0xcafefeed@gmail.com To: wujihui@live.com CC: darwin-kernel@lists.apple.com
This is a basic k&r function pointer declaration anyway not really the list to learn C (should be rewritten :-) ) look for websites C for dummies function pointer ecetera
Cheers! On Monday, May 18, 2009, alex alex <wujihui@live.com> wrote:
hi:
I have confused by the following declaration such as :
/* operations */ void *_cookie; /* cookie passed to io functions */ int (*_close) __P((void *)); int (*_read) __P((void *, char *, int)); fpos_t (*_seek) __P((void *, fpos_t, int)); int (*_write) __P((void *, const char *, int));
which are in stdio.h of bsd lite2 source code.
I do not understand this kind of declaration.I will be very approciate if anybody can answer me.
Thanks!
alex
2009-5-19
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!
What can you do with the new Windows Live? Find out _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/tlambert%40apple.com
This email sent to tlambert@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
mm w