Coder Social home page Coder Social logo

Comments (5)

howerj avatar howerj commented on August 16, 2024 1

Ok, I've added a getopt implementation (along with untested floating point support), but I'm not using it at the moment. There's now also a version of basename taken from musl-libc.

As for out of memory error when reading a directory, I'll have to think of the best way of fixing that. It might mean having to write an OS wrapper for the functionality for detecting if we can write to a file.

from dbcc.

howerj avatar howerj commented on August 16, 2024

Hi Marton,

Those changes sound good, however I do not like the external dependency on getopt, I know it is available on Unixen, but not Windows. What you could do however, is integrate getopt itself into the library, see

https://stackoverflow.com/questions/10404448/getopt-h-compiling-linux-c-code-in-windows

For a simple implementation (you should rename the 'getopt' function to something else though). I've put the reasoning in one of the pull requests you've raised, I want this program to be simple to compile, install and integrate into both Windows/Unix builds.

Thanks,
Richard.

from dbcc.

martonmiklos avatar martonmiklos commented on August 16, 2024

Hi Richard,

Have you considered using MingW or Cygwin on Windows for compilation?

I know an open source tool called (flashrom)[https://github.com/flashrom/flashrom] where the MingW is used for compilation and it uses the same approach as dbcc: one general Makefile (no autotools).

I would help happily in the tweaking and testing MingW build support.

from dbcc.

howerj avatar howerj commented on August 16, 2024

Ah, yes, I myself use MingW and/or Cygwin on Windows for compilation, the issue is other people and whatever environment they are using. I do most of my testing on Debian, and only occasionally Windows.

If you look at #14, there's a pull request from someone using MSVC (the pull request actually pulls in dependencies specific to the Windows C library, so won't be merged as is). So a MingW/Cygwin only solution isn't acceptable, but by integrating our own getopt solution (I can do this, although probably not tonight), we can satisfy all constraints.

from dbcc.

martonmiklos avatar martonmiklos commented on August 16, 2024

Alright, I am not against of having our own getopt.

I just brought up the MingW/cygwin because I am afraid that the "using only pure C implementations" might bring up some limitations or at least increased efforts in the future. I have just scratched the surface and I hit 3 things with very basic things: libgen, basename, getopt.

But anyway I am fine with your decision.

from dbcc.

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.