Skip to content

Commit 249b173

Browse files
committed
rip out getopt and replace it with yarg.
yarg is a public domain argument parser written by the author of bzip3.
1 parent fd258cd commit 249b173

File tree

7 files changed

+357
-334
lines changed

7 files changed

+357
-334
lines changed

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ install(
8888
if(BZIP3_BUILD_APPS)
8989
add_executable(bzip3)
9090
target_sources(bzip3 PRIVATE src/main.c)
91-
check_symbol_exists(getopt_long "getopt.h" HAVE_GETOPT_LONG)
92-
if(HAVE_GETOPT_LONG)
93-
target_compile_definitions(bzip3 PRIVATE HAVE_GETOPT_LONG)
94-
endif()
9591
if(BZIP3_ENABLE_STATIC_EXE)
9692
if(BUILD_SHARED_LIBS)
9793
message(

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pkgconfig_DATA = bzip3.pc
99
include_HEADERS = include/libbz3.h
1010
noinst_HEADERS = include/common.h \
1111
include/libsais.h \
12-
include/getopt-shim.h
12+
include/yarg.h
1313

1414
lib_LTLIBRARIES = libbzip3.la
1515
libbzip3_la_SOURCES = src/libbz3.c

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ A breakdown of components and their licenses follows:
133133
- (compile-time) `build-aux/ax_check_compile_flag.m4`: Copyright 2008, Guido U. Draheim ([email protected]), 2011, Maarten Bosmans ([email protected]); FSFAP
134134
- (compile-time) `build-aux/git-version-gen`: Copyright 2007-2012, Free Software Foundation, Inc; GPLv3
135135
- (runtime) `bz3grep`: Copyright 2003, Thomas Klausner; BSD-2-clause
136-
- (runtime) `include/getopt-shim.h`: Copyright 2005-2014, Rich Felker; Expat
137136

138137
`bzip3` as a whole is licensed under LGPLv3 only. It is not dual-licensed under LGPLv3 and Apache 2.0.
139138

configure.ac

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ LT_INIT
1616
PKG_PROG_PKG_CONFIG
1717
PKG_INSTALLDIR
1818

19-
AC_CHECK_HEADERS([getopt.h])
20-
AC_CHECK_FUNCS([getopt_long])
21-
2219
AC_C_RESTRICT
2320

2421
AC_ARG_WITH([pthread],

include/getopt-shim.h

-236
This file was deleted.

0 commit comments

Comments
 (0)