aboutsummaryrefslogtreecommitdiff
path: root/libjava/include/win32.h
AgeCommit message (Collapse)AuthorFilesLines
2003-12-02configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi.Mohan Embar1-0/+47
* configure.in: Added new MinGW-specific configure flag --with-win32-nlsapi. Added new AC_DEFINE MINGW_LIBGCJ_UNICODE. Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi is set to unicows. * configure: Rebuilt. * include/config.h.in: Rebuilt. * win32.cc (_Jv_Win32NewString): Implemented. (nativeToUnicode): New helper function defined only for non-UNICODE builds. (unicodeToNative): Likewise. (_Jv_Win32TempString): Implemented. (lots): Refactored using tchar.h macros. (WSAEventWrapper): Use _Jv_Win32NewString. (_Jv_platform_initialize): Use GetModuleFileNameA instead of GetModuleFileName. (_Jv_platform_initProperties): Use _Jv_Win32NewString. Use temporary stack buffer instead of a heap buffer. * include/win32.h Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is defined; added tchar.h include. (_Jv_Win32TempString): Declared new helper class. (JV_TEMP_STRING_WIN32): New helper macro. (_Jv_Win32NewString): Declared new helper method. * java/io/natFileDescriptorWin32.cc (open): Use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (write): Reformatted slightly. * java/io/natFileWin32.cc (lots): Use tchar.h macros; use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING. (getCanonicalPath): Use _Jv_Win32NewString instead of JvNewStringUTF. (performList): Likewise. * java/lang/natWin32Process.cc (ChildProcessPipe): Use tchar.h macros. (startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32, and UNICODE environment flag for CreateProcess. * java/net/natNetworkInterfaceWin32.cc (winsock2GetRealNetworkInterfaces): Use tchar.h macros and _Jv_Win32NewString. From-SVN: r74201
2003-11-07win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern.Mohan Embar1-5/+2
* include/win32.h (_Jv_platform_close_on_exec): Changed signature and declared extern. * win32.cc (_Jv_platform_close_on_exec): Implemented. * gnu/java/net/natPlainDatagramSocketImplWin32.cc (create): Use new signature of _Jv_platform_close_on_exec. * gnu/java/net/natPlainSocketImplWin32.cc (create): Eliminated a few typecasts Use new signature of _Jv_platform_close_on_exec. (accept): Eliminated a few typecasts Use new signature of _Jv_platform_close_on_exec. * java/io/natFileDescriptorWin32.cc (open): Use _Jv_platform_close_on_exec. From-SVN: r73325
2003-10-17win32.cc: (_Jv_pipe) Implemented.Mohan Embar1-0/+1
* win32.cc: (_Jv_pipe) Implemented. * gnu/java/nio/natPipeImpl.cc: (nativeInit) Use _Jv_pipe instead of ::pipe. * include/posix.h: (_Jv_pipe) New inline. * include/win32.h: (_Jv_pipe) New declaration. From-SVN: r72616
2003-08-29win32.cc: fixed tab...Mohan Embar1-60/+48
* win32.cc: fixed tab, indentation and whitespace inconsistencies removed jvm.h include added includes java/lang/UnsupportedOperationException.h, java/io/IOException.h, java/net/SocketException.h (WSAEventWrapper): class implementation (_Jv_WinStrError): implemented both overloads (_Jv_ThrowIOException): implemented both overloads (_Jv_ThrowSocketException): implemented both overloads (_Jv_select): implemented * include/win32.h: fixed tab, indentation and whitespace inconsistencies wrapped <windows.h> include with #define WIN32_LEAN_AND_MEAN added jvm.h include (WSAEventWrapper): added class declaration (_Jv_WinStrError): added both overload declarations (_Jv_ThrowIOException): added both overload declarations (_Jv_ThrowSocketException): added both overload declarations removed ENOTCONN, ECONNRESET and ENOPROTOOPT defines (_Jv_select): added declaration (_Jv_socket): removed (_Jv_connect): removed (_Jv_close): removed (_Jv_bind): removed (_Jv_accept): removed (_Jv_listen): removed (_Jv_write): removed (_Jv_read): removed * java/io/natFileDescriptorWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (testCanUseGetHandleInfo): new function which tests whether Win32 GetHandleInformation() call can be used with console buffer handles (only supported on >=WinNT 5.0) (winerr): removed (superseded by _Jv_WinStrError in include/win32.h) (valid): rewrote implementation using GetHandleInformation() (sync): changed exception throwing to use error string and exception helper methods declared in include/win32.h (open): likewise (write): likewise (setLength): likewise (close): likewise (seek): likewise (getFilePointer): likewise (read): likewise * java/io/natFileWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include (_access): use JV_TEMP_UTF_STRING (_stat): likewise (performMkDir): use JV_TEMP_UTF_STRING (performRenameTo): likewise (performDelete): likewise (performCreate): likewise (performSetReadOnly): likewise (performSetLastModified): likewise * java/lang/natWin32Process.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed includes gcj/cni.h, jvm.h (new_string): removed (startProcess): use JV_TEMP_UTF_STRING, changed exception throwing to use error string and exception helper methods declared in include/win32.h * java/net/natInetAddressWin32.cc: fixed tab, indentation and whitespace inconsistencies replaced <windows.h> #include with <platform.h> removed jvm.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (aton): use JV_TEMP_UTF_STRING removed POSIX conditional code not relevant to Win32 (lookup): likewise (getLocalHostName): likewise * java/net/natNetworkInterfaceWin32.cc: fixed tab, indentation and whitespace inconsistencies removed unnecessary windows.h, winsock.h and gcj/cni.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 (winsock2GetRealNetworkInterfaces): new function to compute network interfaces via Winsock2 API (determineGetRealNetworkInterfacesFN): new function for returning a function pointer to the function used to compute network interfaces. (getRealNetworkInterfaces): implemented * java/net/natPlainDatagramSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h include removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (peekData): implemented timeout support (receive): likewise * java/net/natPlainSocketImplWin32.cc: fixed tab, indentation and whitespace inconsistencies removed gcj/cni.h and gcj/javaprims.h includes removed DISABLE_JAVA_NET conditional code removed POSIX conditional code not relevant to Win32 changed net POSIXisms to Win32isms replaced _Jv socket-related calls with their real Win32 equivalents changed exception throwing to use error string and exception helper methods declared in include/win32.h (throwConnectException): helper function for connect() (connect): implemented timeout support (accept): likewise (doRead): new helper function common to both read() method overloads, includes timeout support (read): implemented both overloads in terms of doRead() (available): implemented using ioctlsocket() From-SVN: r70904
2003-03-17resolve.cc (ncode): Use _Jv_platform_ffi_abi.Tom Tromey1-0/+16
* resolve.cc (ncode): Use _Jv_platform_ffi_abi. Include platform.h. * java/lang/natRuntime.cc (insertSystemProperties): Use _Jv_platform_path_separator. (nativeGetLibname): Use _Jv_platform_file_separator. (_load): Use _Jv_platform_onload_names. (onload_names): New global. * include/win32.h (_Jv_platform_file_separator): New define. (_Jv_platform_path_separator): Likewise. (_Jv_platform_onload_names): Likewise. (_Jv_platform_ffi_abi): Likewise. * include/posix.h (_Jv_platform_file_separator): New define. (_Jv_platform_path_separator): Likewise. (_Jv_platform_onload_names): Likewise. (_Jv_platform_ffi_abi): Likewise. From-SVN: r64461
2003-02-13win32.h: Include ws2tcpip.h instead of winsock.h to obtain definition of the ↵Ranjit Mathew1-5/+3
socklen_t type. 2003-02-12 Ranjit Mathew <rmathew@hotmail.com> * include/win32.h: Include ws2tcpip.h instead of winsock.h to obtain definition of the socklen_t type. Remove IP_TOS definition - not needed with ws2tcpip.h (_Jv_connect): Correct slight formatting error. From-SVN: r62801
2003-01-28configure.in: Specifically define HAVE_BACKTRACE if building for MinGW.Ranjit Mathew1-2/+0
2003-01-27 Ranjit Mathew <rmathew@hotmail.com> * configure.in: Specifically define HAVE_BACKTRACE if building for MinGW. * include/win32.h: Remove HAVE_BACKTRACE definition. * gnu/gcj/runtime/natStackTrace.cc: Include platform.h. * configure: Rebuilt. From-SVN: r62000
2003-01-07posix.h (_Jv_platform_usleep): Wrap in ifdef JV_HASH_SYNCHRONIZATION.Tom Tromey1-0/+2
* include/posix.h (_Jv_platform_usleep): Wrap in ifdef JV_HASH_SYNCHRONIZATION. * include/win32.h (_Jv_platform_usleep): Wrap in ifdef JV_HASH_SYNCHRONIZATION. From-SVN: r60998
2002-12-31re PR libgcj/8997 (spin() calls Thread.sleep)Tom Tromey1-0/+13
2002-12-31 Tom Tromey <tromey@redhat.com> Ranjit Mathew <rmathew@hotmail.com> Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. Include platform.h. * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com> From-SVN: r60700
2002-12-10win32.h: Fixed typo in "DISABLE_JAVA_NET".Tom Tromey1-4/+4
* include/win32.h: Fixed typo in "DISABLE_JAVA_NET". From Laurent Bardet <l.bardet@magic.fr>. From-SVN: r60013
2002-12-10win32.h (_Jv_platform_solib_prefix): New define.Tom Tromey1-0/+4
* include/win32.h (_Jv_platform_solib_prefix): New define. (_Jv_platform_solib_suffix): Likewise. * include/posix.h (_Jv_platform_solib_prefix): New define. (_Jv_platform_solib_suffix): Likewise. * java/lang/natRuntime.cc: Include StackTrace.h. (_load): Use findLibrary and new platform defines. (nativeGetLibname): Use new platform defines. From-SVN: r59976
2002-11-222002-11-22 Michael Koch <konqueror@gmx.de>Michael Koch1-8/+9
* include/posix.h: (_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET. * include/win32.h: (_Jv_platform_on_close): Moved out of #ifndef DISBALE_JAVA_NET. (backtrace): Moved out of #ifndef DISBALE_JAVA_NET. From-SVN: r59374
2002-11-21posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NETMichael Koch1-0/+8
2002-11-21 Michael Koch <konqueror@gmx.de> * include/posic.h: Moved new functions into a #ifndef DISABLE_JAVA_NET * include/win32.h: Moved new functions into a #ifndef DISABLE_JAVA_NET From-SVN: r59346
2002-11-212002-11-21 Michael Koch <konqueror@gmx.de>Michael Koch1-0/+55
* include/posix.h (_Jv_socket): New method. (_Jv_connect): New method. (_Jv_close): New method. (_Jv_platform_close_on_exec): Prefixed system function with "::". (_Jv_bind): New method. (_Jv_listen): New method. (_Jv_write): New method. (_Jv_read): New method. * include/win32.h (_Jv_socket): New method. (_Jv_connect): New method. (_Jv_close): New method. (_Jv_bind): New method. (_Jv_listen): New method. (_Jv_write): New method. (_Jv_read): New method. * java/net/natNetworkInterface.cc: Include platform.h, removed inclusion of socket.h (getRealNetworkInterfaces): Replaced ::socket() by _Jv_socket() and ::close() by _Jv_close(). * java/net/natPlainDatagramSocketImpl.cc: Removed include of socket.h, definition of NATIVE_CLOSE and _Jv_bind, added some new lines to make code more readable. (create): Replaced ::socket() by _Jv_socket(). (close): Replaced NATIVE_CLOSE() by _Jv_close(). * java/net/natPlainSocketImpl.cc: Removed definition of NATIVE_CLOSE, _Jv_bind, Jv_connect and _Jv_accept, removed include of socket.h, removed some windows defines (now in include/win32.h). (create): Replaced ::socket() by _Jv_socket(). (close): Replaced NATIVE_CLOSE() by _Jv_close(). (write): Replaced ::read by _Jv_write(). (read): Replaced ::read by _Jv_read(). From-SVN: r59338
2002-09-14natPlainDatagramSocket.cc: removed #include <ws2tcpip.h>; the mingw header ↵Adam Megacz1-0/+1
is broken (conflicts with itself). 2002-09-14 Adam Megacz <adam@xwt.org> * java/net/natPlainDatagramSocket.cc: removed #include <ws2tcpip.h>; the mingw header is broken (conflicts with itself). * include/win32.h: included definition for IP_TOS to satisfy natPlainDatagramSocket.cc From-SVN: r57151
2002-08-27natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define.Tony Kimball1-2/+1
2002-08-27 Tony Kimball <alk@pobox.com> Tom Tromey <tromey@redhat.com> * java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New define. (::close): Removed. (PlainDatagramSocketImpl::close): Use NATIVE_CLOSE. * java/net/natPlainSocketImpl.cc (NATIVE_CLOSE): New define. (::close): Removed. (PlainSocketImpl::close): Use NATIVE_CLOSE. * include/win32.h (getcwd): Removed declaration. Include io.h. Co-Authored-By: Tom Tromey <tromey@redhat.com> From-SVN: r56605
2002-08-26win32.h (getcwd): copied function declaration as temporary fix for header ↵Adam Megacz1-0/+3
confusion. 2002-08-25 Adam Megacz <adam@xwt.org> * include/win32.h (getcwd): copied function declaration as temporary fix for header confusion. From-SVN: r56574
2002-04-24win32.cc, win32.cc (backtrace): Added this function because Win32 does not ↵Adam Megacz1-0/+6
supply it. 2002-04-23 Adam Megacz <adam@xwt.org> * win32.cc, include/win32.cc (backtrace): Added this function because Win32 does not supply it. From-SVN: r52701
2002-04-07natSystem.cc (init_properties): Call new function _Jv_platform_initProperties.Adam King1-0/+2
2002-04-07 Adam King <aking@dreammechanics.com> * java/lang/natSystem.cc (init_properties): Call new function _Jv_platform_initProperties. * win32 (_Jv_platform_initProperties): New function that adds Win32 support for the System properties os.name, os.arch, os.version, user.name, user.home, and user.dir. * include/posix.h, include/win32.h, posix.cc: New function _Jv_platform_initProperties. From-SVN: r51989
2002-04-05win32.h (_Jv_platform_close_on_exec): added inline modifier.Adam Megacz1-1/+2
2002-04-04 Adam Megacz <adam@xwt.org> * include/win32.h (_Jv_platform_close_on_exec): added inline modifier. From-SVN: r51899
2002-03-10Win32Process.java: Added comment.Tom Tromey1-0/+5
* java/lang/Win32Process.java: Added comment. * include/posix.h (_Jv_platform_close_on_exec): New function. Include fcntl.h. * include/win32.h (_Jv_platform_close_on_exec): New function. * java/net/natPlainSocketImpl.cc (create): Set close-on-exec flag. (accept): Likewise. * java/net/natPlainDatagramSocketImpl.cc (create): Set close-on-exec flag. * java/io/natFileDescriptorPosix.cc (open): Set close-on-exec flag. From-SVN: r50536
2002-03-08win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong.Adam Megacz1-1/+2
2002-03-07 Adam Megacz <adam@xwt.org> * win32.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong. Added implementation * posix.cc (_Jv_platform_gettimeofday): Now takes no args, returns jlong. * win32.h (_Jv_platform_gettimeofday): Now takes no args, returns jlong. * posix.h (_Jv_platform_gettimeofday): Now takes no args, returns jlong. * java/lang/natSystem.cc (currentTimeMillis): Now uses updated _Jv_platform_gettimeofday signature. From-SVN: r50416
2002-02-12win32.h: Added _Jv_platform_gettimeofday.Adam Megacz1-0/+1
2002-02-11 Adam Megacz <adam@xwt.org> * include/win32.h: Added _Jv_platform_gettimeofday. * win32.cc (_Jv_platform_gettimeofday): Added dummy function. From-SVN: r49693
2002-02-07prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize.Tom Tromey1-1/+1
* prims.cc (_Jv_CreateJavaVM): Call _Jv_platform_initialize. * win32.cc (win32_exception_handler): Now static. * include/win32.h (_Jv_platform_initialize): Declare. (win32_exception_handler): Don't declare. * java/lang/natSystem.cc (currentTimeMillis): Use _Jv_platform_gettimeofday. * posix.cc (_Jv_platform_gettimeofday): Renamed. (_Jv_select): Use new name. (_Jv_platform_initialize): New function. * include/posix.h (_Jv_platform_gettimeofday): Renamed from _Jv_gettimeofday. (_Jv_platform_initialize): Declare. From-SVN: r49583
2002-02-07configure.in: Changed mingw) to *mingw*).Adam Megacz1-0/+22
2002-02-06 Adam Megacz <adam@xwt.org> * configure.in: Changed mingw) to *mingw*). * win32.cc: Created this file. * win32.h: Created this file. * win32.cc, prims.cc, win32.h (win32_exception_handler): Moved win32_exception_handler from prims.cc to win32.cc, added header in win32.h. * prims.cc: removed some #ifdef-WIN32'd headers which are no longer needed now that we have platform.h From-SVN: r49566