From: Preben Randhol <randhol+valid_for_reply_from_news@pvv.org>
Subject: Trying to import a C function
Date: Thu, 6 Nov 2003 10:07:21 +0000 (UTC)
Date: 2003-11-06T10:07:21+00:00 [thread overview]
Message-ID: <slrnbqk7aq.q3.randhol+valid_for_reply_from_news@kiuk0156.chembio.ntnu.no> (raw)
Hi
Firstly I didn't manage to get florist (posix binding) to compile so
that is why I'm trying to bind this myself.
I only want to use the C stat function to find the modification date and
access time of files.
int stat(const char *file_name, struct stat *buf);
My question is about the struct the stat function returns.
struct stat {
dev_t st_dev; /* device */
ino_t st_ino; /* inode */
mode_t st_mode; /* protection */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of owner */
gid_t st_gid; /* group ID of owner */
dev_t st_rdev; /* device type (if inode device) */
off_t st_size; /* total size, in bytes */
blksize_t st_blksize; /* blocksize for filesystem I/O */
blkcnt_t st_blocks; /* number of blocks allocated */
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last status change */
};
After much digging I found:
/usr/include/sys/types.h:
typedef __dev_t dev_t;
/usr/include/bits/types.h:
typedef __DEV_T_TYPE __dev_t;
/usr/include/bits/typesizes.h:
#define __DEV_T_TYPE __UQUAD_TYPE
/usr/include/bits/types.h:
#define __UQUAD_TYPE unsigned long long int
So in short
typedef unsigned long long int dev_t;
right?
Now what is the equivalent of unsigned long long int in Ada?
I don't find the info from florist, becuase it looks like you have to
manage to compile it to generate the sources needed.
System: Debian GNU/Linux on i686
Thanks in advance.
Preben
--------------------------
Compile error from florist:
gcc -O2 -DVERSION="\"Florist-3.15p (20020604)\"" -DLIBS="\"-lresolv -lnsl -lrt -lpthread \"" -o c-posix c-posix.c -lresolv -lnsl -lrt -lpthread
c-posix.c:6347:17: missing terminating " character
c-posix.c: In function `create_c':
c-posix.c:6348: error: syntax error before "POSIX_String"
c-posix.c:6348: error: stray '\' in program
c-posix.c:6348:32: missing terminating " character
c-posix.c:6349: error: `n' undeclared (first use in this function)
c-posix.c:6349: error: (Each undeclared identifier is reported only once
c-posix.c:6349: error: for each function it appears in.)
make: *** [c-posix] Error 1
next reply other threads:[~2003-11-06 10:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-06 10:07 Preben Randhol [this message]
2003-11-06 10:40 ` Trying to import a C function Lutz Donnerhacke
2003-11-06 16:05 ` Preben Randhol
2003-11-07 15:02 ` Adrian Knoth
2003-11-07 15:13 ` Preben Randhol
2003-11-10 14:39 ` Lutz Donnerhacke
2003-11-10 16:10 ` Preben Randhol
2003-11-10 16:45 ` Adrian Knoth
2003-11-06 14:48 ` Steve
2003-11-06 17:11 ` Warren W. Gay VE3WWG
2003-11-07 8:44 ` Preben Randhol
2003-11-10 17:39 ` Warren W. Gay VE3WWG
2003-11-11 8:26 ` Preben Randhol
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox