From d0e78245dce5a35739ce9b11d5990ca50b99adb9 Mon Sep 17 00:00:00 2001 From: dgtlrift Date: Fri, 10 Jan 2020 08:16:15 -0500 Subject: [PATCH 01/13] Create ccpp.yml For GitHub build --- .github/workflows/ccpp.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml new file mode 100644 index 0000000000..ce9e315a4f --- /dev/null +++ b/.github/workflows/ccpp.yml @@ -0,0 +1,17 @@ +name: C/C++ CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: make + run: cd src && make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 3b5b2863075701ff017e145b90c19da13d5d914a Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Fri, 10 Jan 2020 11:08:36 -0500 Subject: [PATCH 02/13] Added QR Code for bootup to easy scan errors from console. --- .gitmodules | 3 + src/Makefile | 4 +- src/hci/strerror.c | 28 ++++++--- src/hci/urlqrencode.c | 132 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 159 insertions(+), 8 deletions(-) create mode 100644 .gitmodules create mode 100644 src/hci/urlqrencode.c diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..330e39d6d4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/libqrencode"] + path = src/libqrencode + url = https://github.com/fukuchi/libqrencode.git diff --git a/src/Makefile b/src/Makefile index a84efd6d66..fb086ee8ff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ # CLEANUP := -CFLAGS := +CFLAGS := -DHAVE_CONFIG_H ASFLAGS := LDFLAGS := HOST_CFLAGS := @@ -100,6 +100,7 @@ SRCDIRS += hci/mucurses hci/mucurses/widgets SRCDIRS += hci/keymap SRCDIRS += usr SRCDIRS += config +SRCDIRS += libqrencode # These directories contain code that is not eligible for UEFI Secure # Boot signing. @@ -117,6 +118,7 @@ SRCDIRS_INSEC += drivers/net/ath/ath9k NON_AUTO_SRCS := NON_AUTO_SRCS += core/version.c NON_AUTO_SRCS += drivers/net/prism2.c +NON_AUTO_SRCS += libqrencode/qrenc.c # INCDIRS lists the include path # diff --git a/src/hci/strerror.c b/src/hci/strerror.c index 1bba8c620a..d147ad70bf 100644 --- a/src/hci/strerror.c +++ b/src/hci/strerror.c @@ -21,6 +21,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +int uriqrencode(const char * URI, char *outbuff, size_t outbuff_sz); + /** * Find error description * @@ -76,7 +78,13 @@ static struct errortab * find_closest_error ( int errno ) { * */ char * strerror ( int errno ) { - static char errbuf[64]; + #define SQUARE 46 + + static char errbuf[(((SQUARE/2)+1)*SQUARE)]; +// static char errbuf[64]; + char errURL[32]; + int offset = 0; + struct errortab *errortab; /* Allow for strerror(rc) as well as strerror(errno) */ @@ -86,17 +94,23 @@ char * strerror ( int errno ) { /* Find the error description, if one exists */ errortab = find_closest_error ( errno ); + snprintf ( errURL, sizeof ( errURL ), + PRODUCT_ERROR_URI, + errno ); + /* Construct the error message */ if ( errortab ) { - snprintf ( errbuf, sizeof ( errbuf ), - "%s (" PRODUCT_ERROR_URI ")", - errortab->text, errno ); + offset = snprintf ( &errbuf[offset], sizeof ( errbuf ) - offset, + "%s (%s)", + errortab->text, errURL ); } else { - snprintf ( errbuf, sizeof ( errbuf ), - "Error %#08x (" PRODUCT_ERROR_URI ")", - errno, errno ); + offset = snprintf ( &errbuf[offset], sizeof ( errbuf ) - offset, + "Error %#08x (%s)", + errno, errURL ); } + uriqrencode(errURL, &errbuf[offset], sizeof(errbuf) - offset ); + return errbuf; } diff --git a/src/hci/urlqrencode.c b/src/hci/urlqrencode.c new file mode 100644 index 0000000000..32856ffb15 --- /dev/null +++ b/src/hci/urlqrencode.c @@ -0,0 +1,132 @@ +/* Based on code example from libqrencode and modified to use IBM CP 437 chars */ + +#include +#include +#include + +#include + +#define margin 4 + +static const char glyphs[] = + " " /* White Space */ + "\xDC" /* Low Block */ + "\xDF" /* High Block */ + "\xDB"; /* Full Block */ + +static int writeANSI_margin(char* outbuff, size_t outbuff_sz, int width, int p_margin, const char *white, const char *reset ) +{ + int y; + int len = 0; + + for (y = 0; y < margin; y+=2 ) { + len += snprintf( &outbuff[len], outbuff_sz - len, "%s", white); /* Initialize the color - default white */ + len += snprintf( &outbuff[len], outbuff_sz - len, "%*c", width + (p_margin*2), ' '); + len += snprintf( &outbuff[len], outbuff_sz - len, "%s\n", reset); // reset to default colors for newline + } + return len; +} + +static int writeANSI(const QRcode *qrcode, char *outbuff, size_t outbuff_sz) +{ + unsigned char *rowH; + unsigned char *rowL; + unsigned char *p; + int x, y; + int len = 0; + + const unsigned char *E = (const unsigned char *)""; + +// const char white[] = "\033[47m"; + const char white[] = ""; + const int white_s = sizeof( white ) -1; +// const char black[] = "\033[40m"; +// const char reset[] = "\033[0m"; + const char reset[] = ""; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" + const size_t minLen = (( (white_s) * 2 ) + ( (qrcode->width * 2) * qrcode->width )); // Unlikely +// const size_t maxLen = (( (white_s) * 2 ) + ( (qrcode->width * 2) * qrcode->width * (white_s + 1 ))); // Unlikely +// const size_t typLen = (minLen + maxLen)/2; // More typical? +#pragma GCC diagnostic pop + + if ( outbuff_sz < minLen ) { + snprintf(outbuff, outbuff_sz, "Insufficient buffer to render URL QR-Code.\n\tNeed at least %d bytes, only have %d\n", minLen, outbuff_sz); + // return( -1 ); // Error + } + + /* top margin */ + len += writeANSI_margin(&outbuff[len], outbuff_sz-len, qrcode->width, margin, white, reset); + /* data */ + p = qrcode->data; + for(y = 0; y < qrcode->width; y+=2) { + rowH = (p+((y+0)*qrcode->width)); + rowL = (p+((y+1)*qrcode->width)); + + len += snprintf( &outbuff[len], outbuff_sz - len, "%s", white); /* Initialize the color - default white */ + for(x = 0; x < margin; x++ ){ + len += snprintf( &outbuff[len], outbuff_sz - len, "%s", " "); + } + + for(x = 0; x < qrcode->width; x++) { + len += snprintf( &outbuff[len], outbuff_sz - len, "%c", glyphs[ + ( ((*( rowH+x )&0x1)<<1) | + ((*((y+1)width?rowL+x:E)&0x1)<<0) ) + ]); + } + + for(x = 0; x < margin; x++ ){ + len += snprintf( &outbuff[len], outbuff_sz - len, "%s", " "); + } + len += snprintf( &outbuff[len], outbuff_sz - len, "%s\n", reset); + } + + /* bottom margin */ + len += writeANSI_margin(&outbuff[len], outbuff_sz-len, qrcode->width, margin, white, reset); + + return len; +} + +int uriqrencode(const char * URI, char *outbuff, size_t outbuff_sz) +{ + + QRcode *qrcode = QRcode_encodeString(URI, 0, QR_ECLEVEL_L, + QR_MODE_8, 1); + + outbuff_sz = writeANSI( qrcode, outbuff, outbuff_sz ); + + QRcode_free(qrcode); + return outbuff_sz; +} + +//#define TEST_QRCODE + +#ifdef TEST_QRCODE +int main(int argc, char *argv[]) +{ + #define SQUARE 46 + + char buffer[((SQUARE*2)*SQUARE)]; + char* arg; + + int len; + + if (argc < 2) { + fprintf(stderr, "Usage: %s string\n", argv[0]); + + arg = "https://youtu.be/Xe1o5JDwp2k"; + } else { + arg = argv[1]; + } + + len = uriqrencode( arg, buffer, sizeof( buffer ) ); + + if (len < 0) { + fputs( "Error\n", stdout ); + } + fputs( buffer, stdout ); + + return 0; +} +#endif /* TEST_QRCODE */ From ce783dc3b060c449d3dfd51e3f6cc2723896c3cc Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Mon, 13 Jan 2020 16:38:07 -0500 Subject: [PATCH 03/13] Adding submodule --- src/libqrencode | 1 + 1 file changed, 1 insertion(+) create mode 160000 src/libqrencode diff --git a/src/libqrencode b/src/libqrencode new file mode 160000 index 0000000000..13b159f9d9 --- /dev/null +++ b/src/libqrencode @@ -0,0 +1 @@ +Subproject commit 13b159f9d9509b0c9f5ca0df7a144638337ddb15 From cf594e3d4050e36a84c44649053f170e3790131a Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Tue, 14 Jan 2020 14:29:05 -0500 Subject: [PATCH 04/13] Add missing file that should have been included --- src/config.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 src/config.h diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000000..73bb7d587b --- /dev/null +++ b/src/config.h @@ -0,0 +1,148 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#if 0 +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if using pthread is enabled. */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if using libpng is enabled. */ +#define HAVE_PNG 1 + +/* Define to 1 if using SDL is enabled. */ +/* #undef HAVE_SDL */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 +#endif /* 0 */ + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +#if 0 +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +#endif /* 0 */ + +/* Major version number */ +#define MAJOR_VERSION 4 + +/* Micro version number */ +#define MICRO_VERSION 0 + +/* Minor version number */ +#define MINOR_VERSION 1 + +#if 0 + +/* Name of package */ +#define PACKAGE "qrencode" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "QRencode" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "QRencode 4.1.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "qrencode" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "4.1.0" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +#endif /* 0 */ +/* Version number of package */ +#define VERSION "4.1.0" + +#if 0 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif +#endif /* 0 */ + +/* Define to 'static' if no test programs will be compiled. */ +#define STATIC_IN_RELEASE static +/* #undef WITH_TESTS */ + + +/* Do not include ERRFILE portion in the numbers in the error table */ +#include "errno.h" +#include "string.h" +#include "stdio.h" +#include "ipxe/errortab.h" +#include "config/branding.h" + +#undef ERRFILE +#define ERRFILE 0 + + +#define SHOEHORN_THIS_AS_A_WASTEFUL_PRIVATE static + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +/** The most common errors */ +SHOEHORN_THIS_AS_A_WASTEFUL_PRIVATE struct errortab common_errors[] __errortab = { + __einfo_errortab ( EINFO_ENOERR ), + __einfo_errortab ( EINFO_EACCES ), + __einfo_errortab ( EINFO_ECANCELED ), + __einfo_errortab ( EINFO_ECONNRESET ), + __einfo_errortab ( EINFO_EINVAL ), + __einfo_errortab ( EINFO_EIO ), + __einfo_errortab ( EINFO_ENETUNREACH ), + __einfo_errortab ( EINFO_ENODEV ), + __einfo_errortab ( EINFO_ENOENT ), + __einfo_errortab ( EINFO_ENOEXEC ), + __einfo_errortab ( EINFO_ENOMEM ), + __einfo_errortab ( EINFO_ENOSPC ), + __einfo_errortab ( EINFO_ENOTCONN ), + __einfo_errortab ( EINFO_ENOTSUP ), + __einfo_errortab ( EINFO_EPERM ), + __einfo_errortab ( EINFO_ERANGE ), + __einfo_errortab ( EINFO_ETIMEDOUT ), +}; +#pragma GCC diagnostic pop From f73e062a16dcd83224b035f1a5b13ffe1a148612 Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Tue, 14 Jan 2020 15:06:48 -0500 Subject: [PATCH 05/13] Add diagnostics to build log --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index ce9e315a4f..02db06132a 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: make - run: cd src && make + run: cd src && make V=1 - name: make check run: make check - name: make distcheck From 9b127eee31d7377e3a89e891ca202ce98003f260 Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Tue, 14 Jan 2020 15:07:19 -0500 Subject: [PATCH 06/13] Add way too much detail --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 02db06132a..30e023d2ac 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: make - run: cd src && make V=1 + run: cd src && make -d V=1 - name: make check run: make check - name: make distcheck From f700041cff22570dacf753a6c72c0261c55d3d82 Mon Sep 17 00:00:00 2001 From: dgtlrift Date: Tue, 14 Jan 2020 15:26:37 -0500 Subject: [PATCH 07/13] Update actions to include submodule checkout --- .github/workflows/ccpp.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 30e023d2ac..5209c6a194 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -9,6 +9,8 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Checkout submodules + uses: textbook/git-checkout-submodule-action@2.0.0 - name: make run: cd src && make -d V=1 - name: make check From 69e7c334b0fab68b1ae3ea12b1e867eb2cb0fcac Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Wed, 15 Jan 2020 09:29:25 -0500 Subject: [PATCH 08/13] Use include to allow GitHub build action to work correctly --- src/hci/urlqrencode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hci/urlqrencode.c b/src/hci/urlqrencode.c index 32856ffb15..a4972bbaf8 100644 --- a/src/hci/urlqrencode.c +++ b/src/hci/urlqrencode.c @@ -1,6 +1,6 @@ /* Based on code example from libqrencode and modified to use IBM CP 437 chars */ -#include +#include "libqrencode/qrencode.h" #include #include From 09be174cd9e16d988fdc935b272a05ce69c7ab1a Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Wed, 15 Jan 2020 14:20:07 -0500 Subject: [PATCH 09/13] Remove diagnostic detail --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 5209c6a194..5cd0df08ca 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout submodules uses: textbook/git-checkout-submodule-action@2.0.0 - name: make - run: cd src && make -d V=1 + run: cd src && make - name: make check run: make check - name: make distcheck From 0e3a9670b05ac4c2c08928de1ae7bf78bc3d9233 Mon Sep 17 00:00:00 2001 From: Jim Hanley Date: Wed, 15 Jan 2020 14:20:23 -0500 Subject: [PATCH 10/13] Allow for easier editing of ALL, comment out ISO build --- src/Makefile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index fb086ee8ff..0395382186 100644 --- a/src/Makefile +++ b/src/Makefile @@ -130,11 +130,24 @@ INCDIRS += include . # Default build target: build the most common targets and print out a # helpfully suggestive message # -ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \ - bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \ - bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \ - bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \ - bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom +ALL := +ALL += bin/blib.a +ALL += bin/ipxe.dsk +ALL += bin/ipxe.lkrn +#ALL += bin/ipxe.iso +ALL += bin/ipxe.usb +ALL += bin/ipxe.pxe +ALL += bin/undionly.kpxe +ALL += bin/rtl8139.rom +ALL += bin/8086100e.mrom +ALL += bin/80861209.rom +ALL += bin/10500940.rom +ALL += bin/10222000.rom +ALL += bin/10ec8139.rom +ALL += bin/1af41000.rom +ALL += bin/8086100f.mrom +ALL += bin/808610d3.mrom +ALL += bin/15ad07b0.rom all : $(ALL) @$(ECHO) '===========================================================' From 54c757d52943569a7a4e42dd1da64a4201ddd83e Mon Sep 17 00:00:00 2001 From: dgtlrift Date: Wed, 22 Jan 2020 10:08:28 -0500 Subject: [PATCH 11/13] Update ccpp.yml Remove unneeded targets --- .github/workflows/ccpp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 5cd0df08ca..d3d5b094ad 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -13,7 +13,7 @@ jobs: uses: textbook/git-checkout-submodule-action@2.0.0 - name: make run: cd src && make - - name: make check - run: make check - - name: make distcheck - run: make distcheck +# - name: make check +# run: make check +# - name: make distcheck +# run: make distcheck From f44fdaab3cc0b74d4cf8e08c4e4a6e95b91a84c3 Mon Sep 17 00:00:00 2001 From: dgtlrift Date: Mon, 2 May 2022 14:00:17 -0400 Subject: [PATCH 12/13] Update Makefile Remove change to ALL per @stappersg recommendation via https://github.com/ipxe/ipxe/pull/102#discussion_r449902455 and I will make this a separate patch. --- src/Makefile | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/Makefile b/src/Makefile index 9ea300a5fd..df3d8063ca 100644 --- a/src/Makefile +++ b/src/Makefile @@ -131,24 +131,11 @@ INCDIRS += include . # Default build target: build the most common targets and print out a # helpfully suggestive message # -ALL := -ALL += bin/blib.a -ALL += bin/ipxe.dsk -ALL += bin/ipxe.lkrn -#ALL += bin/ipxe.iso -ALL += bin/ipxe.usb -ALL += bin/ipxe.pxe -ALL += bin/undionly.kpxe -ALL += bin/rtl8139.rom -ALL += bin/8086100e.mrom -ALL += bin/80861209.rom -ALL += bin/10500940.rom -ALL += bin/10222000.rom -ALL += bin/10ec8139.rom -ALL += bin/1af41000.rom -ALL += bin/8086100f.mrom -ALL += bin/808610d3.mrom -ALL += bin/15ad07b0.rom +ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \ + bin/ipxe.usb bin/ipxe.pxe bin/undionly.kpxe bin/rtl8139.rom \ + bin/8086100e.mrom bin/80861209.rom bin/10500940.rom \ + bin/10222000.rom bin/10ec8139.rom bin/1af41000.rom \ + bin/8086100f.mrom bin/808610d3.mrom bin/15ad07b0.rom all : $(ALL) @$(ECHO) '===========================================================' From a14d5138ae3688d0e3c016979caf13d42cb96cbb Mon Sep 17 00:00:00 2001 From: dgtlrift Date: Mon, 2 May 2022 14:04:24 -0400 Subject: [PATCH 13/13] Delete config.h Per @stappersg recommendation I am deleting autogenerated files --- src/config.h | 148 --------------------------------------------------- 1 file changed, 148 deletions(-) delete mode 100644 src/config.h diff --git a/src/config.h b/src/config.h deleted file mode 100644 index 73bb7d587b..0000000000 --- a/src/config.h +++ /dev/null @@ -1,148 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -#if 0 -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if using pthread is enabled. */ -#define HAVE_LIBPTHREAD 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if using libpng is enabled. */ -#define HAVE_PNG 1 - -/* Define to 1 if using SDL is enabled. */ -/* #undef HAVE_SDL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 -#endif /* 0 */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -#if 0 -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -#endif /* 0 */ - -/* Major version number */ -#define MAJOR_VERSION 4 - -/* Micro version number */ -#define MICRO_VERSION 0 - -/* Minor version number */ -#define MINOR_VERSION 1 - -#if 0 - -/* Name of package */ -#define PACKAGE "qrencode" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "QRencode" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "QRencode 4.1.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "qrencode" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "4.1.0" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -#endif /* 0 */ -/* Version number of package */ -#define VERSION "4.1.0" - -#if 0 - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif -#endif /* 0 */ - -/* Define to 'static' if no test programs will be compiled. */ -#define STATIC_IN_RELEASE static -/* #undef WITH_TESTS */ - - -/* Do not include ERRFILE portion in the numbers in the error table */ -#include "errno.h" -#include "string.h" -#include "stdio.h" -#include "ipxe/errortab.h" -#include "config/branding.h" - -#undef ERRFILE -#define ERRFILE 0 - - -#define SHOEHORN_THIS_AS_A_WASTEFUL_PRIVATE static - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -/** The most common errors */ -SHOEHORN_THIS_AS_A_WASTEFUL_PRIVATE struct errortab common_errors[] __errortab = { - __einfo_errortab ( EINFO_ENOERR ), - __einfo_errortab ( EINFO_EACCES ), - __einfo_errortab ( EINFO_ECANCELED ), - __einfo_errortab ( EINFO_ECONNRESET ), - __einfo_errortab ( EINFO_EINVAL ), - __einfo_errortab ( EINFO_EIO ), - __einfo_errortab ( EINFO_ENETUNREACH ), - __einfo_errortab ( EINFO_ENODEV ), - __einfo_errortab ( EINFO_ENOENT ), - __einfo_errortab ( EINFO_ENOEXEC ), - __einfo_errortab ( EINFO_ENOMEM ), - __einfo_errortab ( EINFO_ENOSPC ), - __einfo_errortab ( EINFO_ENOTCONN ), - __einfo_errortab ( EINFO_ENOTSUP ), - __einfo_errortab ( EINFO_EPERM ), - __einfo_errortab ( EINFO_ERANGE ), - __einfo_errortab ( EINFO_ETIMEDOUT ), -}; -#pragma GCC diagnostic pop