19 messages in net.java.dev.jna.usersRe: [jna-users] stat() not mapping on...
FromSent OnAttachments
Thomas EneboNov 26, 2007 11:00 am 
Timothy WallNov 26, 2007 1:07 pm 
Timothy WallNov 26, 2007 1:58 pm 
Thomas E EneboNov 27, 2007 8:36 am 
Timothy WallNov 27, 2007 9:16 am 
Glick, Gene (GE Indust, Security)Nov 27, 2007 12:45 pm 
Stephen ConnollyNov 27, 2007 3:18 pm 
Glick, Gene (GE Indust, Security)Nov 28, 2007 6:16 am 
Timothy WallNov 28, 2007 9:15 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 11:37 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 11:59 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 12:05 pm 
Timothy WallNov 28, 2007 12:05 pm 
Wayne MeissnerNov 28, 2007 7:59 pm 
Glick, Gene (GE Indust, Security)Nov 29, 2007 6:43 am 
Nikolas LotzNov 29, 2007 7:41 am 
Glick, Gene (GE Indust, Security)Nov 30, 2007 9:05 am 
Timothy WallNov 30, 2007 11:13 am 
Glick, Gene (GE Indust, Security)Nov 30, 2007 11:56 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] stat() not mapping on Linux for me...Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Nov 26, 2007 1:58:04 pm
List:net.java.dev.jna.users

Looks like GCC maps "stat" (and fstat/lstat) to an inline function, which would explain why it doesn't show up in libc.so:

extern __inline__ int __attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf ) { return __xstat (3, __path, __statbuf); }

Library.Handler.invoke or Function.invoke seem like the logical points to tweak the invocation. If this is common, it might make sense to make a function mogrifier option for the library.

On Nov 26, 2007, at 2:00 PM, Thomas Enebo wrote:

Hello,

I am a developer on the JRuby project and I have gotten stat/lstat mapped on MacOS. I have tried running against Linux FC5 (yeah pretty old) and I get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot locate function 'stat'