Serial string for GNU/Linux emulation.

This commit is contained in:
NIIBE Yutaka 2017-10-04 18:54:16 +09:00
parent 30fde2a0f0
commit 7e4ee2b361
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2017-10-04 NIIBE Yutaka <gniibe@fsij.org> 2017-10-04 NIIBE Yutaka <gniibe@fsij.org>
* src/configure (output_vendor_product_serial_strings): Support
GNU/Linux emulation.
* polarssl/library/bignum.c (mpi_div_mpi): Fix for 64-bit machine. * polarssl/library/bignum.c (mpi_div_mpi): Fix for 64-bit machine.
* src/main.c (gnuk_malloc, gnuk_free): Fix for 64-bit machine. * src/main.c (gnuk_malloc, gnuk_free): Fix for 64-bit machine.

9
src/configure vendored
View File

@ -332,8 +332,13 @@ output_vendor_product_serial_strings () {
echo " STRING_DESCRIPTOR, /* bDescriptorType */" echo " STRING_DESCRIPTOR, /* bDescriptorType */"
echo " /* Serial number: \"$SERIALNO\" */" echo " /* Serial number: \"$SERIALNO\" */"
echo "$SERIALNO" | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p" echo "$SERIALNO" | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff," if test "$emulation" = "yes"; then
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff," echo " 'E', 0, 'M', 0, 'U', 0, 'L', 0,"
echo " 'A', 0, 'T', 0, 'E', 0, 'D', 0,"
else
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
fi
echo '};' echo '};'
echo echo
echo '#ifdef USB_STRINGS_FOR_GNUK' echo '#ifdef USB_STRINGS_FOR_GNUK'