Coder Social home page Coder Social logo

off_t data type is unknown about pforth HOT 6 CLOSED

phmarek avatar phmarek commented on June 15, 2024
off_t data type is unknown

from pforth.

Comments (6)

philburk avatar philburk commented on June 15, 2024

What target are you building for?
What host are you building on?

from pforth.

phmarek avatar phmarek commented on June 15, 2024

That's on Debian testing/unstable, amd64; not cross-compiling.

from pforth.

philburk avatar philburk commented on June 15, 2024

The use of off_t was added in this commit:
336369a

Because off_t is not very standard, I recommend replacing off_t with a new typedef that is based on int64_t.

Forth uses two cells to hold a seek offset, which will either be 64 or 128-bits in pForth.
We don't really need to go to 128-bit offsets so internally we can just always use 64.

from pforth.

philburk avatar philburk commented on June 15, 2024

To test the FILE words affected by this change.

s" ../../readme.txt"  r/o open-file . value FID

That should print 0

100 s>d fid reposition-file
fid file-position

Should return a position of 100

fid close-file

from pforth.

philburk avatar philburk commented on June 15, 2024

I decided to define file_offset_t as long because it is more compatible with stdout.

Pending fix here:
#44

from pforth.

philburk avatar philburk commented on June 15, 2024

This was fixed by #44

from pforth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.