{"id":24746626,"url":"https://github.com/samuelmarks/freebsd-getopt-portable","last_synced_at":"2026-04-19T06:49:21.200Z","repository":{"id":168066325,"uuid":"643684387","full_name":"SamuelMarks/freebsd-getopt-portable","owner":"SamuelMarks","description":"FreeBSD's `getopt` and `getopt_long` ported to Windows \u0026 others","archived":false,"fork":false,"pushed_at":"2023-07-01T16:25:44.000Z","size":68,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-22T23:19:51.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelMarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-BSD.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-21T23:35:39.000Z","updated_at":"2023-08-13T08:21:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"29583e4c-6784-46e9-b335-19bd13df7c8a","html_url":"https://github.com/SamuelMarks/freebsd-getopt-portable","commit_stats":null,"previous_names":["samuelmarks/freebsd-getopt-for-windows","samuelmarks/freebsd-getopt-portable"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelMarks/freebsd-getopt-portable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Ffreebsd-getopt-portable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Ffreebsd-getopt-portable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Ffreebsd-getopt-portable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Ffreebsd-getopt-portable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelMarks","download_url":"https://codeload.github.com/SamuelMarks/freebsd-getopt-portable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Ffreebsd-getopt-portable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31997804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T04:29:42.712Z","updated_at":"2026-04-19T06:49:21.172Z","avatar_url":"https://github.com/SamuelMarks.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"getopt_freebsd\n==============\n[![License](https://img.shields.io/badge/License-BSD_2--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![C89](https://img.shields.io/badge/C-89-blue)](https://en.wikipedia.org/wiki/C89_(C_version))\n\n`getopt` and `getopt_long` are nice. But MSVC doesn't have them.\n\nDocumentation: https://man.freebsd.org/cgi/man.cgi?getopt_long(3)\n\nBSD-2-Clause: This ports their implementation to Windows from FreeBSD's source tree at [freebsd/freebsd-src@`046d8d8`](https://github.com/freebsd/freebsd-src/commit/046d8d89ed1956944b12ec4f0580c30bc202bbfb).\n\nApache-2.0: On non-Cygwin Windows this uses `getprogname` at [apple/swift-corelibs-libdispatch@`7fb9d5c`](https://github.com/apple/swift-corelibs-libdispatch/commit/7fb9d5ceea562d60fe34ec55b6b165ae5aca38eb)\n\nSupport includes:\n\n- **Windows**\n\n  - MSVC 2022* (tested on x86 and x64)\n  - MinGW (tested on x86 and x64)\n  - Cygwin\n\n*should support all versions down to ~2010 also.\n\nPS: On Linux, BSD, macOS, SunOS and others with `unistd.h` depending on this library should still work; this just becomes a header-only lib with `#include \u003cunistd.h\u003e`.\n\n---\n\n## License\n\nLicensed under BSD 2 clause ([LICENSE-BSD-2](LICENSE-BSD-2) or \u003chttps://opensource.org/license/bsd-2-clause\u003e)\n\nExcept for getprogname which is Apache-2.0 from https://github.com/apple/swift-corelibs-libdispatch\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, shall be licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Ffreebsd-getopt-portable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmarks%2Ffreebsd-getopt-portable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Ffreebsd-getopt-portable/lists"}