Fix 64-bit filesystem and type handling
This commit is contained in:
@@ -38,10 +38,18 @@
|
||||
# include <netipx/ipx.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short int uint16;
|
||||
typedef unsigned long int uint32;
|
||||
/* typedef unsigned int uint32; */
|
||||
typedef uint32_t uint32;
|
||||
|
||||
/*
|
||||
* Host-side filesystem identity types.
|
||||
* Do not use int here: st_dev/st_ino are 64-bit on modern systems.
|
||||
*/
|
||||
typedef dev_t mars_dev_t;
|
||||
typedef ino_t mars_ino_t;
|
||||
|
||||
#define IPX_NET_SIZE 4
|
||||
#define IPX_NODE_SIZE 6
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#ifndef _NWFILE_H_
|
||||
#define _NWFILE_H_
|
||||
#include "extpipe.h"
|
||||
#include "emutli.h"
|
||||
|
||||
typedef struct {
|
||||
int task; /* for which task */
|
||||
@@ -65,5 +66,5 @@ extern int nw_log_logical_record(int lock_flag,
|
||||
int timeout,
|
||||
int len,
|
||||
uint8 *data);
|
||||
extern void dump_locks(int dev, int inode, int fd, FILE *f);
|
||||
extern void dump_locks(mars_dev_t dev, mars_ino_t inode, int fd, FILE *f);
|
||||
#endif
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#ifndef _NWSHARE_H_
|
||||
#define _NWSHARE_H_ 1
|
||||
/* changed by: Ingmar Thiemann <ingmar@gefas.com> */
|
||||
extern int share_file(int dev, int inode, int open_mode, int action);
|
||||
extern int share_lock( int dev, int inode, int fd, int action,
|
||||
int lock_flag, int l_start, int l_len, int timeout );
|
||||
extern int share_unlock_all( int dev, int inode, int fd );
|
||||
extern int share_file(mars_dev_t dev, mars_ino_t inode, int open_mode, int action);
|
||||
extern int share_lock(mars_dev_t dev, mars_ino_t inode, int fd, int action,
|
||||
int lock_flag, int l_start, int l_len, int timeout );
|
||||
extern int share_unlock_all(mars_dev_t dev, mars_ino_t inode, int fd);
|
||||
|
||||
extern int share_set_file_add_rm(int lock_flag, int dev, int inode);
|
||||
extern int share_set_file_add_rm(int lock_flag, mars_dev_t dev, mars_ino_t inode);
|
||||
extern int share_set_logrec_add_rm(int lock_flag, int timeout, int len, char *data);
|
||||
extern int share_handle_lock_sets(int type, int lock_flag, int timeout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user