On Tue, Oct 03, 2006 at 08:02:01AM -0700, David Daney wrote: > I think so. GCC changed its behavior with respect to this issue between > the 3.3 and 3.4 versions if my memory serves me. I wonder why javanio.c did not use the CPNIO_EXPORT define... now it does. I commit this. - twisti 2009-10-04 Christian Thalinger <twisti@xxxxxxxxxxxxxxxxxxxxx> * native/jni/java-nio/javanio.c (cpnio_read, cpnio_readv) (cpnio_write, cpnio_writev, cpnio_socket, cpnio_connect) (cpnio_accept, cpnio_sendto, cpnio_recvfrom, cpnio_fcntl) (cpnio_select): Use CPNIO_EXPORT. * native/jni/java-nio/javanio.h (CPNIO_EXPORT): Define to static inline instead of extern inline, as newer GCCs changed their behavior. Index: native/jni/java-nio/javanio.c =================================================================== RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/javanio.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 javanio.c --- native/jni/java-nio/javanio.c 17 Sep 2006 22:49:52 -0000 1.2 +++ native/jni/java-nio/javanio.c 4 Oct 2006 10:13:37 -0000 @@ -47,63 +47,63 @@ exception statement from your version. #include <sys/uio.h> #include <unistd.h> -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_read (int fd, void *buf, size_t nbytes) { return read (fd, buf, nbytes); } -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_readv (int fd, const struct iovec *iov, int iovcnt) { return readv (fd, iov, iovcnt); } -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_write (int fd, const void *buf, size_t nbytes) { return write (fd, buf, nbytes); } -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_writev (int fd, const struct iovec *iov, size_t iovcnt) { return writev (fd, iov, iovcnt); } -extern inline int +CPNIO_EXPORT int cpnio_socket (int domain, int type, int protocol) { return socket (domain, type, protocol); } -extern inline int +CPNIO_EXPORT int cpnio_connect (int fd, const struct sockaddr *addr, socklen_t addrlen) { return connect (fd, addr, addrlen); } -extern inline int +CPNIO_EXPORT int cpnio_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) { return accept (fd, addr, addrlen); } -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_sendto (int fd, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { return sendto (fd, msg, len, flags, to, tolen); } -extern inline ssize_t +CPNIO_EXPORT ssize_t cpnio_recvfrom (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { return recvfrom (fd, buf, len, flags, from, fromlen); } -extern inline int +CPNIO_EXPORT int cpnio_fcntl (int fd, int cmd, long arg) { #ifdef HAVE_FCNTL @@ -114,7 +114,7 @@ cpnio_fcntl (int fd, int cmd, long arg) #endif /* HAVE_FCNTL */ } -extern inline int +CPNIO_EXPORT int cpnio_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *excepfds, struct timeval *timeo) { Index: native/jni/java-nio/javanio.h =================================================================== RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/javanio.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 javanio.h --- native/jni/java-nio/javanio.h 17 Sep 2006 22:49:52 -0000 1.2 +++ native/jni/java-nio/javanio.h 4 Oct 2006 10:13:37 -0000 @@ -52,7 +52,7 @@ exception statement from your version. * This macro is used in all function prototypes below; if any additional * keywords need to be added to a prototype, declare them in this macro. */ -#define CPNIO_EXPORT extern inline +#define CPNIO_EXPORT static inline /** * Read bytes from the given file descriptor into the given memory address, which