pdp10-stdio: add pdp10_ftello(), include <sys/types.h> for off_t

This commit is contained in:
Mikael Pettersson 2013-07-05 16:59:13 +00:00
parent 8ea37e57b9
commit 73e1d21104
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#ifndef PDP10_STDIO_H
#define PDP10_STDIO_H
#include <sys/types.h> /* off_t */
#include <stdint.h>
struct pdp10_file;
@ -26,6 +27,7 @@ enum {
PDP10_SEEK_END = 2,
};
int pdp10_fseeko(PDP10_FILE *pdp10fp, off_t offset, int whence);
off_t pdp10_ftello(PDP10_FILE *pdp10fp);
/* pdp10_fread() and pdp10_fwrite() deliberately only permit transfers of strings
* (size == 1), marshalled 9/18/36-bit primitives (nmemb == 1, size == 1, 2, or 4),

View File

@ -332,6 +332,11 @@ int pdp10_fseeko(PDP10_FILE *pdp10fp, off_t offset, int whence)
return 0;
}
off_t pdp10_ftello(PDP10_FILE *pdp10fp)
{
return pdp10fp->nonet_pos;
}
/*
* On an octet-based host, in-core data structures representing nonet-based
* target data will in fact contain oversize octet-based host data. For