This is the mail archive of the cygwin@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]

Re: MS_types and addr_t name polution


On Thu, Dec 12, 2002 at 02:22:20PM -0800, Michael Eager wrote:
>Elfyn McBratney wrote:
>>The addr_t type is used in memory managment (memory addresses??) in
>>/usr/include/sys/mman.h.  If you plan on using this (or is already on
>>the code, mman.h i mean) you may have problems.  What is the type of
>>your addr_t?  is it type char of * (pointer)?
>
>Actually, mman.h uses caddr_t, not addr_t, at least in the cygwin
>1.3.15 system I have installed.  Nothing in /usr/include appears to use
>addr_t.
>
>My typedef of addr_t is for 64-bit int.
>
>>If the code is open source you can just change the addr_t typedef name
>>(in your source) to something else eg.  addr2_t in all of your source
>>files (a simple search and replace).
>
>Yes, I renamed all references to addr_t to a different name.  It's just
>a nuisance and appears to be unnecessary name polution.

AFAICT, this header comes from newlib.  Perhaps an inquiry in that
mailing list would be beneficial.

You might also want to think about more creative ways of dealing with
this type of situation than just renaming every occurrence of addr_t.
Like involving macros maybe?  For the record, addr_t is apparently used
on some older UNIX systems.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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