From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b0d028e57f221d4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-06 02:07:22 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Trying to import a C function Date: Thu, 6 Nov 2003 10:07:21 +0000 (UTC) Organization: PVV Message-ID: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1068113241 17488 129.241.83.82 (6 Nov 2003 10:07:21 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Thu, 6 Nov 2003 10:07:21 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) Xref: archiver1.google.com comp.lang.ada:2130 Date: 2003-11-06T10:07:21+00:00 List-Id: 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