This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add PAGE_SIZE, PAGE_SHIFT, PAGE_MASK to sys/param.h


Hi,

I'm not sure how this would be taken... The only problem I see in doing this is if we ever decided to start supporting ia64/x86_64. However, at that point we'd have to change a *ton* of other machine-dependant macros as well, so it seems like a rather trivial addition. These macros seem to be fairly standard in both the linux and bsd worlds, so it would be very beneficial if we went ahead and defined them. The reason I would like them is merely as a convienience factor in some socket work I'm doing. I'm assuming that the windows default page shift, 12[*], will be an acceptable value that we can agree on? This macro defines the base value upon which the aother macros calculate their values. Based on that, I have attached a patch with those macros defined and some whitespace/tab cleanup cause by my last patch. Because I'm not sure about my MUA, I've gzipped the patch to preserve formatting.

Cheers,
Nicholas

* This is the same value used by Linux/ia32, *BSD/ia32, Wine, and the Windows DDK in the cvs repo.
2003-10-28  Nicholas Wourms  <nwourms@netscape.net>

    * include/sys/param.h: Define some page counting macros.
    (PAGE_SHIFT): Define.
    (PAGE_SIZE): Define.
    (PAGE_MASK): Define.
    Tidy tab/whitespace formatting from last patch.

Attachment: cygwin-page-macros.patch.txt.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]