This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: relocate bits of posix.cc into natPosix*.cc?



Hey, setting aside any grand plans of reorganizing gcj's
platform-specific code, what should I do here as a short-term
solution? I see three options:

1. What I write below: eliminate posix.cc, it only defines two
   functions which could go elsewhere.

2. Inline _Jv_gettimeofday(), leave _Jv_select() in posix.cc, and add
   configure hackery to make posix.cc not build on win32.

3. "#ifdef POSIX" the entire file.

  - a


Adam Megacz <gcj@lists.megacz.com> writes:
> posix.cc/posix.h define two functions: _Jv_select() and _Jv_gettimeofday().
> 
> _Jv_gettimeofday() is used only by natSystem.cc -- I propose that it
> be moved into that file, and perhaps even inlined directly into
> java::lang::System::currentTimeMillis().
> 
> _Jv_select() is used by natPlainSocketImpl.cc,
> natPlainDatagramSocketImpl.cc, and natFileDescriptorPosix.cc, all of
> which are POSIX-specific (see my last post recommending that we rename
> the latter two to nat${PLATFORM}SocketImpl). I would suggest moving
> _Jv_select() into natFileDescriptorPosix.cc and making it a global so
> that it can be used in the natSocketImpl's.
> 
> posix.h would retain a definition for _Jv_select().
> 
> What do you all think?
> 
>   - a
> 

-- 


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