From owner-svn-src-vendor@freebsd.org Tue Feb 28 20:06:35 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50BCBCF263E; Tue, 28 Feb 2017 20:06:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E94D6828; Tue, 28 Feb 2017 20:06:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SK6YCh015937; Tue, 28 Feb 2017 20:06:34 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SK6V1v015913; Tue, 28 Feb 2017 20:06:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702282006.v1SK6V1v015913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 28 Feb 2017 20:06:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314405 - in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/com... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 20:06:35 -0000 Author: jkim Date: Tue Feb 28 20:06:31 2017 New Revision: 314405 URL: https://svnweb.freebsd.org/changeset/base/314405 Log: Import ACPICA 20170224. Added: vendor-sys/acpica/dist/source/compiler/cvcompiler.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/cvdisasm.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/cvparser.c (contents, props changed) vendor-sys/acpica/dist/source/include/acconvert.h (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/changes.txt Tue Feb 28 20:06:31 2017 (r314405) @@ -1,7 +1,68 @@ ---------------------------------------- +24 February 2017. Summary of changes for version 20170224: + + +1) ACPICA kernel-resident subsystem: + +Interpreter: Fixed two issues with the control method return value auto- +repair feature, where an attempt to double-delete an internal object +could result in an ACPICA warning (for _CID repair and others). No fault +occurs, however, because the attempted deletion (actually a release to an +internal cache) is detected and ignored via object poisoning. + +Debugger: Fixed an AML interpreter mutex issue during the single stepping +of control methods. If certain debugger commands are executed during +stepping, a mutex aquire/release error could occur. Lv Zheng. + +Fixed some issues generating ACPICA with the Intel C compiler by +restoring the original behavior and compiler-specific include file in +acenv.h. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total + Debug Version: 207.5K Code, 82.7K Data, 290.2K Total + Previous Release: + Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total + Debug Version: 201.5K Code, 82.2K Data, 283.7K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: A preliminary version of a new ASL-to-ASL+ conversion +tool has been designed, implemented, and included in this release. The +key feature of this utility is that the original comments within the +input ASL file are preserved during the conversion process, and included +within the converted ASL+ file -- thus creating a transparent conversion +of existing ASL files to ASL+ (ASL 2.0). Erik Schmauss. + + Usage: iasl -ca // Output is a .dsl file with +converted code + +iASL/Disassembler: Improved the detection and correct disassembly of +Switch/Case operators. This feature detects sequences of if/elseif/else +operators that originated from ASL Switch/Case/Default operators and +emits the original operators. David Box. + +iASL: Improved the IORT ACPI table support in the following areas. Lv +Zheng: + Clear MappingOffset if the MappingCount is zero. + Fix the disassembly of the SMMU GSU interrupt offset. + Update the template file for the IORT table. + +Disassembler: Enhanced the detection and disassembly of resource +template/descriptor within a Buffer object. An EndTag descriptor is now +required to have a zero second byte, since all known ASL compilers emit +this. This helps eliminate incorrect decisions when a buffer is +disassembled (false positives on resource templates). + +---------------------------------------- 19 January 2017. Summary of changes for version 20170119: -This release is available at https://acpica.org/downloads 1) General ACPICA software: Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Tue Feb 28 20:06:31 2017 (r314405) @@ -105,6 +105,9 @@ OBJECTS = \ $(OBJDIR)/aslwalks.o\ $(OBJDIR)/aslxref.o\ $(OBJDIR)/aslxrefout.o\ + $(OBJDIR)/cvcompiler.o\ + $(OBJDIR)/cvdisasm.o\ + $(OBJDIR)/cvparser.o\ $(OBJDIR)/cmfsize.o\ $(OBJDIR)/dbfileio.o\ $(OBJDIR)/dmbuffer.o\ Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/common/adisasm.c Tue Feb 28 20:06:31 2017 (r314405) @@ -326,6 +326,21 @@ AdDisassembleOneTable ( ACPI_OWNER_ID OwnerId; +#ifdef ACPI_ASL_COMPILER + + /* + * For ASL-/ASL+ converter: replace the temporary "XXXX" + * table signature with the original. This "XXXX" makes + * it harder for the AML interpreter to run the badaml + * (.xxx) file produced from the converter in case if + * it fails to get deleted. + */ + if (Gbl_CaptureComments) + { + strncpy (Table->Signature, AcpiGbl_TableSig, 4); + } +#endif + /* ForceAmlDisassembly means to assume the table contains valid AML */ if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) @@ -475,6 +490,7 @@ AdReparseOneTable ( ACPI_OWNER_ID OwnerId) { ACPI_STATUS Status; + ACPI_COMMENT_ADDR_NODE *AddrListHead; fprintf (stderr, @@ -508,6 +524,15 @@ AdReparseOneTable ( AcpiDmAddExternalsToNamespace (); + /* For -ca option: clear the list of comment addresses. */ + + while (AcpiGbl_CommentAddrListHead) + { + AddrListHead= AcpiGbl_CommentAddrListHead; + AcpiGbl_CommentAddrListHead = AcpiGbl_CommentAddrListHead->Next; + AcpiOsFree(AddrListHead); + } + /* Parse the table again. No need to reload it, however */ Status = AdParseTable (Table, NULL, FALSE, FALSE); Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/common/adwalk.c Tue Feb 28 20:06:31 2017 (r314405) @@ -878,7 +878,7 @@ AcpiDmXrefDescendingOp ( * method. */ if (!(Op->Asl.Parent && - (Op->Asl.Parent->Asl.AmlOpcode == AML_COND_REF_OF_OP))) + (Op->Asl.Parent->Asl.AmlOpcode == AML_CONDITIONAL_REF_OF_OP))) { if (Node) { Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/common/dmextern.c Tue Feb 28 20:06:31 2017 (r314405) @@ -1165,6 +1165,31 @@ AcpiDmEmitExternals ( /******************************************************************************* * + * FUNCTION: AcpiDmEmitExternal + * + * PARAMETERS: Op External Parse Object + * + * RETURN: None + * + * DESCRIPTION: Emit an External() ASL statement for the current External + * parse object + * + ******************************************************************************/ + +void +AcpiDmEmitExternal ( + ACPI_PARSE_OBJECT *NameOp, + ACPI_PARSE_OBJECT *TypeOp) +{ + AcpiOsPrintf ("External ("); + AcpiDmNamestring (NameOp->Common.Value.Name); + AcpiOsPrintf ("%s)\n", + AcpiDmGetObjectTypeName ((ACPI_OBJECT_TYPE) TypeOp->Common.Value.Integer)); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmUnresolvedWarning * * PARAMETERS: Type - Where to output the warning. Modified: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/common/dmtables.c Tue Feb 28 20:06:31 2017 (r314405) @@ -47,6 +47,8 @@ #include "actables.h" #include "acparser.h" #include "acapps.h" +#include "acmacros.h" +#include "acconvert.h" #define _COMPONENT ACPI_TOOLS @@ -202,6 +204,14 @@ AdCreateTableHeader ( AcpiOsPrintf (" */\n"); /* + * Print comments that come before this definition block. + */ + if (Gbl_CaptureComments) + { + ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0); + } + + /* * Open the ASL definition block. * * Note: the AMLFilename string is left zero-length in order to just let @@ -388,6 +398,7 @@ AdParseTable ( AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER); AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)); + ASL_CV_INIT_FILETREE(Table, AmlStart, AmlLength); /* Create the root object */ @@ -397,6 +408,17 @@ AdParseTable ( return (AE_NO_MEMORY); } +#ifdef ACPI_ASL_COMPILER + if (Gbl_CaptureComments) + { + AcpiGbl_ParseOpRoot->Common.CvFilename = AcpiGbl_FileTreeRoot->Filename; + } + else + { + AcpiGbl_ParseOpRoot->Common.CvFilename = NULL; + } +#endif + /* Create and initialize a new walk state */ WalkState = AcpiDsCreateWalkState (0, AcpiGbl_ParseOpRoot, NULL, NULL); Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Tue Feb 28 20:06:31 2017 (r314405) @@ -171,6 +171,7 @@ #define ACPI_IORT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f) #define ACPI_IORT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f) #define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f) +#define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f) #define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f) #define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f) #define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f) @@ -259,6 +260,7 @@ #define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o) #define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o) #define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o) +#define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o) #define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o) #define ACPI_IORTA_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o) #define ACPI_IORTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o) @@ -1549,8 +1551,12 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[] = { - {ACPI_DMT_UINT64, 0, "SMMU_NSgIrpt Interrupt", 0}, - {ACPI_DMT_UINT64, 0, "SMMU_NSgCfgIrpt Interrupt", 0}, + {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgIrpt), "NSgIrpt", 0}, + {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgIrptFlags), "NSgIrpt Flags (decoded below)", 0}, + {ACPI_DMT_FLAG0, ACPI_IORT3a_FLAG_OFFSET (NSgIrptFlags, 0), "Edge Triggered", 0}, + {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgCfgIrpt), "NSgCfgIrpt", 0}, + {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgCfgIrptFlags), "NSgCfgIrpt Flags (decoded below)", 0}, + {ACPI_DMT_FLAG0, ACPI_IORT3a_FLAG_OFFSET (NSgCfgIrptFlags, 0), "Edge Triggered", 0}, ACPI_DMT_TERMINATOR }; Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Tue Feb 28 20:06:31 2017 (r314405) @@ -44,6 +44,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" #include "amlcode.h" +#include "acconvert.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslcodegen") @@ -57,12 +58,6 @@ CgAmlWriteWalk ( void *Context); static void -CgLocalWriteAmlData ( - ACPI_PARSE_OBJECT *Op, - void *Buffer, - UINT32 Length); - -static void CgWriteAmlOpcode ( ACPI_PARSE_OBJECT *Op); @@ -206,7 +201,7 @@ CgAmlWriteWalk ( * ******************************************************************************/ -static void +void CgLocalWriteAmlData ( ACPI_PARSE_OBJECT *Op, void *Buffer, @@ -261,6 +256,15 @@ CgWriteAmlOpcode ( return; } + /* + * Before printing the bytecode, generate comment byte codes + * associated with this node. + */ + if (Gbl_CaptureComments) + { + CgWriteAmlComment(Op); + } + switch (Op->Asl.AmlOpcode) { case AML_UNASSIGNED_OPCODE: @@ -416,6 +420,8 @@ CgWriteTableHeader ( ACPI_PARSE_OBJECT *Op) { ACPI_PARSE_OBJECT *Child; + UINT32 CommentLength; + ACPI_COMMENT_NODE *Current; /* AML filename */ @@ -425,6 +431,21 @@ CgWriteTableHeader ( /* Signature */ Child = Child->Asl.Next; + + /* + * For ASL-/ASL+ converter: replace the table signature with + * "XXXX" and save the original table signature. This results in an AML + * file with the signature "XXXX". The converter should remove this AML + * file. In the event where this AML file does not get deleted, the + * "XXXX" table signature prevents this AML file from running on the AML + * interpreter. + */ + if (Gbl_CaptureComments) + { + strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, 4); + Child->Asl.Value.String = ACPI_SIG_XXXX; + } + strncpy (TableHeader.Signature, Child->Asl.Value.String, 4); /* Revision */ @@ -466,6 +487,50 @@ CgWriteTableHeader ( TableHeader.Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength; + + /* Calculate the comment lengths for this definition block parseOp */ + + if (Gbl_CaptureComments) + { + CvDbgPrint ("Calculating comment lengths for %s in write header\n", + Op->Asl.ParseOpName); + + /* + * Take the filename without extensions, add 3 for the new extension + * and another 3 for the a908 bytecode and null terminator. + */ + TableHeader.Length += strrchr (Gbl_ParseTreeRoot->Asl.Filename, '.') + - Gbl_ParseTreeRoot->Asl.Filename + 1 + 3 + 3; + Op->Asl.AmlSubtreeLength += + strlen (Gbl_ParseTreeRoot->Asl.Filename) + 3; + CvDbgPrint (" Length: %lu\n", + strlen (Gbl_ParseTreeRoot->Asl.Filename) + 3); + + if (Op->Asl.CommentList) + { + Current = Op->Asl.CommentList; + while (Current) + { + CommentLength = strlen (Current->Comment)+3; + CvDbgPrint ("Length of standard comment): %d\n", CommentLength); + CvDbgPrint (" Comment string: %s\n\n", Current->Comment); + TableHeader.Length += CommentLength; + Op->Asl.AmlSubtreeLength += CommentLength; + Current = Current->Next; + CvDbgPrint (" Length: %u\n", CommentLength); + } + } + if (Op->Asl.CloseBraceComment) + { + CommentLength = strlen (Op->Asl.CloseBraceComment)+3; + CvDbgPrint ("Length of inline comment +3: %d\n", CommentLength); + CvDbgPrint (" Comment string: %s\n\n", Op->Asl.CloseBraceComment); + TableHeader.Length += CommentLength; + Op->Asl.AmlSubtreeLength += CommentLength; + CvDbgPrint (" Length: %u\n", CommentLength); + } + } + TableHeader.Checksum = 0; Op->Asl.FinalAmlOffset = ftell (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle); @@ -492,13 +557,13 @@ CgWriteTableHeader ( static void CgUpdateHeader ( - ACPI_PARSE_OBJECT *Op) + ACPI_PARSE_OBJECT *Op) { - signed char Sum; - UINT32 i; - UINT32 Length; - UINT8 FileByte; - UINT8 Checksum; + signed char Sum; + UINT32 i; + UINT32 Length; + UINT8 FileByte; + UINT8 Checksum; /* Calculate the checksum over the entire definition block */ @@ -580,6 +645,12 @@ CgWriteNode ( ASL_RESOURCE_NODE *Rnode; + /* Write all comments here. */ + if (Gbl_CaptureComments) + { + CgWriteAmlComment(Op); + } + /* Always check for DEFAULT_ARG and other "Noop" nodes */ /* TBD: this may not be the best place for this check */ @@ -641,6 +712,10 @@ CgWriteNode ( case PARSEOP_DEFINITION_BLOCK: CgWriteTableHeader (Op); + if (Gbl_CaptureComments) + { + CgWriteAmlDefBlockComment (Op); + } break; case PARSEOP_NAMESEG: Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Tue Feb 28 20:06:31 2017 (r314405) @@ -285,8 +285,17 @@ CmDoCompile ( { Event = UtBeginEvent ("Resolve all Externals"); DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n"); - TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, - ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); + + if (Gbl_DoExternalsInPlace) + { + TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD, + ExAmlExternalWalkBegin, NULL, NULL); + } + else + { + TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE, + ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL); + } UtEndEvent (Event); } @@ -347,6 +356,18 @@ CmDoCompile ( NULL, &AnalysisWalkInfo); UtEndEvent (Event); + /* + * ASL-/ASL+ converter: Gbl_ParseTreeRoot->CommentList contains the + * very last comment of a given ASL file because it's the last constructed + * node during compilation. We take the very last comment and save it in a + * global for it to be used by the disassembler. + */ + if (Gbl_CaptureComments) + { + AcpiGbl_LastListHead = Gbl_ParseTreeRoot->Asl.CommentList; + Gbl_ParseTreeRoot->Asl.CommentList = NULL; + } + /* Calculate all AML package lengths */ Event = UtBeginEvent ("Finish AML package length generation"); @@ -800,7 +821,11 @@ CmCleanupAndExit ( /* Final cleanup after compiling one file */ - CmDeleteCaches (); + if (!Gbl_DoAslConversion) + { + CmDeleteCaches (); + } + } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Tue Feb 28 20:06:31 2017 (r314405) @@ -576,6 +576,12 @@ void CgGenerateAmlOutput ( void); +void +CgLocalWriteAmlData ( + ACPI_PARSE_OBJECT *Op, + void *Buffer, + UINT32 Length); + /* * aslfile @@ -1359,4 +1365,14 @@ ACPI_STATUS DtCreateTemplates ( char **argv); + +/* + * ASL/ASL+ converter debug + */ +void +CvDbgPrint ( + char *Fmt, + ...); + + #endif /* __ASLCOMPILER_H */ Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Tue Feb 28 20:06:31 2017 (r314405) @@ -44,6 +44,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" +#include "acconvert.h" #include #include @@ -66,10 +67,10 @@ YYSTYPE AslCompilerlval; static void AslDoLineDirective (void); -static char +static BOOLEAN AslDoComment (void); -static char +static BOOLEAN AslDoCommentType2 (void); static char Modified: vendor-sys/acpica/dist/source/compiler/asldebug.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldebug.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asldebug.c Tue Feb 28 20:06:31 2017 (r314405) @@ -60,6 +60,40 @@ UtDumpParseOpName ( /******************************************************************************* * + * FUNCTION: CvDbgPrint + * + * PARAMETERS: Type - Type of output + * Fmt - Printf format string + * ... - variable printf list + * + * RETURN: None + * + * DESCRIPTION: Print statement for debug messages within the converter. + * + ******************************************************************************/ + +void +CvDbgPrint ( + char *Fmt, + ...) +{ + va_list Args; + + + if (!Gbl_CaptureComments || !AcpiGbl_DebugAslConversion) + { + return; + } + + va_start (Args, Fmt); + (void) vfprintf (AcpiGbl_ConvDebugFile, Fmt, Args); + va_end (Args); + return; +} + + +/******************************************************************************* + * * FUNCTION: UtDumpIntegerOp * * PARAMETERS: Op - Current parse op Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Tue Feb 28 20:06:31 2017 (r314405) @@ -159,7 +159,6 @@ /* * Macros for debug output */ - #define DEBUG_MAX_LINE_LENGTH 61 #define DEBUG_SPACES_PER_INDENT 3 #define DEBUG_FULL_LINE_LENGTH 71 @@ -185,4 +184,11 @@ " %08X %04X %04X %01X %04X %04X %05X %05X "\ "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d\n" +/* + * Macros for ASL/ASL+ converter + */ +#define COMMENT_CAPTURE_ON Gbl_CommentState.CaptureComments = TRUE; +#define COMMENT_CAPTURE_OFF Gbl_CommentState.CaptureComments = FALSE; + + #endif /* ASLDEFINE.H */ Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Tue Feb 28 20:06:31 2017 (r314405) @@ -511,8 +511,14 @@ FlOpenAmlOutputFile ( if (!Filename) { /* Create the output AML filename */ - - Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE); + if (!Gbl_CaptureComments) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE); + } + else + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_CONVERT_AML); + } if (!Filename) { AslCommonError (ASL_ERROR, ASL_MSG_OUTPUT_FILENAME, @@ -854,6 +860,28 @@ FlOpenMiscOutputFiles ( AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT); } + /* Create a debug file for the converter */ + + if (AcpiGbl_DebugAslConversion) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_CONVERT_DEBUG); + if (!Filename) + { + AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME, + 0, 0, 0, 0, NULL, NULL); + return (AE_ERROR); + } + + /* Open the converter debug file, text mode */ + + FlOpenFile (ASL_FILE_CONV_DEBUG_OUTPUT, Filename, "w+t"); + + AslCompilerSignon (ASL_FILE_CONV_DEBUG_OUTPUT); + AslCompilerFileHeader (ASL_FILE_CONV_DEBUG_OUTPUT); + + AcpiGbl_ConvDebugFile = Gbl_Files[ASL_FILE_CONV_DEBUG_OUTPUT].Handle; + } + return (AE_OK); } Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Tue Feb 28 20:06:31 2017 (r314405) @@ -84,7 +84,8 @@ ASL_FILE_INFO Gbl_ {NULL, NULL, "C Include: ", "C Header Output"}, {NULL, NULL, "Offset Table: ", "C Offset Table Output"}, {NULL, NULL, "Device Map: ", "Device Map Output"}, - {NULL, NULL, "Cross Ref: ", "Cross-reference Output"} + {NULL, NULL, "Cross Ref: ", "Cross-reference Output"}, + {NULL, NULL, "Converter db :", "Converter debug Output"} }; #else @@ -113,7 +114,7 @@ extern int AslCompilerd #define ASL_DEFAULT_LINE_BUFFER_SIZE (1024 * 32) /* 32K */ -#define ASL_MSG_BUFFER_SIZE 4096 +#define ASL_MSG_BUFFER_SIZE (1024 * 32) /* 32k */ #define ASL_MAX_DISABLED_MESSAGES 32 #define HEX_TABLE_LINE_SIZE 8 #define HEX_LISTING_LINE_SIZE 8 @@ -182,6 +183,9 @@ ASL_EXTERN BOOLEAN ASL_ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoTypechecking, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_EnableReferenceTypechecking, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoExternals, TRUE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoExternalsInPlace, FALSE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoAslConversion, FALSE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_OptimizeTrivialParseNodes, TRUE); #define HEX_OUTPUT_NONE 0 @@ -265,6 +269,20 @@ ASL_EXTERN char ASL_ ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_PruneDepth, 0); ASL_EXTERN UINT16 ASL_INIT_GLOBAL (Gbl_PruneType, 0); +ASL_EXTERN ASL_FILE_NODE ASL_INIT_GLOBAL (*Gbl_IncludeFileStack, NULL); + +/* Specific to the -q option */ + +ASL_EXTERN ASL_COMMENT_STATE Gbl_CommentState; + + +/* + * Determines if an inline comment should be saved in the InlineComment or NodeEndComment + * field of ACPI_PARSE_OBJECT. + */ +ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Head, NULL); +ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Tail, NULL); +ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_Inline_Comment_Buffer, NULL); /* Static structures */ Modified: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Tue Feb 28 20:06:31 2017 (r314405) @@ -69,9 +69,10 @@ Usage ( ACPI_USAGE_HEADER ("iasl [Options] [Files]"); printf ("\nGeneral:\n"); - ACPI_OPTION ("-@ ", "Specify command file"); - ACPI_OPTION ("-I ", "Specify additional include directory"); - ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); + ACPI_OPTION ("-@ ", "Specify command file"); + ACPI_OPTION ("-I ", "Specify additional include directory"); + ACPI_OPTION ("-p ", "Specify path/filename prefix for all output files"); + ACPI_OPTION ("-ca ", "convert a given ASL file to ASL+ (retains comments)"); ACPI_OPTION ("-v", "Display compiler version"); ACPI_OPTION ("-vd", "Display compiler build date and time"); ACPI_OPTION ("-vo", "Enable optimization comments"); @@ -153,6 +154,7 @@ Usage ( ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); printf ("\nDebug Options:\n"); + ACPI_OPTION ("-bc", "Create converter debug file (*.cdb)"); ACPI_OPTION ("-bf", "Create debug file (full output) (*.txt)"); ACPI_OPTION ("-bs", "Create debug file (parse tree only) (*.txt)"); ACPI_OPTION ("-bp ", "Prune ASL parse tree"); Modified: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Tue Feb 28 20:06:31 2017 (r314405) @@ -44,6 +44,7 @@ #include "aslcompiler.h" #include "aslcompiler.y.h" #include "amlcode.h" +#include "acconvert.h" #define _COMPONENT ACPI_COMPILER @@ -136,7 +137,9 @@ LnPackageLengthWalk ( Op->Asl.AmlLength + Op->Asl.AmlOpcodeLength + Op->Asl.AmlPkgLenBytes + - Op->Asl.AmlSubtreeLength); + Op->Asl.AmlSubtreeLength + + CvCalculateCommentLengths (Op) + ); } return (AE_OK); } Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Tue Feb 28 20:06:31 2017 (r314405) @@ -166,7 +166,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* BITSPERBYTE_SEVEN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0), /* BITSPERBYTE_SIX */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0), /* BREAK */ OP_TABLE_ENTRY (AML_BREAK_OP, 0, 0, 0), -/* BREAKPOINT */ OP_TABLE_ENTRY (AML_BREAK_POINT_OP, 0, 0, 0), +/* BREAKPOINT */ OP_TABLE_ENTRY (AML_BREAKPOINT_OP, 0, 0, 0), /* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_BUFFER), /* BUSMASTERTYPE_MASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0), /* BUSMASTERTYPE_NOTMASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), @@ -176,12 +176,12 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* CLOCKPHASE_SECOND */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0), /* CLOCKPOLARITY_HIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0), /* CLOCKPOLARITY_LOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), -/* CONCATENATE */ OP_TABLE_ENTRY (AML_CONCAT_OP, 0, 0, ACPI_BTYPE_COMPUTE_DATA), -/* CONCATENATERESTEMPLATE */ OP_TABLE_ENTRY (AML_CONCAT_RES_OP, 0, 0, ACPI_BTYPE_BUFFER), -/* CONDREFOF */ OP_TABLE_ENTRY (AML_COND_REF_OF_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* CONCATENATE */ OP_TABLE_ENTRY (AML_CONCATENATE_OP, 0, 0, ACPI_BTYPE_COMPUTE_DATA), +/* CONCATENATERESTEMPLATE */ OP_TABLE_ENTRY (AML_CONCATENATE_TEMPLATE_OP,0, 0, ACPI_BTYPE_BUFFER), +/* CONDREFOF */ OP_TABLE_ENTRY (AML_CONDITIONAL_REF_OF_OP, 0, 0, ACPI_BTYPE_INTEGER), /* CONNECTION */ OP_TABLE_ENTRY (AML_INT_CONNECTION_OP, 0, 0, 0), /* CONTINUE */ OP_TABLE_ENTRY (AML_CONTINUE_OP, 0, 0, 0), -/* COPY */ OP_TABLE_ENTRY (AML_COPY_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE), +/* COPYOBJECT */ OP_TABLE_ENTRY (AML_COPY_OBJECT_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE), /* CREATEBITFIELD */ OP_TABLE_ENTRY (AML_CREATE_BIT_FIELD_OP, 0, 0, 0), /* CREATEBYTEFIELD */ OP_TABLE_ENTRY (AML_CREATE_BYTE_FIELD_OP, 0, 0, 0), /* CREATEDWORDFIELD */ OP_TABLE_ENTRY (AML_CREATE_DWORD_FIELD_OP, 0, 0, 0), @@ -261,14 +261,14 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* IORESTRICT_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0), /* IRQ */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0), /* IRQNOFLAGS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0), -/* LAND */ OP_TABLE_ENTRY (AML_LAND_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LEQUAL */ OP_TABLE_ENTRY (AML_LEQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LGREATER */ OP_TABLE_ENTRY (AML_LGREATER_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LGREATEREQUAL */ OP_TABLE_ENTRY (AML_LGREATEREQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LLESS */ OP_TABLE_ENTRY (AML_LLESS_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LLESSEQUAL */ OP_TABLE_ENTRY (AML_LLESSEQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LNOT */ OP_TABLE_ENTRY (AML_LNOT_OP, 0, 0, ACPI_BTYPE_INTEGER), -/* LNOTEQUAL */ OP_TABLE_ENTRY (AML_LNOTEQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LAND */ OP_TABLE_ENTRY (AML_LOGICAL_AND_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LGREATER */ OP_TABLE_ENTRY (AML_LOGICAL_GREATER_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LGREATEREQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_GREATER_EQUAL_OP,0, 0, ACPI_BTYPE_INTEGER), +/* LLESS */ OP_TABLE_ENTRY (AML_LOGICAL_LESS_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LLESSEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_LESS_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LNOT */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LNOTEQUAL */ OP_TABLE_ENTRY (AML_LOGICAL_NOT_EQUAL_OP, 0, 0, ACPI_BTYPE_INTEGER), /* LOAD */ OP_TABLE_ENTRY (AML_LOAD_OP, 0, 0, 0), /* LOADTABLE */ OP_TABLE_ENTRY (AML_LOAD_TABLE_OP, 0, 0, ACPI_BTYPE_DDB_HANDLE), /* LOCAL0 */ OP_TABLE_ENTRY (AML_LOCAL0, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS), @@ -281,7 +281,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* LOCAL7 */ OP_TABLE_ENTRY (AML_LOCAL7, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS), /* LOCKRULE_LOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_LOCK_ALWAYS, 0, 0), /* LOCKRULE_NOLOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_LOCK_NEVER, 0, 0), -/* LOR */ OP_TABLE_ENTRY (AML_LOR_OP, 0, 0, ACPI_BTYPE_INTEGER), +/* LOR */ OP_TABLE_ENTRY (AML_LOGICAL_OR_OP, 0, 0, ACPI_BTYPE_INTEGER), /* MATCH */ OP_TABLE_ENTRY (AML_MATCH_OP, 0, 0, ACPI_BTYPE_INTEGER), /* MATCHTYPE_MEQ */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, MATCH_MEQ, 0, ACPI_BTYPE_INTEGER), /* MATCHTYPE_MGE */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, MATCH_MGE, 0, ACPI_BTYPE_INTEGER), @@ -347,7 +347,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* PIN_PULLDEFAULT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), /* PIN_PULLDOWN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0), /* PIN_PULLUP */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0), -/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RES_OP, 0, NODE_AML_PACKAGE, 0), +/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RESOURCE_OP, 0, NODE_AML_PACKAGE, 0), /* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, NODE_AML_PACKAGE, 0), /* QWORDCONST */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER), /* QWORDIO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), @@ -412,8 +412,8 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* TIMER */ OP_TABLE_ENTRY (AML_TIMER_OP, 0, 0, ACPI_BTYPE_INTEGER), /* TOBCD */ OP_TABLE_ENTRY (AML_TO_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER), /* TOBUFFER */ OP_TABLE_ENTRY (AML_TO_BUFFER_OP, 0, 0, ACPI_BTYPE_BUFFER), -/* TODECIMALSTRING */ OP_TABLE_ENTRY (AML_TO_DECSTRING_OP, 0, 0, ACPI_BTYPE_STRING), -/* TOHEXSTRING */ OP_TABLE_ENTRY (AML_TO_HEXSTRING_OP, 0, 0, ACPI_BTYPE_STRING), +/* TODECIMALSTRING */ OP_TABLE_ENTRY (AML_TO_DECIMAL_STRING_OP, 0, 0, ACPI_BTYPE_STRING), +/* TOHEXSTRING */ OP_TABLE_ENTRY (AML_TO_HEX_STRING_OP, 0, 0, ACPI_BTYPE_STRING), /* TOINTEGER */ OP_TABLE_ENTRY (AML_TO_INTEGER_OP, 0, 0, ACPI_BTYPE_INTEGER), /* TOSTRING */ OP_TABLE_ENTRY (AML_TO_STRING_OP, 0, 0, ACPI_BTYPE_STRING), /* TOUUID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_INTEGER), @@ -428,7 +428,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa /* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0), /* UPDATERULE_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_PRESERVE, 0, 0), /* UPDATERULE_ZEROS */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ZEROS,0, 0), -/* VAR_PACKAGE */ OP_TABLE_ENTRY (AML_VAR_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE), +/* VARIABLE_PACKAGE */ OP_TABLE_ENTRY (AML_VARIABLE_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE), /* VENDORLONG */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), /* VENDORSHORT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), /* WAIT */ OP_TABLE_ENTRY (AML_WAIT_OP, 0, 0, ACPI_BTYPE_INTEGER), Modified: vendor-sys/acpica/dist/source/compiler/asloffset.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloffset.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asloffset.c Tue Feb 28 20:06:31 2017 (r314405) @@ -185,7 +185,7 @@ LsAmlOffsetWalk ( break; case AML_PACKAGE_OP: - case AML_VAR_PACKAGE_OP: + case AML_VARIABLE_PACKAGE_OP: /* Get the package element count */ Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Tue Feb 28 20:06:31 2017 (r314405) @@ -321,7 +321,7 @@ OpnDoFieldCommon ( Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; } - else if (NewBitOffset == CurrentBitOffset) + else if ((NewBitOffset == CurrentBitOffset) && Gbl_OptimizeTrivialParseNodes) { /* * Offset is redundant; we don't need to output an @@ -352,7 +352,8 @@ OpnDoFieldCommon ( CurrentBitOffset += NewBitOffset; if ((NewBitOffset == 0) && - (Next->Asl.ParseOpcode == PARSEOP_RESERVED_BYTES)) + (Next->Asl.ParseOpcode == PARSEOP_RESERVED_BYTES) && + Gbl_OptimizeTrivialParseNodes) { /* * Unnamed field with a bit length of zero. We can @@ -1072,7 +1073,7 @@ OpnAttachNameToNode ( case AML_METHOD_OP: case AML_MUTEX_OP: case AML_REGION_OP: - case AML_POWER_RES_OP: + case AML_POWER_RESOURCE_OP: case AML_PROCESSOR_OP: case AML_THERMAL_ZONE_OP: case AML_NAME_OP: Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Tue Feb 28 20:06:31 2017 (r314405) @@ -68,7 +68,7 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" -#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z" +#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|t|T+G^v^w|x:z" static char ASL_BUILD_DATE[] = __DATE__; static char ASL_BUILD_TIME[] = __TIME__; @@ -209,6 +209,24 @@ AslDoOptions ( switch (AcpiGbl_Optarg[0]) { + + case 'c': + + printf ("Debug ASL to ASL+ conversion\n"); + + Gbl_DoAslConversion = TRUE; + Gbl_FoldConstants = FALSE; + Gbl_IntegerOptimizationFlag = FALSE; + Gbl_ReferenceOptimizationFlag = FALSE; + Gbl_OptimizeTrivialParseNodes = FALSE; + Gbl_CaptureComments = TRUE; + AcpiGbl_DoDisassemblerOptimizations = FALSE; + AcpiGbl_DebugAslConversion = TRUE; + AcpiGbl_DmEmitExternalOpcodes = TRUE; + Gbl_DoExternalsInPlace = TRUE; + + return (0); + case 'f': AslCompilerdebug = 1; /* same as yydebug */ @@ -260,6 +278,22 @@ AslDoOptions ( switch (AcpiGbl_Optarg[0]) { + + case 'a': + + printf ("Convert ASL to ASL+ with comments\n"); + Gbl_DoAslConversion = TRUE; + Gbl_FoldConstants = FALSE; + Gbl_IntegerOptimizationFlag = FALSE; + Gbl_ReferenceOptimizationFlag = FALSE; + Gbl_OptimizeTrivialParseNodes = FALSE; + Gbl_CaptureComments = TRUE; + AcpiGbl_DoDisassemblerOptimizations = FALSE; + AcpiGbl_DmEmitExternalOpcodes = TRUE; + Gbl_DoExternalsInPlace = TRUE; + + return (0); + case 'r': Gbl_NoResourceChecking = TRUE; @@ -552,6 +586,8 @@ AslDoOptions ( Gbl_FoldConstants = FALSE; Gbl_IntegerOptimizationFlag = FALSE; Gbl_ReferenceOptimizationFlag = FALSE; + Gbl_OptimizeTrivialParseNodes = FALSE; + break; case 'c': @@ -570,15 +606,21 @@ AslDoOptions ( case 'e': - /* iASL: Disable External opcode generation */ - - Gbl_DoExternals = FALSE; - /* Disassembler: Emit embedded external operators */ AcpiGbl_DmEmitExternalOpcodes = TRUE; break; + case 'E': + + /* + * iASL: keep External opcodes in place. + * No affect if Gbl_DoExternals is false. + */ + + Gbl_DoExternalsInPlace = TRUE; + break; + case 'f': /* Disable folding on "normal" expressions */ @@ -643,6 +685,17 @@ AslDoOptions ( Gbl_UseDefaultAmlFilename = FALSE; break; + case 'q': /* ASL/ASl+ converter: compile only and leave badaml. */ + + printf ("Convert ASL to ASL+ with comments\n"); + Gbl_FoldConstants = FALSE; + Gbl_IntegerOptimizationFlag = FALSE; + Gbl_ReferenceOptimizationFlag = FALSE; + Gbl_OptimizeTrivialParseNodes = FALSE; + Gbl_CaptureComments = TRUE; + Gbl_DoExternalsInPlace = TRUE; + return (0); + case 'r': /* Override revision found in table header */ Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0); Modified: vendor-sys/acpica/dist/source/compiler/aslprimaries.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslprimaries.y Tue Feb 28 19:55:16 2017 (r314404) +++ vendor-sys/acpica/dist/source/compiler/aslprimaries.y Tue Feb 28 20:06:31 2017 (r314405) @@ -2,6 +2,8 @@ NoEcho(' /****************************************************************************** * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Tue Feb 28 20:07:06 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E82FCF26B0; Tue, 28 Feb 2017 20:07:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E9896D; Tue, 28 Feb 2017 20:07:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SK74x0016087; Tue, 28 Feb 2017 20:07:04 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SK74ma016086; Tue, 28 Feb 2017 20:07:04 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201702282007.v1SK74ma016086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 28 Feb 2017 20:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314406 - vendor-sys/acpica/20170224 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 20:07:06 -0000 Author: jkim Date: Tue Feb 28 20:07:04 2017 New Revision: 314406 URL: https://svnweb.freebsd.org/changeset/base/314406 Log: Tag ACPICA 20170224. Added: vendor-sys/acpica/20170224/ - copied from r314405, vendor-sys/acpica/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:24 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A4D7CF200B; Tue, 28 Feb 2017 21:07:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01842D8B; Tue, 28 Feb 2017 21:07:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7NLN039753; Tue, 28 Feb 2017 21:07:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7NLu039752; Tue, 28 Feb 2017 21:07:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7NLu039752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314412 - vendor/llvm/llvm-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:24 -0000 Author: dim Date: Tue Feb 28 21:07:22 2017 New Revision: 314412 URL: https://svnweb.freebsd.org/changeset/base/314412 Log: Tag llvm release_40 branch r296509. Added: vendor/llvm/llvm-release_40-r296509/ - copied from r314411, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:21 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D5B9CF2007; Tue, 28 Feb 2017 21:07:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C89E2D84; Tue, 28 Feb 2017 21:07:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7JYl039707; Tue, 28 Feb 2017 21:07:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7IJj039692; Tue, 28 Feb 2017 21:07:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7IJj039692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314411 - in vendor/llvm/dist: docs lib/CodeGen test/CodeGen/X86 test/tools/llvm-xray/X86 test/tools/llvm-xray/X86/Inputs tools/llvm-xray X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:21 -0000 Author: dim Date: Tue Feb 28 21:07:18 2017 New Revision: 314411 URL: https://svnweb.freebsd.org/changeset/base/314411 Log: Vendor import of llvm release_40 branch r296509: https://llvm.org/svn/llvm-project/llvm/branches/release_40@296509 Added: vendor/llvm/dist/test/CodeGen/X86/pr30284.ll Modified: vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt vendor/llvm/dist/test/tools/llvm-xray/X86/extract-instrmap.ll vendor/llvm/dist/tools/llvm-xray/xray-converter.cc vendor/llvm/dist/tools/llvm-xray/xray-extract.cc Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Tue Feb 28 21:07:18 2017 (r314411) @@ -20,6 +20,14 @@ have questions or comments, the `LLVM De `_ is a good place to send them. +New Versioning Scheme +===================== +Starting with this release, LLVM is using a +`new versioning scheme `_, +increasing the major version number with each major release. Stable updates to +this release will be versioned 4.0.x, and the next major release, six months +from now, will be version 5.0.0. + Non-comprehensive list of changes in this release ================================================= * Minimum compiler version to build has been raised to GCC 4.8 and VS 2015. @@ -238,6 +246,34 @@ Most of the work behind the scenes has b assembly, and also fixing some assertions we would hit on some well-formed inputs. +Changes to the MIPS Target +----------------------------- + +**During this release the MIPS target has:** + +* IAS is now enabled by default for Debian mips64el. +* Added support for the two operand form for many instructions. +* Added the following macros: unaligned load/store, seq, double word load/store for O32. +* Improved the parsing of complex memory offset expressions. +* Enabled the integrated assembler by default for Debian mips64el. +* Added a generic scheduler based on the interAptiv CPU. +* Added support for thread local relocations. +* Added recip, rsqrt, evp, dvp, synci instructions in IAS. +* Optimized the generation of constants from some cases. + +**The following issues have been fixed:** + +* Thread local debug information is correctly recorded. +* MSA intrinsics are now range checked. +* Fixed an issue with MSA and the no-odd-spreg abi. +* Fixed some corner cases in handling forbidden slots for MIPSR6. +* Fixed an issue with jumps not being converted to relative branches for assembly. +* Fixed the handling of local symbols and jal instruction. +* N32/N64 no longer have their relocation tables sorted as per their ABIs. +* Fixed a crash when half-precision floating point conversion MSA intrinsics are used. +* Fixed several crashes involving FastISel. +* Corrected the corrected definitions for aui/daui/dahi/dati for MIPSR6. + Changes to the OCaml bindings ----------------------------- Modified: vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp Tue Feb 28 21:07:18 2017 (r314411) @@ -707,9 +707,8 @@ void ExeDepsFix::visitSoftInstr(MachineI // Kill off any remaining uses that don't match available, and build a list of // incoming DomainValues that we want to merge. - SmallVector Regs; - for (SmallVectorImpl::iterator i=used.begin(), e=used.end(); i!=e; ++i) { - int rx = *i; + SmallVector Regs; + for (int rx : used) { assert(LiveRegs && "no space allocated for live registers"); const LiveReg &LR = LiveRegs[rx]; // This useless DomainValue could have been missed above. @@ -718,16 +717,11 @@ void ExeDepsFix::visitSoftInstr(MachineI continue; } // Sorted insertion. - bool Inserted = false; - for (SmallVectorImpl::iterator i = Regs.begin(), e = Regs.end(); - i != e && !Inserted; ++i) { - if (LR.Def < i->Def) { - Inserted = true; - Regs.insert(i, LR); - } - } - if (!Inserted) - Regs.push_back(LR); + auto I = std::upper_bound(Regs.begin(), Regs.end(), &LR, + [](const LiveReg *LHS, const LiveReg *RHS) { + return LHS->Def < RHS->Def; + }); + Regs.insert(I, &LR); } // doms are now sorted in order of appearance. Try to merge them all, giving @@ -735,14 +729,14 @@ void ExeDepsFix::visitSoftInstr(MachineI DomainValue *dv = nullptr; while (!Regs.empty()) { if (!dv) { - dv = Regs.pop_back_val().Value; + dv = Regs.pop_back_val()->Value; // Force the first dv to match the current instruction. dv->AvailableDomains = dv->getCommonDomains(available); assert(dv->AvailableDomains && "Domain should have been filtered"); continue; } - DomainValue *Latest = Regs.pop_back_val().Value; + DomainValue *Latest = Regs.pop_back_val()->Value; // Skip already merged values. if (Latest == dv || Latest->Next) continue; Added: vendor/llvm/dist/test/CodeGen/X86/pr30284.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/X86/pr30284.ll Tue Feb 28 21:07:18 2017 (r314411) @@ -0,0 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -mattr=avx512dq | FileCheck %s + +define void @f_f___un_3C_unf_3E_un_3C_unf_3E_() { +; CHECK-LABEL: f_f___un_3C_unf_3E_un_3C_unf_3E_: +; CHECK: # BB#0: +; CHECK-NEXT: vmovapd 0, %zmm0 +; CHECK-NEXT: vmovapd 64, %zmm1 +; CHECK-NEXT: vmovapd {{.*#+}} zmm2 = [0,16,0,16,0,16,0,16,0,16,0,16,0,16,0,16] +; CHECK-NEXT: kshiftrw $8, %k0, %k1 +; CHECK-NEXT: vorpd %zmm2, %zmm1, %zmm1 {%k1} +; CHECK-NEXT: vorpd %zmm2, %zmm0, %zmm0 {%k1} +; CHECK-NEXT: vmovapd %zmm0, 0 +; CHECK-NEXT: vmovapd %zmm1, 64 +; CHECK-NEXT: retl + %a_load22 = load <16 x i64>, <16 x i64>* null, align 1 + %bitop = or <16 x i64> %a_load22, + %v.i = load <16 x i64>, <16 x i64>* null + %v1.i41 = select <16 x i1> undef, <16 x i64> %bitop, <16 x i64> %v.i + store <16 x i64> %v1.i41, <16 x i64>* null + ret void +} Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml Tue Feb 28 21:07:18 2017 (r314411) @@ -1,14 +1,8 @@ --- -- { id: 1, address: 0x000000000041CA40, function: 0x000000000041CA40, kind: function-enter, - always-instrument: true } -- { id: 1, address: 0x000000000041CA50, function: 0x000000000041CA40, kind: tail-exit, - always-instrument: true } -- { id: 2, address: 0x000000000041CA70, function: 0x000000000041CA70, kind: function-enter, - always-instrument: true } -- { id: 2, address: 0x000000000041CA7C, function: 0x000000000041CA70, kind: tail-exit, - always-instrument: true } -- { id: 3, address: 0x000000000041CAA0, function: 0x000000000041CAA0, kind: function-enter, - always-instrument: true } -- { id: 3, address: 0x000000000041CAB4, function: 0x000000000041CAA0, kind: function-exit, - always-instrument: true } +- { id: 1, address: 0x000000000041CA40, function: 0x000000000041CA40, kind: function-enter, always-instrument: true } +- { id: 1, address: 0x000000000041CA50, function: 0x000000000041CA40, kind: tail-exit, always-instrument: true } +- { id: 2, address: 0x000000000041CA70, function: 0x000000000041CA70, kind: function-enter, always-instrument: true } +- { id: 2, address: 0x000000000041CA7C, function: 0x000000000041CA70, kind: tail-exit, always-instrument: true } +- { id: 3, address: 0x000000000041CAA0, function: 0x000000000041CAA0, kind: function-enter, always-instrument: true } +- { id: 3, address: 0x000000000041CAB4, function: 0x000000000041CAA0, kind: function-exit, always-instrument: true } ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml Tue Feb 28 21:07:18 2017 (r314411) @@ -7,10 +7,8 @@ header: nonstop-tsc: true cycle-frequency: 2601000000 records: - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, - tsc: 10001 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, - tsc: 10100 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } ... #CHECK: Functions with latencies: 1 Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml Tue Feb 28 21:07:18 2017 (r314411) @@ -17,27 +17,17 @@ header: cycle-frequency: 1 records: # Function id: 1 - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, - tsc: 10001 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, - tsc: 10100 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, - tsc: 10101 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, - tsc: 10200 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, - tsc: 10201 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, - tsc: 10300 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10101 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10200 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10201 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10300 } # Function id: 2 - - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-enter, - tsc: 10001 } - - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-exit, - tsc: 10002 } - - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-enter, - tsc: 10101 } - - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-exit, - tsc: 10102 } + - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-exit, tsc: 10002 } + - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-enter, tsc: 10101 } + - { type: 0, func-id: 2, cpu: 1, thread: 222, kind: function-exit, tsc: 10102 } #DEFAULT: Functions with latencies: 2 #DEFAULT-NEXT: funcid count [ min, med, 90p, 99p, max] sum function Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml Tue Feb 28 21:07:18 2017 (r314411) @@ -7,10 +7,8 @@ header: nonstop-tsc: true cycle-frequency: 2601000000 records: - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, - tsc: 10001 } - - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, - tsc: 10100 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } ... #CHECK: --- @@ -21,8 +19,6 @@ records: #CHECK-NEXT: nonstop-tsc: true #CHECK-NEXT: cycle-frequency: 2601000000 #CHECK-NEXT: records: -#CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 1, thread: 111, kind: function-enter, -#CHECK-NEXT: tsc: 10001 } -#CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 1, thread: 111, kind: function-exit, -#CHECK-NEXT: tsc: 10100 } +#CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } +#CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } #CHECK-NEXT: ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt Tue Feb 28 21:07:18 2017 (r314411) @@ -8,16 +8,10 @@ ; CHECK-NEXT: nonstop-tsc: true ; CHECK-NEXT: cycle-frequency: 2601000000 ; CHECK-NEXT: records: -; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841453914 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454542 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454670 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454762 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454802 } -; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841494828 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841453914 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454542 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454670 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454762 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454802 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841494828 } ; CHECK-NEXT: ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt Tue Feb 28 21:07:18 2017 (r314411) @@ -8,16 +8,10 @@ ; CHECK-NEXT: nonstop-tsc: true ; CHECK-NEXT: cycle-frequency: 2601000000 ; CHECK-NEXT: records: -; CHECK-NEXT: - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841453914 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454542 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454670 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454762 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454802 } -; CHECK-NEXT: - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841494828 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841453914 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454542 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454670 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454762 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454802 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: main, cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841494828 } ; CHECK-NEXT: ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt Tue Feb 28 21:07:18 2017 (r314411) @@ -8,16 +8,10 @@ ; CHECK-NEXT: nonstop-tsc: true ; CHECK-NEXT: cycle-frequency: 2601000000 ; CHECK-NEXT: records: -; CHECK-NEXT: - { type: 0, func-id: 3, function: '@(41caa0)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-enter, tsc: 3315356841453914 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '@(41ca70)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-enter, tsc: 3315356841454542 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '@(41ca70)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-exit, tsc: 3315356841454670 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '@(41ca40)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-enter, tsc: 3315356841454762 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '@(41ca40)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-exit, tsc: 3315356841454802 } -; CHECK-NEXT: - { type: 0, func-id: 3, function: '@(41caa0)', cpu: 37, thread: 84697, -; CHECK-NEXT: kind: function-exit, tsc: 3315356841494828 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '@(41caa0)', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841453914 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '@(41ca70)', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454542 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '@(41ca70)', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454670 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '@(41ca40)', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454762 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '@(41ca40)', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454802 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '@(41caa0)', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841494828 } ; CHECK-NEXT: ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt Tue Feb 28 21:07:18 2017 (r314411) @@ -8,16 +8,10 @@ ; CHECK-NEXT: nonstop-tsc: true ; CHECK-NEXT: cycle-frequency: 2601000000 ; CHECK-NEXT: records: -; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841453914 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454542 } -; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454670 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-enter, -; CHECK-NEXT: tsc: 3315356841454762 } -; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841454802 } -; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-exit, -; CHECK-NEXT: tsc: 3315356841494828 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841453914 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454542 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454670 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-enter, tsc: 3315356841454762 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841454802 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 37, thread: 84697, kind: function-exit, tsc: 3315356841494828 } ; CHECK-NEXT: ... Modified: vendor/llvm/dist/test/tools/llvm-xray/X86/extract-instrmap.ll ============================================================================== --- vendor/llvm/dist/test/tools/llvm-xray/X86/extract-instrmap.ll Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/test/tools/llvm-xray/X86/extract-instrmap.ll Tue Feb 28 21:07:18 2017 (r314411) @@ -4,12 +4,8 @@ ; RUN: llvm-xray extract %S/Inputs/elf64-example.bin | FileCheck %s ; CHECK: --- -; CHECK-NEXT: - { id: 1, address: 0x000000000041C900, function: 0x000000000041C900, kind: function-enter, -; CHECK-NEXT: always-instrument: true } -; CHECK-NEXT: - { id: 1, address: 0x000000000041C912, function: 0x000000000041C900, kind: function-exit, -; CHECK-NEXT: always-instrument: true } -; CHECK-NEXT: - { id: 2, address: 0x000000000041C930, function: 0x000000000041C930, kind: function-enter, -; CHECK-NEXT: always-instrument: true } -; CHECK-NEXT: - { id: 2, address: 0x000000000041C946, function: 0x000000000041C930, kind: function-exit, -; CHECK-NEXT: always-instrument: true } +; CHECK-NEXT: - { id: 1, address: 0x000000000041C900, function: 0x000000000041C900, kind: function-enter, always-instrument: true } +; CHECK-NEXT: - { id: 1, address: 0x000000000041C912, function: 0x000000000041C900, kind: function-exit, always-instrument: true } +; CHECK-NEXT: - { id: 2, address: 0x000000000041C930, function: 0x000000000041C930, kind: function-enter, always-instrument: true } +; CHECK-NEXT: - { id: 2, address: 0x000000000041C946, function: 0x000000000041C930, kind: function-exit, always-instrument: true } ; CHECK-NEXT: ... Modified: vendor/llvm/dist/tools/llvm-xray/xray-converter.cc ============================================================================== --- vendor/llvm/dist/tools/llvm-xray/xray-converter.cc Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/tools/llvm-xray/xray-converter.cc Tue Feb 28 21:07:18 2017 (r314411) @@ -98,7 +98,7 @@ void TraceConverter::exportAsYAML(const : std::to_string(R.FuncId), R.TSC, R.TId}); } - Output Out(OS); + Output Out(OS, nullptr, 0); Out << Trace; } Modified: vendor/llvm/dist/tools/llvm-xray/xray-extract.cc ============================================================================== --- vendor/llvm/dist/tools/llvm-xray/xray-extract.cc Tue Feb 28 20:51:20 2017 (r314410) +++ vendor/llvm/dist/tools/llvm-xray/xray-extract.cc Tue Feb 28 21:07:18 2017 (r314411) @@ -270,7 +270,7 @@ void InstrumentationMapExtractor::export YAMLSleds.push_back({FunctionIds[Sled.Function], Sled.Address, Sled.Function, Sled.Kind, Sled.AlwaysInstrument}); } - Output Out(OS); + Output Out(OS, nullptr, 0); Out << YAMLSleds; } From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:33 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFCB3CF205D; Tue, 28 Feb 2017 21:07:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 931FEE49; Tue, 28 Feb 2017 21:07:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7Whh039848; Tue, 28 Feb 2017 21:07:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7Wa0039847; Tue, 28 Feb 2017 21:07:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7Wa0039847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314414 - vendor/compiler-rt/compiler-rt-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:34 -0000 Author: dim Date: Tue Feb 28 21:07:32 2017 New Revision: 314414 URL: https://svnweb.freebsd.org/changeset/base/314414 Log: Tag compiler-rt release_40 branch r296509. Added: vendor/compiler-rt/compiler-rt-release_40-r296509/ - copied from r314413, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:30 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 625CFCF2044; Tue, 28 Feb 2017 21:07:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B66DE1; Tue, 28 Feb 2017 21:07:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7ThD039802; Tue, 28 Feb 2017 21:07:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7T6Z039801; Tue, 28 Feb 2017 21:07:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7T6Z039801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314413 - vendor/clang/clang-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:30 -0000 Author: dim Date: Tue Feb 28 21:07:28 2017 New Revision: 314413 URL: https://svnweb.freebsd.org/changeset/base/314413 Log: Tag clang release_40 branch r296509. Added: vendor/clang/clang-release_40-r296509/ - copied from r314412, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:39 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FEBCCF20B0; Tue, 28 Feb 2017 21:07:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 269EEEF9; Tue, 28 Feb 2017 21:07:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7cew039898; Tue, 28 Feb 2017 21:07:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7c0a039896; Tue, 28 Feb 2017 21:07:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7c0a039896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314415 - vendor/libc++/libc++-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:39 -0000 Author: dim Date: Tue Feb 28 21:07:38 2017 New Revision: 314415 URL: https://svnweb.freebsd.org/changeset/base/314415 Log: Tag libc++ release_40 branch r296509. Added: vendor/libc++/libc++-release_40-r296509/ - copied from r314414, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:42 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5F37CF20E5; Tue, 28 Feb 2017 21:07:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77DF5F4A; Tue, 28 Feb 2017 21:07:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7fiC039948; Tue, 28 Feb 2017 21:07:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7f9j039947; Tue, 28 Feb 2017 21:07:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7f9j039947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314416 - vendor/lld/lld-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:42 -0000 Author: dim Date: Tue Feb 28 21:07:41 2017 New Revision: 314416 URL: https://svnweb.freebsd.org/changeset/base/314416 Log: Tag lld release_40 branch r296509. Added: vendor/lld/lld-release_40-r296509/ - copied from r314415, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 21:07:48 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF04CF213A; Tue, 28 Feb 2017 21:07:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E46FFF; Tue, 28 Feb 2017 21:07:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SL7kP6039997; Tue, 28 Feb 2017 21:07:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SL7kM0039996; Tue, 28 Feb 2017 21:07:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702282107.v1SL7kM0039996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 28 Feb 2017 21:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314417 - vendor/lldb/lldb-release_40-r296509 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 21:07:48 -0000 Author: dim Date: Tue Feb 28 21:07:46 2017 New Revision: 314417 URL: https://svnweb.freebsd.org/changeset/base/314417 Log: Tag lldb release_40 branch r296509. Added: vendor/lldb/lldb-release_40-r296509/ - copied from r314416, vendor/lldb/dist/ From owner-svn-src-vendor@freebsd.org Tue Feb 28 23:24:10 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C0BFCF204C; Tue, 28 Feb 2017 23:24:10 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 090219AA; Tue, 28 Feb 2017 23:24:09 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SNO9uo098421; Tue, 28 Feb 2017 23:24:09 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SNO90x098420; Tue, 28 Feb 2017 23:24:09 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201702282324.v1SNO90x098420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 28 Feb 2017 23:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314432 - vendor-sys/ck/dist/src X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 23:24:10 -0000 Author: cognet Date: Tue Feb 28 23:24:08 2017 New Revision: 314432 URL: https://svnweb.freebsd.org/changeset/base/314432 Log: Import CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get a fix in ck_epoch Modified: vendor-sys/ck/dist/src/ck_epoch.c Modified: vendor-sys/ck/dist/src/ck_epoch.c ============================================================================== --- vendor-sys/ck/dist/src/ck_epoch.c Tue Feb 28 23:03:51 2017 (r314431) +++ vendor-sys/ck/dist/src/ck_epoch.c Tue Feb 28 23:24:08 2017 (r314432) @@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global, { ck_stack_entry_t *cursor; - *af = false; if (cr == NULL) { cursor = CK_STACK_FIRST(&global->records); + *af = false; } else { cursor = &cr->record_next; + *af = true; } while (cursor != NULL) { From owner-svn-src-vendor@freebsd.org Tue Feb 28 23:27:01 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E963CF219E; Tue, 28 Feb 2017 23:27:01 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7879C9D; Tue, 28 Feb 2017 23:27:00 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1SNQxeh098628; Tue, 28 Feb 2017 23:26:59 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1SNQx4w098627; Tue, 28 Feb 2017 23:26:59 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201702282326.v1SNQx4w098627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Tue, 28 Feb 2017 23:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314434 - vendor-sys/ck/20170228 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 23:27:01 -0000 Author: cognet Date: Tue Feb 28 23:26:59 2017 New Revision: 314434 URL: https://svnweb.freebsd.org/changeset/base/314434 Log: Tag CK import as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e Added: vendor-sys/ck/20170228/ - copied from r314432, vendor-sys/ck/dist/ From owner-svn-src-vendor@freebsd.org Wed Mar 1 21:35:26 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2D09CF3107; Wed, 1 Mar 2017 21:35:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FFB218D; Wed, 1 Mar 2017 21:35:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v21LZPjs027090; Wed, 1 Mar 2017 21:35:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v21LZPFP027089; Wed, 1 Mar 2017 21:35:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703012135.v21LZPFP027089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 1 Mar 2017 21:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314518 - vendor/dma/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 21:35:26 -0000 Author: bapt Date: Wed Mar 1 21:35:25 2017 New Revision: 314518 URL: https://svnweb.freebsd.org/changeset/base/314518 Log: Import dma snapshot from git 2017-02-10 The only change is: use basename to select executable identity PR: 216910 Submitted by: Andrej Ebert Modified: vendor/dma/dist/dma.c Modified: vendor/dma/dist/dma.c ============================================================================== --- vendor/dma/dist/dma.c Wed Mar 1 21:31:44 2017 (r314517) +++ vendor/dma/dist/dma.c Wed Mar 1 21:35:25 2017 (r314518) @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -457,7 +458,7 @@ main(int argc, char **argv) bzero(&queue, sizeof(queue)); LIST_INIT(&queue.queue); - if (strcmp(argv[0], "mailq") == 0) { + if (strcmp(basename(argv[0]), "mailq") == 0) { argv++; argc--; showq = 1; if (argc != 0) From owner-svn-src-vendor@freebsd.org Wed Mar 1 21:37:45 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2702ACF3228; Wed, 1 Mar 2017 21:37:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E784C3BB; Wed, 1 Mar 2017 21:37:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v21Lbi1H027228; Wed, 1 Mar 2017 21:37:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v21LbhVX027226; Wed, 1 Mar 2017 21:37:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201703012137.v21LbhVX027226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 1 Mar 2017 21:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314519 - vendor/dma/20170210 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 21:37:45 -0000 Author: bapt Date: Wed Mar 1 21:37:43 2017 New Revision: 314519 URL: https://svnweb.freebsd.org/changeset/base/314519 Log: Tag import of dma 20170210 Added: vendor/dma/20170210/ - copied from r306538, vendor/dma/dist/ Replaced: vendor/dma/20170210/dma-mbox-create.c - copied unchanged from r306539, vendor/dma/dist/dma-mbox-create.c vendor/dma/20170210/dma.c - copied unchanged from r314518, vendor/dma/dist/dma.c Copied: vendor/dma/20170210/dma-mbox-create.c (from r306539, vendor/dma/dist/dma-mbox-create.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/20170210/dma-mbox-create.c Wed Mar 1 21:37:43 2017 (r314519, copy of r306539, vendor/dma/dist/dma-mbox-create.c) @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>. + * Copyright (c) 2008 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Simon Schubert <2@0x2c.org>. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This binary is setuid root. Use extreme caution when touching + * user-supplied information. Keep the root window as small as possible. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dma.h" + + +static void +logfail(int exitcode, const char *fmt, ...) +{ + int oerrno = errno; + va_list ap; + char outs[1024]; + + outs[0] = 0; + if (fmt != NULL) { + va_start(ap, fmt); + vsnprintf(outs, sizeof(outs), fmt, ap); + va_end(ap); + } + + errno = oerrno; + if (*outs != 0) + syslog(LOG_ERR, errno ? "%s: %m" : "%s", outs); + else + syslog(LOG_ERR, errno ? "%m" : "unknown error"); + + exit(exitcode); +} + +/* + * Create a mbox in /var/mail for a given user, or make sure + * the permissions are correct for dma. + */ + +int +main(int argc, char **argv) +{ + const char *user; + struct passwd *pw; + struct group *gr; + uid_t user_uid; + gid_t mail_gid; + int f, maildirfd; + + openlog("dma-mbox-create", 0, LOG_MAIL); + + errno = 0; + gr = getgrnam(DMA_GROUP); + if (!gr) + logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP); + + mail_gid = gr->gr_gid; + + if (setgid(mail_gid) != 0) + logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP); + if (getegid() != mail_gid) + logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid()); + + /* + * We take exactly one argument: the username. + */ + if (argc != 2) { + errno = 0; + logfail(EX_USAGE, "no arguments"); + } + user = argv[1]; + + syslog(LOG_NOTICE, "creating mbox for `%s'", user); + + /* the username may not contain a pathname separator */ + if (strchr(user, '/')) { + errno = 0; + logfail(EX_DATAERR, "path separator in username `%s'", user); + exit(1); + } + + /* verify the user exists */ + errno = 0; + pw = getpwnam(user); + if (!pw) + logfail(EX_NOUSER, "cannot find user `%s'", user); + + maildirfd = open(_PATH_MAILDIR, O_RDONLY); + if (maildirfd < 0) + logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR); + + user_uid = pw->pw_uid; + + f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600); + if (f < 0) + logfail(EX_NOINPUT, "cannot open mbox `%s'", user); + + if (fchown(f, user_uid, mail_gid)) + logfail(EX_OSERR, "cannot change owner of mbox `%s'", user); + + if (fchmod(f, 0620)) + logfail(EX_OSERR, "cannot change permissions of mbox `%s'", + user); + + /* file should be present with the right owner and permissions */ + + syslog(LOG_NOTICE, "successfully created mbox for `%s'", user); + + return (0); +} Copied: vendor/dma/20170210/dma.c (from r314518, vendor/dma/dist/dma.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/dma/20170210/dma.c Wed Mar 1 21:37:43 2017 (r314519, copy of r314518, vendor/dma/dist/dma.c) @@ -0,0 +1,633 @@ +/* + * Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. + * Copyright (c) 2008 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Simon Schubert <2@0x2c.org>. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "dfcompat.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dma.h" + + +static void deliver(struct qitem *); + +struct aliases aliases = LIST_HEAD_INITIALIZER(aliases); +struct strlist tmpfs = SLIST_HEAD_INITIALIZER(tmpfs); +struct authusers authusers = LIST_HEAD_INITIALIZER(authusers); +char username[USERNAME_SIZE]; +uid_t useruid; +const char *logident_base; +char errmsg[ERRMSG_SIZE]; + +static int daemonize = 1; +static int doqueue = 0; + +struct config config = { + .smarthost = NULL, + .port = 25, + .aliases = "/etc/aliases", + .spooldir = "/var/spool/dma", + .authpath = NULL, + .certfile = NULL, + .features = 0, + .mailname = NULL, + .masquerade_host = NULL, + .masquerade_user = NULL, +}; + + +static void +sighup_handler(int signo) +{ + (void)signo; /* so that gcc doesn't complain */ +} + +static char * +set_from(struct queue *queue, const char *osender) +{ + const char *addr; + char *sender; + + if (osender) { + addr = osender; + } else if (getenv("EMAIL") != NULL) { + addr = getenv("EMAIL"); + } else { + if (config.masquerade_user) + addr = config.masquerade_user; + else + addr = username; + } + + if (!strchr(addr, '@')) { + const char *from_host = hostname(); + + if (config.masquerade_host) + from_host = config.masquerade_host; + + if (asprintf(&sender, "%s@%s", addr, from_host) <= 0) + return (NULL); + } else { + sender = strdup(addr); + if (sender == NULL) + return (NULL); + } + + if (strchr(sender, '\n') != NULL) { + errno = EINVAL; + return (NULL); + } + + queue->sender = sender; + return (sender); +} + +static int +read_aliases(void) +{ + yyin = fopen(config.aliases, "r"); + if (yyin == NULL) { + /* + * Non-existing aliases file is not a fatal error + */ + if (errno == ENOENT) + return (0); + /* Other problems are. */ + return (-1); + } + if (yyparse()) + return (-1); /* fatal error, probably malloc() */ + fclose(yyin); + return (0); +} + +static int +do_alias(struct queue *queue, const char *addr) +{ + struct alias *al; + struct stritem *sit; + int aliased = 0; + + LIST_FOREACH(al, &aliases, next) { + if (strcmp(al->alias, addr) != 0) + continue; + SLIST_FOREACH(sit, &al->dests, next) { + if (add_recp(queue, sit->str, EXPAND_ADDR) != 0) + return (-1); + } + aliased = 1; + } + + return (aliased); +} + +int +add_recp(struct queue *queue, const char *str, int expand) +{ + struct qitem *it, *tit; + struct passwd *pw; + char *host; + int aliased = 0; + + it = calloc(1, sizeof(*it)); + if (it == NULL) + return (-1); + it->addr = strdup(str); + if (it->addr == NULL) + return (-1); + + it->sender = queue->sender; + host = strrchr(it->addr, '@'); + if (host != NULL && + (strcmp(host + 1, hostname()) == 0 || + strcmp(host + 1, "localhost") == 0)) { + *host = 0; + } + LIST_FOREACH(tit, &queue->queue, next) { + /* weed out duplicate dests */ + if (strcmp(tit->addr, it->addr) == 0) { + free(it->addr); + free(it); + return (0); + } + } + LIST_INSERT_HEAD(&queue->queue, it, next); + + /** + * Do local delivery if there is no @. + * Do not do local delivery when NULLCLIENT is set. + */ + if (strrchr(it->addr, '@') == NULL && (config.features & NULLCLIENT) == 0) { + it->remote = 0; + if (expand) { + aliased = do_alias(queue, it->addr); + if (!aliased && expand == EXPAND_WILDCARD) + aliased = do_alias(queue, "*"); + if (aliased < 0) + return (-1); + if (aliased) { + LIST_REMOVE(it, next); + } else { + /* Local destination, check */ + pw = getpwnam(it->addr); + if (pw == NULL) + goto out; + /* XXX read .forward */ + endpwent(); + } + } + } else { + it->remote = 1; + } + + return (0); + +out: + free(it->addr); + free(it); + return (-1); +} + +static struct qitem * +go_background(struct queue *queue) +{ + struct sigaction sa; + struct qitem *it; + pid_t pid; + + if (daemonize && daemon(0, 0) != 0) { + syslog(LOG_ERR, "can not daemonize: %m"); + exit(EX_OSERR); + } + daemonize = 0; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = SIG_IGN; + sigaction(SIGCHLD, &sa, NULL); + + LIST_FOREACH(it, &queue->queue, next) { + /* No need to fork for the last dest */ + if (LIST_NEXT(it, next) == NULL) + goto retit; + + pid = fork(); + switch (pid) { + case -1: + syslog(LOG_ERR, "can not fork: %m"); + exit(EX_OSERR); + break; + + case 0: + /* + * Child: + * + * return and deliver mail + */ +retit: + /* + * If necessary, acquire the queue and * mail files. + * If this fails, we probably were raced by another + * process. It is okay to be raced if we're supposed + * to flush the queue. + */ + setlogident("%s", it->queueid); + switch (acquirespool(it)) { + case 0: + break; + case 1: + if (doqueue) + exit(EX_OK); + syslog(LOG_WARNING, "could not lock queue file"); + exit(EX_SOFTWARE); + default: + exit(EX_SOFTWARE); + } + dropspool(queue, it); + return (it); + + default: + /* + * Parent: + * + * fork next child + */ + break; + } + } + + syslog(LOG_CRIT, "reached dead code"); + exit(EX_SOFTWARE); +} + +static void +deliver(struct qitem *it) +{ + int error; + unsigned int backoff = MIN_RETRY, slept; + struct timeval now; + struct stat st; + + snprintf(errmsg, sizeof(errmsg), "unknown bounce reason"); + +retry: + syslog(LOG_INFO, "<%s> trying delivery", it->addr); + + if (it->remote) + error = deliver_remote(it); + else + error = deliver_local(it); + + switch (error) { + case 0: + delqueue(it); + syslog(LOG_INFO, "<%s> delivery successful", it->addr); + exit(EX_OK); + + case 1: + if (stat(it->queuefn, &st) != 0) { + syslog(LOG_ERR, "lost queue file `%s'", it->queuefn); + exit(EX_SOFTWARE); + } + if (gettimeofday(&now, NULL) == 0 && + (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) { + snprintf(errmsg, sizeof(errmsg), + "Could not deliver for the last %d seconds. Giving up.", + MAX_TIMEOUT); + goto bounce; + } + for (slept = 0; slept < backoff;) { + slept += SLEEP_TIMEOUT - sleep(SLEEP_TIMEOUT); + if (flushqueue_since(slept)) { + backoff = MIN_RETRY; + goto retry; + } + } + if (slept >= backoff) { + /* pick the next backoff between [1.5, 2.5) times backoff */ + backoff = backoff + backoff / 2 + random() % backoff; + if (backoff > MAX_RETRY) + backoff = MAX_RETRY; + } + goto retry; + + case -1: + default: + break; + } + +bounce: + bounce(it, errmsg); + /* NOTREACHED */ +} + +void +run_queue(struct queue *queue) +{ + struct qitem *it; + + if (LIST_EMPTY(&queue->queue)) + return; + + it = go_background(queue); + deliver(it); + /* NOTREACHED */ +} + +static void +show_queue(struct queue *queue) +{ + struct qitem *it; + int locked = 0; /* XXX */ + + if (LIST_EMPTY(&queue->queue)) { + printf("Mail queue is empty\n"); + return; + } + + LIST_FOREACH(it, &queue->queue, next) { + printf("ID\t: %s%s\n" + "From\t: %s\n" + "To\t: %s\n", + it->queueid, + locked ? "*" : "", + it->sender, it->addr); + + if (LIST_NEXT(it, next) != NULL) + printf("--\n"); + } +} + +/* + * TODO: + * + * - alias processing + * - use group permissions + * - proper sysexit codes + */ + +int +main(int argc, char **argv) +{ + struct sigaction act; + char *sender = NULL; + struct queue queue; + int i, ch; + int nodot = 0, showq = 0, queue_only = 0; + int recp_from_header = 0; + + set_username(); + + /* + * We never run as root. If called by root, drop permissions + * to the mail user. + */ + if (geteuid() == 0 || getuid() == 0) { + struct passwd *pw; + + errno = 0; + pw = getpwnam(DMA_ROOT_USER); + if (pw == NULL) { + if (errno == 0) + errx(EX_CONFIG, "user '%s' not found", DMA_ROOT_USER); + else + err(EX_OSERR, "cannot drop root privileges"); + } + + if (setuid(pw->pw_uid) != 0) + err(EX_OSERR, "cannot drop root privileges"); + + if (geteuid() == 0 || getuid() == 0) + errx(EX_OSERR, "cannot drop root privileges"); + } + + atexit(deltmp); + init_random(); + + bzero(&queue, sizeof(queue)); + LIST_INIT(&queue.queue); + + if (strcmp(basename(argv[0]), "mailq") == 0) { + argv++; argc--; + showq = 1; + if (argc != 0) + errx(EX_USAGE, "invalid arguments"); + goto skipopts; + } else if (strcmp(argv[0], "newaliases") == 0) { + logident_base = "dma"; + setlogident(NULL); + + if (read_aliases() != 0) + errx(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); + exit(EX_OK); + } + + opterr = 0; + while ((ch = getopt(argc, argv, ":A:b:B:C:d:Df:F:h:iL:N:no:O:q:r:R:tUV:vX:")) != -1) { + switch (ch) { + case 'A': + /* -AX is being ignored, except for -A{c,m} */ + if (optarg[0] == 'c' || optarg[0] == 'm') { + break; + } + /* else FALLTRHOUGH */ + case 'b': + /* -bX is being ignored, except for -bp */ + if (optarg[0] == 'p') { + showq = 1; + break; + } else if (optarg[0] == 'q') { + queue_only = 1; + break; + } + /* else FALLTRHOUGH */ + case 'D': + daemonize = 0; + break; + case 'L': + logident_base = optarg; + break; + case 'f': + case 'r': + sender = optarg; + break; + + case 't': + recp_from_header = 1; + break; + + case 'o': + /* -oX is being ignored, except for -oi */ + if (optarg[0] != 'i') + break; + /* else FALLTRHOUGH */ + case 'O': + break; + case 'i': + nodot = 1; + break; + + case 'q': + /* Don't let getopt slup up other arguments */ + if (optarg && *optarg == '-') + optind--; + doqueue = 1; + break; + + /* Ignored options */ + case 'B': + case 'C': + case 'd': + case 'F': + case 'h': + case 'N': + case 'n': + case 'R': + case 'U': + case 'V': + case 'v': + case 'X': + break; + + case ':': + if (optopt == 'q') { + doqueue = 1; + break; + } + /* FALLTHROUGH */ + + default: + fprintf(stderr, "invalid argument: `-%c'\n", optopt); + exit(EX_USAGE); + } + } + argc -= optind; + argv += optind; + opterr = 1; + + if (argc != 0 && (showq || doqueue)) + errx(EX_USAGE, "sending mail and queue operations are mutually exclusive"); + + if (showq + doqueue > 1) + errx(EX_USAGE, "conflicting queue operations"); + +skipopts: + if (logident_base == NULL) + logident_base = "dma"; + setlogident(NULL); + + act.sa_handler = sighup_handler; + act.sa_flags = 0; + sigemptyset(&act.sa_mask); + if (sigaction(SIGHUP, &act, NULL) != 0) + syslog(LOG_WARNING, "can not set signal handler: %m"); + + parse_conf(CONF_PATH "/dma.conf"); + + if (config.authpath != NULL) + parse_authfile(config.authpath); + + if (showq) { + if (load_queue(&queue) < 0) + errlog(EX_NOINPUT, "can not load queue"); + show_queue(&queue); + return (0); + } + + if (doqueue) { + flushqueue_signal(); + if (load_queue(&queue) < 0) + errlog(EX_NOINPUT, "can not load queue"); + run_queue(&queue); + return (0); + } + + if (read_aliases() != 0) + errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases); + + if ((sender = set_from(&queue, sender)) == NULL) + errlog(EX_SOFTWARE, NULL); + + if (newspoolf(&queue) != 0) + errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir); + + setlogident("%s", queue.id); + + for (i = 0; i < argc; i++) { + if (add_recp(&queue, argv[i], EXPAND_WILDCARD) != 0) + errlogx(EX_DATAERR, "invalid recipient `%s'", argv[i]); + } + + if (LIST_EMPTY(&queue.queue) && !recp_from_header) + errlogx(EX_NOINPUT, "no recipients"); + + if (readmail(&queue, nodot, recp_from_header) != 0) + errlog(EX_NOINPUT, "can not read mail"); + + if (LIST_EMPTY(&queue.queue)) + errlogx(EX_NOINPUT, "no recipients"); + + if (linkspool(&queue) != 0) + errlog(EX_CANTCREAT, "can not create spools"); + + /* From here on the mail is safe. */ + + if (config.features & DEFER || queue_only) + return (0); + + run_queue(&queue); + + /* NOTREACHED */ + return (0); +} From owner-svn-src-vendor@freebsd.org Thu Mar 2 21:02:20 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFE3CF6AF5; Thu, 2 Mar 2017 21:02:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6847FC8; Thu, 2 Mar 2017 21:02:19 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v22L2JN3086217; Thu, 2 Mar 2017 21:02:19 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v22L2H4M086204; Thu, 2 Mar 2017 21:02:17 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703022102.v22L2H4M086204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Mar 2017 21:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314565 - in vendor/libarchive/dist: . build build/cmake cat/test cpio/test libarchive libarchive/test tar tar/test test_utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 21:02:20 -0000 Author: mm Date: Thu Mar 2 21:02:17 2017 New Revision: 314565 URL: https://svnweb.freebsd.org/changeset/base/314565 Log: Update vendor/libarchive to git d6b1bb9f7ea7bc153b7356e8e345c9e48005821a Release 3.3.1 Notable vendor changes: PR #501: improvements in ACL path handling PR #724: fix hang when reading malformed cpio files PR #864: fix out of bounds read with malformed GNU tar archives Test suite improvements New options to bsdtar that enable or disable reading and/or writing of: Access Control Lists (--acls, --no-acls) Extended file flags (--fflags, --no-fflags) Extended attributes (--xattrs, --no-xattrs) Added: vendor/libarchive/dist/test_utils/test_common.h (contents, props changed) vendor/libarchive/dist/test_utils/test_main.c - copied, changed from r314564, vendor/libarchive/dist/libarchive/test/main.c Deleted: vendor/libarchive/dist/cat/test/main.c vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/tar/test/main.c Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/build/autogen.sh vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/version vendor/libarchive/dist/cat/test/CMakeLists.txt vendor/libarchive/dist/cat/test/test.h vendor/libarchive/dist/cat/test/test_version.c vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/cpio/test/test.h vendor/libarchive/dist/cpio/test/test_option_version.c vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_digest_private.h vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_hmac.c vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/dist/libarchive/archive_read_disk_windows.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/dist/libarchive/test/test_acl_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_pax.c vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c vendor/libarchive/dist/libarchive/test/test_acl_posix1e.c vendor/libarchive/dist/libarchive/test/test_acl_text.c vendor/libarchive/dist/libarchive/test/test_archive_api_feature.c vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c vendor/libarchive/dist/libarchive/test/test_compat_star_acl.c vendor/libarchive/dist/libarchive/test/test_fuzz.c vendor/libarchive/dist/libarchive/test/test_read_disk.c vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/dist/tar/cmdline.c vendor/libarchive/dist/tar/read.c vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/test.h vendor/libarchive/dist/tar/test/test_version.c vendor/libarchive/dist/tar/util.c vendor/libarchive/dist/tar/write.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/CMakeLists.txt Thu Mar 2 21:02:17 2017 (r314565) @@ -15,7 +15,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". @@ -44,13 +44,13 @@ SET(CMAKE_MACOSX_RPATH ON) # FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version) STRING(REGEX REPLACE - "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]?$" "\\1" _major ${_version}) + "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]*$" "\\1" _major ${_version}) STRING(REGEX REPLACE - "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]?$" "\\1" _minor ${_version}) + "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]*$" "\\1" _minor ${_version}) STRING(REGEX REPLACE - "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]?$" "\\1" _revision ${_version}) + "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]*$" "\\1" _revision ${_version}) STRING(REGEX REPLACE - "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]?)$" "\\1" _quality ${_version}) + "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]*)$" "\\1" _quality ${_version}) SET(_version_number ${_major}${_minor}${_revision}) STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_minor ${_minor}) STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_revision ${_revision}) @@ -462,6 +462,8 @@ ENDIF() IF(LIBLZMA_FOUND) SET(HAVE_LIBLZMA 1) SET(HAVE_LZMA_H 1) + SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) # Test if a macro is needed for the library. @@ -570,6 +572,11 @@ LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LI LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H) LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H) LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H) + +CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return FS_IOC_GETFLAGS; }" HAVE_WORKING_FS_IOC_GETFLAGS) + LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H) LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H) LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/Makefile.am Thu Mar 2 21:02:17 2017 (r314565) @@ -23,7 +23,7 @@ TESTS_ENVIRONMENT= $(libarchive_TESTS_EN DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio # The next line is commented out by default in shipping libarchive releases. # It is uncommented by default in trunk. -DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g +# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g AM_CFLAGS=$(DEV_CFLAGS) PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS) @@ -310,7 +310,9 @@ pkgconfig_DATA = build/pkgconfig/libarch # Sources needed by all test programs test_utils_SOURCES= \ test_utils/test_utils.c \ - test_utils/test_utils.h + test_utils/test_utils.h \ + test_utils/test_main.c \ + test_utils/test_common.h # # @@ -320,7 +322,6 @@ test_utils_SOURCES= \ libarchive_test_SOURCES= \ $(libarchive_la_SOURCES) \ $(test_utils_SOURCES) \ - libarchive/test/main.c \ libarchive/test/read_open_memory.c \ libarchive/test/test.h \ libarchive/test/test_acl_nfs4.c \ @@ -586,7 +587,13 @@ libarchive_test_SOURCES= \ libarchive/test/test_write_read_format_zip.c \ libarchive/test/test_zip_filename_encoding.c -libarchive_test_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/test_utils -I$(top_builddir)/libarchive/test -DLIBARCHIVE_STATIC $(PLATFORMCPPFLAGS) +libarchive_test_CPPFLAGS= \ + -I$(top_srcdir)/libarchive \ + -I$(top_srcdir)/libarchive/test \ + -I$(top_srcdir)/test_utils \ + -I$(top_builddir)/libarchive/test \ + -DLIBARCHIVE_STATIC $(PLATFORMCPPFLAGS) + libarchive_test_LDADD= $(LTLIBICONV) # The "list.h" file just lists all of the tests defined in all of the sources. @@ -918,7 +925,6 @@ endif bsdtar_test_SOURCES= \ $(test_utils_SOURCES) \ - tar/test/main.c \ tar/test/test.h \ tar/test/test_0.c \ tar/test/test_basic.c \ @@ -981,7 +987,8 @@ bsdtar_test_SOURCES= \ bsdtar_test_CPPFLAGS=\ -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ -I$(top_srcdir)/test_utils \ - -I$(top_srcdir)/tar -I$(top_builddir)/tar/test \ + -I$(top_srcdir)/tar -I$(top_srcdir)/tar/test \ + -I$(top_builddir)/tar/test \ $(PLATFORMCPPFLAGS) tar/test/list.h: Makefile @@ -1076,7 +1083,6 @@ endif bsdcpio_test_SOURCES= \ $(test_utils_SOURCES) \ cpio/cmdline.c \ - cpio/test/main.c \ cpio/test/test.h \ cpio/test/test_0.c \ cpio/test/test_basic.c \ @@ -1128,7 +1134,8 @@ bsdcpio_test_SOURCES= \ bsdcpio_test_CPPFLAGS= \ -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ -I$(top_srcdir)/test_utils \ - -I$(top_srcdir)/cpio -I$(top_builddir)/cpio/test \ + -I$(top_srcdir)/cpio -I$(top_srcdir)/cpio/test \ + -I$(top_builddir)/cpio/test \ $(PLATFORMCPPFLAGS) bsdcpio_test_LDADD=libarchive_fe.la @@ -1223,7 +1230,6 @@ endif bsdcat_test_SOURCES= \ $(test_utils_SOURCES) \ - cat/test/main.c \ cat/test/test.h \ cat/test/test_0.c \ cat/test/test_empty_gz.c \ @@ -1244,7 +1250,8 @@ bsdcat_test_SOURCES= \ bsdcat_test_CPPFLAGS= \ -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \ -I$(top_srcdir)/test_utils \ - -I$(top_srcdir)/cat -I$(top_builddir)/cat/test \ + -I$(top_srcdir)/cat -I$(top_srcdir)/cat/test \ + -I$(top_builddir)/cat/test \ $(PLATFORMCPPFLAGS) bsdcat_test_LDADD=libarchive_fe.la Modified: vendor/libarchive/dist/NEWS ============================================================================== --- vendor/libarchive/dist/NEWS Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/NEWS Thu Mar 2 21:02:17 2017 (r314565) @@ -1,3 +1,9 @@ +Feb 26, 2017: libarchive 3.3.1 released + Security & Feature release + +Feb 19, 2017: libarchive 3.3.0 released + Security & Feature release + Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin) Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates @@ -5,6 +11,8 @@ Jan 10, 2017: POSIX.1e and NFSv4 ACL sup Dec 27, 2016: NFSv4 ACL read and write support for pax Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() +Nov, 2016: libarchive is now being tested by the OSS-Fuzz project + Oct 26, 2016: Remove liblzmadec support Oct 23, 2016: libarchive 3.2.2 released Modified: vendor/libarchive/dist/build/autogen.sh ============================================================================== --- vendor/libarchive/dist/build/autogen.sh Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/build/autogen.sh Thu Mar 2 21:02:17 2017 (r314565) @@ -51,6 +51,7 @@ perl -p -i -e 's/(m4_define\(\[LIBARCHIV # Remove developer CFLAGS if a release build is being made if [ -n "${MAKE_LIBARCHIVE_RELEASE}" ]; then perl -p -i -e "s/^(DEV_CFLAGS.*)/# \$1/" Makefile.am + perl -p -i -e 's/CMAKE_BUILD_TYPE "[A-Za-z]*"/CMAKE_BUILD_TYPE "Release"/' CMakeLists.txt fi set -xe Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/build/cmake/config.h.in Thu Mar 2 21:02:17 2017 (r314565) @@ -1099,6 +1099,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have a working EXT2_IOC_GETFLAGS */ #cmakedefine HAVE_WORKING_EXT2_IOC_GETFLAGS 1 +/* Define to 1 if you have a working FS_IOC_GETFLAGS */ +#cmakedefine HAVE_WORKING_FS_IOC_GETFLAGS 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ZLIB_H 1 Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/build/version Thu Mar 2 21:02:17 2017 (r314565) @@ -1 +1 @@ -3002002 +3003001 Modified: vendor/libarchive/dist/cat/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cat/test/CMakeLists.txt Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/cat/test/CMakeLists.txt Thu Mar 2 21:02:17 2017 (r314565) @@ -6,7 +6,7 @@ IF(ENABLE_CAT AND ENABLE_TEST) SET(bsdcat_test_SOURCES ../../test_utils/test_utils.c - main.c + ../../test_utils/test_main.c test.h test_0.c test_empty_gz.c @@ -54,6 +54,7 @@ IF(ENABLE_CAT AND ENABLE_TEST) INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/test_utils) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cat/test) # Experimental new test handling ADD_CUSTOM_TARGET(run_bsdcat_test Modified: vendor/libarchive/dist/cat/test/test.h ============================================================================== --- vendor/libarchive/dist/cat/test/test.h Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/cat/test/test.h Thu Mar 2 21:02:17 2017 (r314565) @@ -27,328 +27,14 @@ /* Every test program should #include "test.h" as the first thing. */ -/* - * The goal of this file (and the matching test.c) is to - * simplify the very repetitive test-*.c test programs. - */ -#if defined(HAVE_CONFIG_H) -/* Most POSIX platforms use the 'configure' script to build config.h */ -#include "config.h" -#elif defined(__FreeBSD__) -/* Building as part of FreeBSD system requires a pre-built config.h. */ -#include "config_freebsd.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) -/* Win32 can't run the 'configure' script. */ -#include "config_windows.h" -#else -/* Warn if the library hasn't been (automatically or manually) configured. */ -#error Oops: No config.h and no pre-built configuration in test.h. -#endif +#define KNOWNREF "test_expand.Z.uu" +#define ENVBASE "BSDCAT" /* Prefix for environment variables. */ +#define PROGRAM "bsdcat" /* Name of program being tested. */ +#define PROGRAM_ALIAS "cat" /* Generic alias for program */ +#undef LIBRARY /* Not testing a library. */ +#undef EXTRA_DUMP /* How to dump extra data */ +#undef EXTRA_ERRNO /* How to dump errno */ +/* How to generate extra version info. */ +#define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "") -#include /* Windows requires this before sys/stat.h */ -#include - -#if HAVE_DIRENT_H -#include -#endif -#ifdef HAVE_DIRECT_H -#include -#define dirent direct -#endif -#include -#include -#ifdef HAVE_IO_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_WINDOWS_H -#include -#endif - -/* - * System-specific tweaks. We really want to minimize these - * as much as possible, since they make it harder to understand - * the mainline code. - */ - -/* Windows (including Visual Studio and MinGW but not Cygwin) */ -#if defined(_WIN32) && !defined(__CYGWIN__) -#if !defined(__BORLANDC__) -#undef chdir -#define chdir _chdir -#define strdup _strdup -#endif -#endif - -/* Visual Studio */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf sprintf_s -#endif - -#if defined(__BORLANDC__) -#pragma warn -8068 /* Constant out of range in comparison. */ -#endif - -/* Haiku OS and QNX */ -#if defined(__HAIKU__) || defined(__QNXNTO__) -/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ -#include -#endif - -/* Get a real definition for __FBSDID if we can */ -#if HAVE_SYS_CDEFS_H -#include -#endif - -/* If not, define it so as to avoid dangling semicolons. */ -#ifndef __FBSDID -#define __FBSDID(a) struct _undefined_hack -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* - * Redefine DEFINE_TEST for use in defining the test functions. - */ -#undef DEFINE_TEST -#define DEFINE_TEST(name) void name(void); void name(void) - -/* An implementation of the standard assert() macro */ -#define assert(e) assertion_assert(__FILE__, __LINE__, (e), #e, NULL) -/* chdir() and error if it fails */ -#define assertChdir(path) \ - assertion_chdir(__FILE__, __LINE__, path) -/* Assert two integers are the same. Reports value of each one if not. */ -#define assertEqualInt(v1,v2) \ - assertion_equal_int(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* Assert two strings are the same. Reports value of each one if not. */ -#define assertEqualString(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 0) -#define assertEqualUTF8String(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 1) -/* As above, but v1 and v2 are wchar_t * */ -#define assertEqualWString(v1,v2) \ - assertion_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* As above, but raw blocks of bytes. */ -#define assertEqualMem(v1, v2, l) \ - assertion_equal_mem(__FILE__, __LINE__, (v1), #v1, (v2), #v2, (l), #l, NULL) -/* Assert that memory is full of a specified byte */ -#define assertMemoryFilledWith(v1, l, b) \ - assertion_memory_filled_with(__FILE__, __LINE__, (v1), #v1, (l), #l, (b), #b, NULL) -/* Assert two files are the same. */ -#define assertEqualFile(f1, f2) \ - assertion_equal_file(__FILE__, __LINE__, (f1), (f2)) -/* Assert that a file is empty. */ -#define assertEmptyFile(pathname) \ - assertion_empty_file(__FILE__, __LINE__, (pathname)) -/* Assert that a file is not empty. */ -#define assertNonEmptyFile(pathname) \ - assertion_non_empty_file(__FILE__, __LINE__, (pathname)) -#define assertFileAtime(pathname, sec, nsec) \ - assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileAtimeRecent(pathname) \ - assertion_file_atime_recent(__FILE__, __LINE__, pathname) -#define assertFileBirthtime(pathname, sec, nsec) \ - assertion_file_birthtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileBirthtimeRecent(pathname) \ - assertion_file_birthtime_recent(__FILE__, __LINE__, pathname) -/* Assert that a file exists; supports printf-style arguments. */ -#define assertFileExists(pathname) \ - assertion_file_exists(__FILE__, __LINE__, pathname) -/* Assert that a file exists. */ -#define assertFileNotExists(pathname) \ - assertion_file_not_exists(__FILE__, __LINE__, pathname) -/* Assert that file contents match a string. */ -#define assertFileContents(data, data_size, pathname) \ - assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) -/* Verify that a file does not contain invalid strings */ -#define assertFileContainsNoInvalidStrings(pathname, strings) \ - assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) -#define assertFileMtime(pathname, sec, nsec) \ - assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileMtimeRecent(pathname) \ - assertion_file_mtime_recent(__FILE__, __LINE__, pathname) -#define assertFileNLinks(pathname, nlinks) \ - assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks) -#define assertFileSize(pathname, size) \ - assertion_file_size(__FILE__, __LINE__, pathname, size) -#define assertFileMode(pathname, mode) \ - assertion_file_mode(__FILE__, __LINE__, pathname, mode) -#define assertTextFileContents(text, pathname) \ - assertion_text_file_contents(__FILE__, __LINE__, text, pathname) -#define assertFileContainsLinesAnyOrder(pathname, lines) \ - assertion_file_contains_lines_any_order(__FILE__, __LINE__, pathname, lines) -#define assertIsDir(pathname, mode) \ - assertion_is_dir(__FILE__, __LINE__, pathname, mode) -#define assertIsHardlink(path1, path2) \ - assertion_is_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsNotHardlink(path1, path2) \ - assertion_is_not_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsReg(pathname, mode) \ - assertion_is_reg(__FILE__, __LINE__, pathname, mode) -#define assertIsSymlink(pathname, contents) \ - assertion_is_symlink(__FILE__, __LINE__, pathname, contents) -/* Create a directory, report error if it fails. */ -#define assertMakeDir(dirname, mode) \ - assertion_make_dir(__FILE__, __LINE__, dirname, mode) -#define assertMakeFile(path, mode, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, -1, contents) -#define assertMakeBinFile(path, mode, csize, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, csize, contents) -#define assertMakeHardlink(newfile, oldfile) \ - assertion_make_hardlink(__FILE__, __LINE__, newfile, oldfile) -#define assertMakeSymlink(newfile, linkto) \ - assertion_make_symlink(__FILE__, __LINE__, newfile, linkto) -#define assertNodump(path) \ - assertion_nodump(__FILE__, __LINE__, path) -#define assertUmask(mask) \ - assertion_umask(__FILE__, __LINE__, mask) -#define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \ - assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec) - -/* - * This would be simple with C99 variadic macros, but I don't want to - * require that. Instead, I insert a function call before each - * skipping() call to pass the file and line information down. Crude, - * but effective. - */ -#define skipping \ - skipping_setup(__FILE__, __LINE__);test_skipping - -/* Function declarations. These are defined in test_utility.c. */ -void failure(const char *fmt, ...); -int assertion_assert(const char *, int, int, const char *, void *); -int assertion_chdir(const char *, int, const char *); -int assertion_empty_file(const char *, int, const char *); -int assertion_equal_file(const char *, int, const char *, const char *); -int assertion_equal_int(const char *, int, long long, const char *, long long, const char *, void *); -int assertion_equal_mem(const char *, int, const void *, const char *, const void *, const char *, size_t, const char *, void *); -int assertion_memory_filled_with(const char *, int, const void *, const char *, size_t, const char *, char, const char *, void *); -int assertion_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, void *, int); -int assertion_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *); -int assertion_file_atime(const char *, int, const char *, long, long); -int assertion_file_atime_recent(const char *, int, const char *); -int assertion_file_birthtime(const char *, int, const char *, long, long); -int assertion_file_birthtime_recent(const char *, int, const char *); -int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); -int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); -int assertion_file_contents(const char *, int, const void *, int, const char *); -int assertion_file_exists(const char *, int, const char *); -int assertion_file_mode(const char *, int, const char *, int); -int assertion_file_mtime(const char *, int, const char *, long, long); -int assertion_file_mtime_recent(const char *, int, const char *); -int assertion_file_nlinks(const char *, int, const char *, int); -int assertion_file_not_exists(const char *, int, const char *); -int assertion_file_size(const char *, int, const char *, long); -int assertion_is_dir(const char *, int, const char *, int); -int assertion_is_hardlink(const char *, int, const char *, const char *); -int assertion_is_not_hardlink(const char *, int, const char *, const char *); -int assertion_is_reg(const char *, int, const char *, int); -int assertion_is_symlink(const char *, int, const char *, const char *); -int assertion_make_dir(const char *, int, const char *, int); -int assertion_make_file(const char *, int, const char *, int, int, const void *); -int assertion_make_hardlink(const char *, int, const char *newpath, const char *); -int assertion_make_symlink(const char *, int, const char *newpath, const char *); -int assertion_nodump(const char *, int, const char *); -int assertion_non_empty_file(const char *, int, const char *); -int assertion_text_file_contents(const char *, int, const char *buff, const char *f); -int assertion_umask(const char *, int, int); -int assertion_utimes(const char *, int, const char *, long, long, long, long ); - -void skipping_setup(const char *, int); -void test_skipping(const char *fmt, ...); - -/* Like sprintf, then system() */ -int systemf(const char * fmt, ...); - -/* Delay until time() returns a value after this. */ -void sleepUntilAfter(time_t); - -/* Return true if this platform can create symlinks. */ -int canSymlink(void); - -/* Return true if this platform can run the "bzip2" program. */ -int canBzip2(void); - -/* Return true if this platform can run the "grzip" program. */ -int canGrzip(void); - -/* Return true if this platform can run the "gzip" program. */ -int canGzip(void); - -/* Return true if this platform can run the specified command. */ -int canRunCommand(const char *); - -/* Return true if this platform can run the "lrzip" program. */ -int canLrzip(void); - -/* Return true if this platform can run the "lz4" program. */ -int canLz4(void); - -/* Return true if this platform can run the "lzip" program. */ -int canLzip(void); - -/* Return true if this platform can run the "lzma" program. */ -int canLzma(void); - -/* Return true if this platform can run the "lzop" program. */ -int canLzop(void); - -/* Return true if this platform can run the "xz" program. */ -int canXz(void); - -/* Return true if this filesystem can handle nodump flags. */ -int canNodump(void); - -/* Return true if the file has large i-node number(>0xffffffff). */ -int is_LargeInode(const char *); - -/* Suck file into string allocated via malloc(). Call free() when done. */ -/* Supports printf-style args: slurpfile(NULL, "%s/myfile", refdir); */ -char *slurpfile(size_t *, const char *fmt, ...); - -/* Dump block of bytes to a file. */ -void dumpfile(const char *filename, void *, size_t); - -/* Extracts named reference file to the current directory. */ -void extract_reference_file(const char *); -/* Copies named reference file to the current directory. */ -void copy_reference_file(const char *); - -/* Extracts a list of files to the current directory. - * List must be NULL terminated. - */ -void extract_reference_files(const char **); - -/* Subtract umask from mode */ -mode_t umasked(mode_t expected_mode); - -/* Path to working directory for current test */ -extern const char *testworkdir; - -/* - * Special interfaces for program test harness. - */ - -/* Pathname of exe to be tested. */ -extern const char *testprogfile; -/* Name of exe to use in printf-formatted command strings. */ -/* On Windows, this includes leading/trailing quotes. */ -extern const char *testprog; - -#ifdef USE_DMALLOC -#include -#endif +#include "test_common.h" Modified: vendor/libarchive/dist/cat/test/test_version.c ============================================================================== --- vendor/libarchive/dist/cat/test/test_version.c Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/cat/test/test_version.c Thu Mar 2 21:02:17 2017 (r314565) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2003-2017 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,68 +30,5 @@ DEFINE_TEST(test_version) { - int r; - char *p, *q; - size_t s; - - - r = systemf("%s --version >version.stdout 2>version.stderr", testprog); - failure("Unable to run %s --version", testprog); - if (!assert(r == 0)) - return; - - /* --version should generate nothing to stdout. */ - assertEmptyFile("version.stderr"); - /* Verify format of version message. */ - q = p = slurpfile(&s, "version.stdout"); - /* Version message should start with name of program, then space. */ - assert(s > 6); - failure("Version must start with 'bsdcat': ``%s''", p); - if (!assertEqualMem(q, "bsdcat ", 7)) - return; - q += 7; s -= 7; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Version number terminated by space. */ - failure("No space after bsdcat version: ``%s''", p); - assert(s > 1); - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - failure("No space after bsdcat version: ``%s''", p); - assert(*q == ' '); - ++q; --s; - /* Separator. */ - failure("No `-' between bsdcat and libarchive versions: ``%s''", p); - assertEqualMem(q, "- ", 2); - q += 2; s -= 2; - /* libarchive name and version number */ - failure("Not long enough for libarchive version: ``%s''", p); - assert(s > 11); - failure("Libarchive version must start with `libarchive': ``%s''", p); - assertEqualMem(q, "libarchive ", 11); - q += 11; s -= 11; - /* Version number is a series of digits and periods. */ - while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) { - ++q; - --s; - } - /* Skip a single trailing a,b,c, or d. */ - if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd') - ++q; - /* Skip arbitrary third-party version numbers. */ - while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || isalnum(*q))) { - ++q; - --s; - } - /* All terminated by end-of-line. */ - assert(s >= 1); - /* Skip an optional CR character (e.g., Windows) */ - failure("Version output must end with \\n or \\r\\n"); - if (*q == '\r') { ++q; --s; } - assertEqualMem(q, "\n", 1); - free(p); + assertVersion(testprog, "bsdcat"); } Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/configure.ac Thu Mar 2 21:02:17 2017 (r314565) @@ -4,8 +4,8 @@ dnl First, define all of the version num dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.2.2]) -m4_define([LIBARCHIVE_VERSION_N],[3002002]) +m4_define([LIBARCHIVE_VERSION_S],[3.3.1]) +m4_define([LIBARCHIVE_VERSION_N],[3003001]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -270,6 +270,19 @@ AS_VAR_IF([ac_cv_have_decl_EXT2_IOC_GETF AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h]) AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h]) + +AC_CACHE_CHECK([whether FS_IOC_GETFLAGS is usable], + [ac_cv_have_decl_FS_IOC_GETFLAGS], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include +@%:@include ], + [int x = FS_IOC_GETFLAGS])], + [AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes])], + [AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [no])])]) + +AS_VAR_IF([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes], + [AC_DEFINE_UNQUOTED([HAVE_WORKING_FS_IOC_GETFLAGS], [1], + [Define to 1 if you have a working FS_IOC_GETFLAGS])]) + AC_CHECK_HEADERS([locale.h paths.h poll.h pthread.h pwd.h]) AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h]) @@ -381,7 +394,7 @@ fi AC_ARG_WITH([lzo2], AS_HELP_STRING([--with-lzo2], [Build with LZO support from liblzo2])) -if test "x$with_lzo2" == "xyes"; then +if test "x$with_lzo2" = "xyes"; then AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h]) AC_CHECK_LIB(lzo2,lzo1x_decompress_safe) fi Modified: vendor/libarchive/dist/cpio/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cpio/test/CMakeLists.txt Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/cpio/test/CMakeLists.txt Thu Mar 2 21:02:17 2017 (r314565) @@ -8,7 +8,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST) ../cmdline.c ../../libarchive_fe/err.c ../../test_utils/test_utils.c - main.c + ../../test_utils/test_main.c test.h test_0.c test_basic.c @@ -87,6 +87,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST) INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/test_utils) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cpio/test) # Experimental new test handling ADD_CUSTOM_TARGET(run_bsdcpio_test Modified: vendor/libarchive/dist/cpio/test/test.h ============================================================================== --- vendor/libarchive/dist/cpio/test/test.h Thu Mar 2 20:49:40 2017 (r314564) +++ vendor/libarchive/dist/cpio/test/test.h Thu Mar 2 21:02:17 2017 (r314565) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2006 Tim Kientzle + * Copyright (c) 2003-2017 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,333 +22,19 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/cpio/test/test.h,v 1.2 2008/06/21 02:17:18 kientzle Exp $ + * $FreeBSD$ */ /* Every test program should #include "test.h" as the first thing. */ -/* - * The goal of this file (and the matching test.c) is to - * simplify the very repetitive test-*.c test programs. - */ -#if defined(HAVE_CONFIG_H) -/* Most POSIX platforms use the 'configure' script to build config.h */ -#include "config.h" -#elif defined(__FreeBSD__) -/* Building as part of FreeBSD system requires a pre-built config.h. */ -#include "config_freebsd.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) -/* Win32 can't run the 'configure' script. */ -#include "config_windows.h" -#else -/* Warn if the library hasn't been (automatically or manually) configured. */ -#error Oops: No config.h and no pre-built configuration in test.h. -#endif - -#include /* Windows requires this before sys/stat.h */ -#include - -#if HAVE_DIRENT_H -#include -#endif -#ifdef HAVE_DIRECT_H -#include -#define dirent direct -#endif -#include -#include -#ifdef HAVE_IO_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_WINDOWS_H -#include -#endif - -/* - * System-specific tweaks. We really want to minimize these - * as much as possible, since they make it harder to understand - * the mainline code. - */ - -/* Windows (including Visual Studio and MinGW but not Cygwin) */ -#if defined(_WIN32) && !defined(__CYGWIN__) -#if !defined(__BORLANDC__) -#undef chdir -#define chdir _chdir -#define strdup _strdup -#endif -#endif - -/* Visual Studio */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf sprintf_s -#endif - -#if defined(__BORLANDC__) -#pragma warn -8068 /* Constant out of range in comparison. */ -#endif - -/* Haiku OS and QNX */ -#if defined(__HAIKU__) || defined(__QNXNTO__) -/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ -#include -#endif - -/* Get a real definition for __FBSDID if we can */ -#if HAVE_SYS_CDEFS_H -#include -#endif - -/* If not, define it so as to avoid dangling semicolons. */ -#ifndef __FBSDID -#define __FBSDID(a) struct _undefined_hack -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* - * Redefine DEFINE_TEST for use in defining the test functions. - */ -#undef DEFINE_TEST -#define DEFINE_TEST(name) void name(void); void name(void) - -/* An implementation of the standard assert() macro */ -#define assert(e) assertion_assert(__FILE__, __LINE__, (e), #e, NULL) -/* chdir() and error if it fails */ -#define assertChdir(path) \ - assertion_chdir(__FILE__, __LINE__, path) -/* Assert two integers are the same. Reports value of each one if not. */ -#define assertEqualInt(v1,v2) \ - assertion_equal_int(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* Assert two strings are the same. Reports value of each one if not. */ -#define assertEqualString(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 0) -#define assertEqualUTF8String(v1,v2) \ - assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 1) -/* As above, but v1 and v2 are wchar_t * */ -#define assertEqualWString(v1,v2) \ - assertion_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL) -/* As above, but raw blocks of bytes. */ -#define assertEqualMem(v1, v2, l) \ - assertion_equal_mem(__FILE__, __LINE__, (v1), #v1, (v2), #v2, (l), #l, NULL) -/* Assert that memory is full of a specified byte */ -#define assertMemoryFilledWith(v1, l, b) \ - assertion_memory_filled_with(__FILE__, __LINE__, (v1), #v1, (l), #l, (b), #b, NULL) -/* Assert two files are the same. */ -#define assertEqualFile(f1, f2) \ - assertion_equal_file(__FILE__, __LINE__, (f1), (f2)) -/* Assert that a file is empty. */ -#define assertEmptyFile(pathname) \ - assertion_empty_file(__FILE__, __LINE__, (pathname)) -/* Assert that a file is not empty. */ -#define assertNonEmptyFile(pathname) \ - assertion_non_empty_file(__FILE__, __LINE__, (pathname)) -#define assertFileAtime(pathname, sec, nsec) \ - assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileAtimeRecent(pathname) \ - assertion_file_atime_recent(__FILE__, __LINE__, pathname) -#define assertFileBirthtime(pathname, sec, nsec) \ - assertion_file_birthtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileBirthtimeRecent(pathname) \ - assertion_file_birthtime_recent(__FILE__, __LINE__, pathname) -/* Assert that a file exists; supports printf-style arguments. */ -#define assertFileExists(pathname) \ - assertion_file_exists(__FILE__, __LINE__, pathname) -/* Assert that a file exists. */ -#define assertFileNotExists(pathname) \ - assertion_file_not_exists(__FILE__, __LINE__, pathname) -/* Assert that file contents match a string. */ -#define assertFileContents(data, data_size, pathname) \ - assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) -/* Verify that a file does not contain invalid strings */ -#define assertFileContainsNoInvalidStrings(pathname, strings) \ - assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) -#define assertFileMtime(pathname, sec, nsec) \ - assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) -#define assertFileMtimeRecent(pathname) \ - assertion_file_mtime_recent(__FILE__, __LINE__, pathname) -#define assertFileNLinks(pathname, nlinks) \ - assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks) -#define assertFileSize(pathname, size) \ - assertion_file_size(__FILE__, __LINE__, pathname, size) -#define assertFileMode(pathname, mode) \ - assertion_file_mode(__FILE__, __LINE__, pathname, mode) -#define assertTextFileContents(text, pathname) \ - assertion_text_file_contents(__FILE__, __LINE__, text, pathname) -#define assertFileContainsLinesAnyOrder(pathname, lines) \ - assertion_file_contains_lines_any_order(__FILE__, __LINE__, pathname, lines) -#define assertIsDir(pathname, mode) \ - assertion_is_dir(__FILE__, __LINE__, pathname, mode) -#define assertIsHardlink(path1, path2) \ - assertion_is_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsNotHardlink(path1, path2) \ - assertion_is_not_hardlink(__FILE__, __LINE__, path1, path2) -#define assertIsReg(pathname, mode) \ - assertion_is_reg(__FILE__, __LINE__, pathname, mode) -#define assertIsSymlink(pathname, contents) \ - assertion_is_symlink(__FILE__, __LINE__, pathname, contents) -/* Create a directory, report error if it fails. */ -#define assertMakeDir(dirname, mode) \ - assertion_make_dir(__FILE__, __LINE__, dirname, mode) -#define assertMakeFile(path, mode, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, -1, contents) -#define assertMakeBinFile(path, mode, csize, contents) \ - assertion_make_file(__FILE__, __LINE__, path, mode, csize, contents) -#define assertMakeHardlink(newfile, oldfile) \ - assertion_make_hardlink(__FILE__, __LINE__, newfile, oldfile) -#define assertMakeSymlink(newfile, linkto) \ - assertion_make_symlink(__FILE__, __LINE__, newfile, linkto) -#define assertNodump(path) \ - assertion_nodump(__FILE__, __LINE__, path) -#define assertUmask(mask) \ - assertion_umask(__FILE__, __LINE__, mask) -#define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \ - assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec) - -/* - * This would be simple with C99 variadic macros, but I don't want to - * require that. Instead, I insert a function call before each - * skipping() call to pass the file and line information down. Crude, - * but effective. - */ -#define skipping \ - skipping_setup(__FILE__, __LINE__);test_skipping - -/* Function declarations. These are defined in test_utility.c. */ -void failure(const char *fmt, ...); -int assertion_assert(const char *, int, int, const char *, void *); -int assertion_chdir(const char *, int, const char *); -int assertion_empty_file(const char *, int, const char *); -int assertion_equal_file(const char *, int, const char *, const char *); -int assertion_equal_int(const char *, int, long long, const char *, long long, const char *, void *); -int assertion_equal_mem(const char *, int, const void *, const char *, const void *, const char *, size_t, const char *, void *); -int assertion_memory_filled_with(const char *, int, const void *, const char *, size_t, const char *, char, const char *, void *); -int assertion_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, void *, int); -int assertion_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *); -int assertion_file_atime(const char *, int, const char *, long, long); -int assertion_file_atime_recent(const char *, int, const char *); -int assertion_file_birthtime(const char *, int, const char *, long, long); -int assertion_file_birthtime_recent(const char *, int, const char *); -int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); -int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); -int assertion_file_contents(const char *, int, const void *, int, const char *); -int assertion_file_exists(const char *, int, const char *); -int assertion_file_mode(const char *, int, const char *, int); -int assertion_file_mtime(const char *, int, const char *, long, long); -int assertion_file_mtime_recent(const char *, int, const char *); -int assertion_file_nlinks(const char *, int, const char *, int); -int assertion_file_not_exists(const char *, int, const char *); -int assertion_file_size(const char *, int, const char *, long); -int assertion_is_dir(const char *, int, const char *, int); -int assertion_is_hardlink(const char *, int, const char *, const char *); -int assertion_is_not_hardlink(const char *, int, const char *, const char *); -int assertion_is_reg(const char *, int, const char *, int); -int assertion_is_symlink(const char *, int, const char *, const char *); -int assertion_make_dir(const char *, int, const char *, int); -int assertion_make_file(const char *, int, const char *, int, int, const void *); -int assertion_make_hardlink(const char *, int, const char *newpath, const char *); -int assertion_make_symlink(const char *, int, const char *newpath, const char *); -int assertion_nodump(const char *, int, const char *); -int assertion_non_empty_file(const char *, int, const char *); -int assertion_text_file_contents(const char *, int, const char *buff, const char *f); -int assertion_umask(const char *, int, int); -int assertion_utimes(const char *, int, const char *, long, long, long, long ); - -void skipping_setup(const char *, int); -void test_skipping(const char *fmt, ...); - -/* Like sprintf, then system() */ -int systemf(const char * fmt, ...); - -/* Delay until time() returns a value after this. */ -void sleepUntilAfter(time_t); - -/* Return true if this platform can create symlinks. */ -int canSymlink(void); - -/* Return true if this platform can run the "bzip2" program. */ -int canBzip2(void); - -/* Return true if this platform can run the "grzip" program. */ -int canGrzip(void); - -/* Return true if this platform can run the "gzip" program. */ -int canGzip(void); - -/* Return true if this platform can run the specified command. */ -int canRunCommand(const char *); - -/* Return true if this platform can run the "lrzip" program. */ -int canLrzip(void); - -/* Return true if this platform can run the "lz4" program. */ -int canLz4(void); - -/* Return true if this platform can run the "lzip" program. */ -int canLzip(void); - -/* Return true if this platform can run the "lzma" program. */ -int canLzma(void); - -/* Return true if this platform can run the "lzop" program. */ -int canLzop(void); - -/* Return true if this platform can run the "xz" program. */ -int canXz(void); - -/* Return true if this filesystem can handle nodump flags. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Mar 2 21:04:24 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B213FCF6BA6; Thu, 2 Mar 2017 21:04:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66E2422C; Thu, 2 Mar 2017 21:04:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v22L4Nf0086338; Thu, 2 Mar 2017 21:04:23 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v22L4NGN086336; Thu, 2 Mar 2017 21:04:23 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703022104.v22L4NGN086336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Mar 2017 21:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314566 - in vendor/libarchive/3.3.1: . build build/cmake cat/test cpio/test libarchive libarchive/test tar tar/test test_utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 21:04:24 -0000 Author: mm Date: Thu Mar 2 21:04:23 2017 New Revision: 314566 URL: https://svnweb.freebsd.org/changeset/base/314566 Log: Tag libarchive 3.3.1 Added: vendor/libarchive/3.3.1/ - copied from r314563, vendor/libarchive/dist/ vendor/libarchive/3.3.1/test_utils/test_common.h - copied unchanged from r314565, vendor/libarchive/dist/test_utils/test_common.h vendor/libarchive/3.3.1/test_utils/test_main.c - copied unchanged from r314565, vendor/libarchive/dist/test_utils/test_main.c Replaced: vendor/libarchive/3.3.1/CMakeLists.txt - copied unchanged from r314565, vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/3.3.1/Makefile.am - copied unchanged from r314565, vendor/libarchive/dist/Makefile.am vendor/libarchive/3.3.1/NEWS - copied unchanged from r314565, vendor/libarchive/dist/NEWS vendor/libarchive/3.3.1/build/autogen.sh - copied unchanged from r314565, vendor/libarchive/dist/build/autogen.sh vendor/libarchive/3.3.1/build/cmake/config.h.in - copied unchanged from r314565, vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/3.3.1/build/version - copied unchanged from r314565, vendor/libarchive/dist/build/version vendor/libarchive/3.3.1/cat/test/CMakeLists.txt - copied unchanged from r314565, vendor/libarchive/dist/cat/test/CMakeLists.txt vendor/libarchive/3.3.1/cat/test/test.h - copied unchanged from r314565, vendor/libarchive/dist/cat/test/test.h vendor/libarchive/3.3.1/cat/test/test_version.c - copied unchanged from r314565, vendor/libarchive/dist/cat/test/test_version.c vendor/libarchive/3.3.1/configure.ac - copied unchanged from r314565, vendor/libarchive/dist/configure.ac vendor/libarchive/3.3.1/cpio/test/CMakeLists.txt - copied unchanged from r314565, vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/3.3.1/cpio/test/test.h - copied unchanged from r314565, vendor/libarchive/dist/cpio/test/test.h vendor/libarchive/3.3.1/cpio/test/test_option_version.c - copied unchanged from r314565, vendor/libarchive/dist/cpio/test/test_option_version.c vendor/libarchive/3.3.1/libarchive/archive.h - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/3.3.1/libarchive/archive_digest_private.h - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_digest_private.h vendor/libarchive/3.3.1/libarchive/archive_entry.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/3.3.1/libarchive/archive_entry.h - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/3.3.1/libarchive/archive_hmac.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_hmac.c vendor/libarchive/3.3.1/libarchive/archive_read_disk_entry_from_file.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/3.3.1/libarchive/archive_read_disk_posix.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/3.3.1/libarchive/archive_read_disk_private.h - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/3.3.1/libarchive/archive_read_disk_windows.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_disk_windows.c vendor/libarchive/3.3.1/libarchive/archive_read_support_format_tar.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/3.3.1/libarchive/archive_read_support_format_warc.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/3.3.1/libarchive/archive_write_disk_posix.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/3.3.1/libarchive/archive_write_set_format_iso9660.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/3.3.1/libarchive/test/CMakeLists.txt - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/3.3.1/libarchive/test/test.h - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/3.3.1/libarchive/test/test_acl_nfs4.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_acl_nfs4.c vendor/libarchive/3.3.1/libarchive/test/test_acl_pax.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_acl_pax.c vendor/libarchive/3.3.1/libarchive/test/test_acl_platform_posix1e.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c vendor/libarchive/3.3.1/libarchive/test/test_acl_posix1e.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_acl_posix1e.c vendor/libarchive/3.3.1/libarchive/test/test_acl_text.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_acl_text.c vendor/libarchive/3.3.1/libarchive/test/test_archive_api_feature.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_archive_api_feature.c vendor/libarchive/3.3.1/libarchive/test/test_compat_solaris_tar_acl.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c vendor/libarchive/3.3.1/libarchive/test/test_compat_star_acl.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_compat_star_acl.c vendor/libarchive/3.3.1/libarchive/test/test_fuzz.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_fuzz.c vendor/libarchive/3.3.1/libarchive/test/test_read_disk.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_read_disk.c vendor/libarchive/3.3.1/libarchive/test/test_read_disk_directory_traversals.c - copied unchanged from r314565, vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c vendor/libarchive/3.3.1/tar/bsdtar.1 - copied unchanged from r314565, vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/3.3.1/tar/bsdtar.c - copied unchanged from r314565, vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/3.3.1/tar/bsdtar.h - copied unchanged from r314565, vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/3.3.1/tar/cmdline.c - copied unchanged from r314565, vendor/libarchive/dist/tar/cmdline.c vendor/libarchive/3.3.1/tar/read.c - copied unchanged from r314565, vendor/libarchive/dist/tar/read.c vendor/libarchive/3.3.1/tar/test/CMakeLists.txt - copied unchanged from r314565, vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/3.3.1/tar/test/test.h - copied unchanged from r314565, vendor/libarchive/dist/tar/test/test.h vendor/libarchive/3.3.1/tar/test/test_version.c - copied unchanged from r314565, vendor/libarchive/dist/tar/test/test_version.c vendor/libarchive/3.3.1/tar/util.c - copied unchanged from r314565, vendor/libarchive/dist/tar/util.c vendor/libarchive/3.3.1/tar/write.c - copied unchanged from r314565, vendor/libarchive/dist/tar/write.c Deleted: vendor/libarchive/3.3.1/cat/test/main.c vendor/libarchive/3.3.1/cpio/test/main.c vendor/libarchive/3.3.1/libarchive/test/main.c vendor/libarchive/3.3.1/tar/test/main.c Copied: vendor/libarchive/3.3.1/CMakeLists.txt (from r314565, vendor/libarchive/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/3.3.1/CMakeLists.txt Thu Mar 2 21:04:23 2017 (r314566, copy of r314565, vendor/libarchive/dist/CMakeLists.txt) @@ -0,0 +1,1726 @@ +# +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) +# +PROJECT(libarchive C) +# +SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") +if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) +endif() +# +# Set the Build type for make based generators. +# You can choose following types: +# Debug : Debug build +# Release : Release build +# RelWithDebInfo : Release build with Debug Info +# MinSizeRel : Release Min Size build +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) +# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the +# value type is "UNINITIALIZED". +GET_PROPERTY(cached_type CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) +IF("${cached_type}" STREQUAL "UNINITIALIZED") + SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE) +ENDIF("${cached_type}" STREQUAL "UNINITIALIZED") +# Check the Build Type. +IF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") + MESSAGE(FATAL_ERROR + "Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n" + "Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel") +ENDIF(NOT "${CMAKE_BUILD_TYPE}" + MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$") + +# On MacOS, prefer MacPorts libraries to system libraries. +# I haven't come up with a compelling argument for this to be conditional. +list(APPEND CMAKE_PREFIX_PATH /opt/local) +# Enable @rpath in the install name. +# detail in "cmake --help-policy CMP0042" +SET(CMAKE_MACOSX_RPATH ON) + +# +# Version - read from 'version' file. +# +FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version) +STRING(REGEX REPLACE + "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]*$" "\\1" _major ${_version}) +STRING(REGEX REPLACE + "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]*$" "\\1" _minor ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]*$" "\\1" _revision ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]*)$" "\\1" _quality ${_version}) +SET(_version_number ${_major}${_minor}${_revision}) +STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_minor ${_minor}) +STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_revision ${_revision}) +# +SET(VERSION "${_major}.${_trimmed_minor}.${_trimmed_revision}${_quality}") +SET(BSDCPIO_VERSION_STRING "${VERSION}") +SET(BSDTAR_VERSION_STRING "${VERSION}") +SET(BSDCAT_VERSION_STRING "${VERSION}") +SET(LIBARCHIVE_VERSION_NUMBER "${_version_number}") +SET(LIBARCHIVE_VERSION_STRING "${VERSION}") + +# INTERFACE_VERSION increments with every release +# libarchive 2.7 == interface version 9 = 2 + 7 +# libarchive 2.8 == interface version 10 = 2 + 8 +# libarchive 2.9 == interface version 11 = 2 + 9 +# libarchive 3.0 == interface version 12 +# libarchive 3.1 == interface version 13 +math(EXPR INTERFACE_VERSION "13 + ${_minor}") + +# Set SOVERSION == Interface version +# ?? Should there be more here ?? +SET(SOVERSION "${INTERFACE_VERSION}") + +# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros +# saving and restoring the state of the variables. +INCLUDE(CMakePushCheckState) + +# Initialize the state of the variables. This initialization is not +# necessary but this shows you what value the variables initially have. +SET(CMAKE_REQUIRED_DEFINITIONS) +SET(CMAKE_REQUIRED_INCLUDES) +SET(CMAKE_REQUIRED_LIBRARIES) +SET(CMAKE_REQUIRED_FLAGS) + +# Especially for early development, we want to be a little +# aggressive about diagnosing build problems; this can get +# relaxed somewhat in final shipping versions. +IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") + SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual") +ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$") +IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") + SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security") + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual") +ENDIF (CMAKE_C_COMPILER_ID MATCHES "^Clang$") +IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + SET(CMAKE_C_COMPILER "xlc_r") + SET(CMAKE_REQUIRED_FLAGS "-qflag=e:e -qformat=sec") + ################################################################# + # Set compile flags for all build types. + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=e:e -qformat=sec") + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qhalt=w") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qflag=w:w") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use") +ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$") +IF (MSVC) + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" + # Enable level 4 C4061: The enumerate has no associated handler in a switch + # statement. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") + # Enable level 4 C4254: A larger bit field was assigned to a smaller bit + # field. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") + # Enable level 4 C4295: An array was initialized but the last character in + # the array is not a null; accessing the array may + # produce unexpected results. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4295") + # Enable level 4 C4296: An unsigned variable was used in a comparison + # operation with zero. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4296") + # Enable level 4 C4389: An operation involved signed and unsigned variables. + # This could result in a loss of data. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4389") + # Enable level 4 C4505: The given function is local and not referenced in + # the body of the module; therefore, the function is + # dead code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4505") + # Enable level 4 C4514: The optimizer removed an inline function that is not + # called. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4514") + # Enable level 4 C4702: Unreachable code. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4702") + # Enable level 4 C4706: The test value in a conditional expression was the + # result of an assignment. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") + # /WX option is the same as gcc's -Werror option. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX") + # /Oi option enables built-in functions. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") + ################################################################# + # Set compile flags for release build. + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi") +ENDIF (MSVC) + +# Enable CTest/CDash support +include(CTest) + +OPTION(ENABLE_NETTLE "Enable use of Nettle" ON) +OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON) +OPTION(ENABLE_LZO "Enable the use of the system LZO library if found" OFF) +OPTION(ENABLE_LZMA "Enable the use of the system LZMA library if found" ON) + +OPTION(ENABLE_ZLIB "Enable the use of the system ZLIB library if found" ON) +OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON) +OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON) +OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON) +OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON) +OPTION(ENABLE_LibGCC "Enable the use of the system LibGCC library if found" ON) +# CNG is used for encrypt/decrypt Zip archives on Windows. +OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON) + +OPTION(ENABLE_TAR "Enable tar building" ON) +OPTION(ENABLE_TAR_SHARED "Enable dynamic build of tar" FALSE) +OPTION(ENABLE_CPIO "Enable cpio building" ON) +OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" FALSE) +OPTION(ENABLE_CAT "Enable cat building" ON) +OPTION(ENABLE_CAT_SHARED "Enable dynamic build of cat" FALSE) +OPTION(ENABLE_XATTR "Enable extended attribute support" ON) +OPTION(ENABLE_ACL "Enable ACL support" ON) +OPTION(ENABLE_ICONV "Enable iconv support" ON) +OPTION(ENABLE_TEST "Enable unit and regression tests" ON) +OPTION(ENABLE_COVERAGE "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)" FALSE) +OPTION(ENABLE_INSTALL "Enable installing of libraries" ON) + +SET(POSIX_REGEX_LIB "AUTO" CACHE STRING "Choose what library should provide POSIX regular expression support") +SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)") +SET(WINDOWS_VERSION "WIN7" CACHE STRING "Set Windows version to use (Windows only)") + +IF(ENABLE_COVERAGE) + include(LibarchiveCodeCoverage) +ENDIF(ENABLE_COVERAGE) + +IF(ENABLE_TEST) + ENABLE_TESTING() +ENDIF(ENABLE_TEST) + +IF(WIN32) + IF(WINDOWS_VERSION STREQUAL "WIN8") + SET(NTDDI_VERSION 0x06020000) + SET(_WIN32_WINNT 0x0602) + SET(WINVER 0x0602) + ELSEIF(WINDOWS_VERSION STREQUAL "WIN7") + SET(NTDDI_VERSION 0x06010000) + SET(_WIN32_WINNT 0x0601) + SET(WINVER 0x0601) + ELSEIF(WINDOWS_VERSION STREQUAL "WS08") + SET(NTDDI_VERSION 0x06000100) + SET(_WIN32_WINNT 0x0600) + SET(WINVER 0x0600) + ELSEIF(WINDOWS_VERSION STREQUAL "VISTA") + SET(NTDDI_VERSION 0x06000000) + SET(_WIN32_WINNT 0x0600) + SET(WINVER 0x0600) + ELSEIF(WINDOWS_VERSION STREQUAL "WS03") + SET(NTDDI_VERSION 0x05020000) + SET(_WIN32_WINNT 0x0502) + SET(WINVER 0x0502) + ELSEIF(WINDOWS_VERSION STREQUAL "WINXP") + SET(NTDDI_VERSION 0x05010000) + SET(_WIN32_WINNT 0x0501) + SET(WINVER 0x0501) + ELSE(WINDOWS_VERSION STREQUAL "WIN8") + # Default to Windows Server 2003 API if we don't recognize the specifier + SET(NTDDI_VERSION 0x05020000) + SET(_WIN32_WINNT 0x0502) + SET(WINVER 0x0502) + ENDIF(WINDOWS_VERSION STREQUAL "WIN8") +ENDIF(WIN32) + +IF(MSVC) + IF(ENABLE_SAFESEH STREQUAL "YES") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH") + SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH") + SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH") + ELSEIF(ENABLE_SAFESEH STREQUAL "NO") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO") + SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO") + SET(ENV{LDFLAGS} "$ENV{LDFLAGS} /SAFESEH:NO") + ENDIF(ENABLE_SAFESEH STREQUAL "YES") +ENDIF(MSVC) + +IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$") + ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t +ENDIF() + +# +INCLUDE(CheckCSourceCompiles) +INCLUDE(CheckCSourceRuns) +INCLUDE(CheckFileOffsetBits) +INCLUDE(CheckFuncs) +INCLUDE(CheckHeaderDirent) +INCLUDE(CheckIncludeFile) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckLibraryExists) +INCLUDE(CheckStructHasMember) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckTypeExists) +INCLUDE(CheckTypeSize) + +# +# Generate list.h +# +MACRO (GENERATE_LIST_H _listfile _cmlist __list_sources) + SET(_argv ${ARGV}) + # Remove _listfile and _cmlist from _argv + LIST(REMOVE_AT _argv 0 1) + IF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") + + MESSAGE(STATUS "Generating ${_listfile}") + FILE(WRITE ${_listfile} "") + FOREACH (testfile ${_argv}) + IF (testfile MATCHES "^test_[^/]+[.]c$") + FILE(STRINGS ${testfile} testvar REGEX "^DEFINE_TEST") + FOREACH (deftest ${testvar}) + FILE(APPEND ${_listfile} "${deftest}\n") + ENDFOREACH (deftest) + ENDIF (testfile MATCHES "^test_[^/]+[.]c$") + ENDFOREACH (testfile) + + ENDIF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") +ENDMACRO (GENERATE_LIST_H) +# +# Generate installation rules for man pages. +# +MACRO (INSTALL_MAN __mans) + FOREACH (_man ${ARGV}) + STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man}) + INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}") + ENDFOREACH (_man) +ENDMACRO (INSTALL_MAN __mans) +# +# Find out what macro is needed to use libraries on Windows. +# +MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES + TRY_TYPE SAMPLE_SOURCE MACRO_LIST) + IF(WIN32 AND NOT CYGWIN) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_INCLUDES ${INCLUDES}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBRARIES}) + FOREACH(VAR ${MACRO_LIST}) + # Clear ${VAR} from CACHE If the libraries which ${VAR} was + # checked with are changed. + SET(VAR_WITH_LIB "${VAR}_WITH_LIB") + GET_PROPERTY(PREV_VAR_WITH_LIB VARIABLE PROPERTY ${VAR_WITH_LIB}) + IF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + UNSET(${VAR} CACHE) + ENDIF(NOT "${PREV_VAR_WITH_LIB}" STREQUAL "${LIBRARIES}") + # Check if the library can be used with the macro. + IF("${TRY_TYPE}" MATCHES "COMPILES") + CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR}) + ELSEIF("${TRY_TYPE}" MATCHES "RUNS") + CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR}) + ELSE("${TRY_TYPE}" MATCHES "COMPILES") + MESSAGE(FATAL_ERROR "UNKNOWN KEYWORD \"${TRY_TYPE}\" FOR TRY_TYPE") + ENDIF("${TRY_TYPE}" MATCHES "COMPILES") + # Save the libraries which ${VAR} is checked with. + SET(${VAR_WITH_LIB} "${LIBRARIES}" CACHE INTERNAL + "Macro ${VAR} is checked with") + ENDFOREACH(VAR) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(WIN32 AND NOT CYGWIN) +ENDMACRO (TRY_MACRO_FOR_LIBRARY) +# +# Check compress/decompress libraries +# +IF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) + # GnuWin32 is only for Win32, not Win64. + SET(__GNUWIN32PATH "C:/Program Files/GnuWin32") +ENDIF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) +IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + # You have to add a path availabel DLL file into PATH environment variable. + # Maybe DLL path is "C:/Program Files/GnuWin32/bin". + # The zlib and the bzip2 Setup program have installed programs and DLLs into + # "C:/Program Files/GnuWin32" by default. + # This is convenience setting for Windows. + SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) + # + # If you didn't use Setup program or installed into nonstandard path, + # cmake cannot find out your zlib or bzip2 libraries and include files, + # you should execute cmake with -DCMAKE_PREFIX_PATH option. + # e.g. + # cmake -DCMAKE_PREFIX_PATH= + # + # If compiling error occurred in zconf.h, You may need patch to zconf.h. + #--- zconf.h.orig 2005-07-21 00:40:26.000000000 + #+++ zconf.h 2009-01-19 11:39:10.093750000 + #@@ -286,7 +286,7 @@ + # + # #if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */ + # # include /* for off_t */ + #-# include /* for SEEK_* and off_t */ + #+# include /* for SEEK_* and off_t */ + # # ifdef VMS + # # include /* for off_t */ + # # endif +ENDIF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + +SET(ADDITIONAL_LIBS "") +# +# Find ZLIB +# +IF(ENABLE_ZLIB) + FIND_PACKAGE(ZLIB) +ELSE() + SET(ZLIB_FOUND FALSE) # Override cached value +ENDIF() +IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + IF(WIN32 AND NOT CYGWIN) + # + # Test if ZLIB_WINAPI macro is needed to use. + # + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + RUNS + "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" + ZLIB_WINAPI) + IF(ZLIB_WINAPI) + ADD_DEFINITIONS(-DZLIB_WINAPI) + ELSE(ZLIB_WINAPI) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" + COMPILES + "#include \nint main() {return zlibVersion()?1:0; }" + "ZLIB_DLL;WITHOUT_ZLIB_DLL") + IF(ZLIB_DLL) + ADD_DEFINITIONS(-DZLIB_DLL) + ENDIF(ZLIB_DLL) + ENDIF(ZLIB_WINAPI) + ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(ZLIB_FOUND) +MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY) +# +# Find BZip2 +# +IF(ENABLE_BZip2) + FIND_PACKAGE(BZip2) +ELSE() + SET(BZIP2_FOUND FALSE) # Override cached value +ENDIF() +IF(BZIP2_FOUND) + SET(HAVE_LIBBZ2 1) + SET(HAVE_BZLIB_H 1) + INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${BZIP2_INCLUDE_DIR}" "${BZIP2_LIBRARIES}" + COMPILES + "#include \nint main() {return BZ2_bzlibVersion()?1:0; }" + "USE_BZIP2_DLL;USE_BZIP2_STATIC") + IF(USE_BZIP2_DLL) + ADD_DEFINITIONS(-DUSE_BZIP2_DLL) + ELSEIF(USE_BZIP2_STATIC) + ADD_DEFINITIONS(-DUSE_BZIP2_STATIC) + ENDIF(USE_BZIP2_DLL) +ENDIF(BZIP2_FOUND) +MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES) + + +# +# Find LZMA +# +IF(ENABLE_LZMA) + FIND_PACKAGE(LibLZMA) +ELSE() + SET(LIBZMA_FOUND FALSE) # Override cached value +ENDIF() + +IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${LIBLZMA_INCLUDE_DIRS}" "${LIBLZMA_LIBRARIES}" + COMPILES + "#include \nint main() {return (int)lzma_version_number(); }" + "WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC") + IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) + ADD_DEFINITIONS(-DLZMA_API_STATIC) + ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC) +ELSE(LIBLZMA_FOUND) +# LZMA not found and will not be used. +ENDIF(LIBLZMA_FOUND) +# +# Find LZO2 +# +IF(ENABLE_LZO) + IF (LZO2_INCLUDE_DIR) + # Already in cache, be silent + SET(LZO2_FIND_QUIETLY TRUE) + ENDIF (LZO2_INCLUDE_DIR) + + FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h) + FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR) +ELSE(ENABLE_LZO) + SET(LIBZMA_FOUND FALSE) # Override cached value +ENDIF(ENABLE_LZO) +IF(LZO2_FOUND) + SET(HAVE_LIBLZO2 1) + SET(HAVE_LZO_LZOCONF_H 1) + SET(HAVE_LZO_LZO1X_H 1) + INCLUDE_DIRECTORIES(${LZO2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZO2_LIBRARY}) + # + # TODO: test for static library. + # +ENDIF(LZO2_FOUND) +MARK_AS_ADVANCED(CLEAR LZO2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LZO2_LIBRARY) +# +# Find LZ4 +# +IF (LZ4_INCLUDE_DIR) + # Already in cache, be silent + SET(LZ4_FIND_QUIETLY TRUE) +ENDIF (LZ4_INCLUDE_DIR) + +FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) +IF(LZ4_FOUND) + SET(HAVE_LIBLZ4 1) + SET(HAVE_LZ4_H 1) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_INCLUDES ${LZ4_INCLUDE_DIR}) + CHECK_INCLUDE_FILES("lz4hc.h" HAVE_LZ4HC_H) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + INCLUDE_DIRECTORIES(${LZ4_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZ4_LIBRARY}) + # + # TODO: test for static library. + # +ENDIF(LZ4_FOUND) +MARK_AS_ADVANCED(CLEAR LZ4_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR LZ4_LIBRARY) + +# +# Check headers +# +CHECK_HEADER_DIRENT() + +SET(INCLUDES "") +MACRO (LA_CHECK_INCLUDE_FILE header var) + CHECK_INCLUDE_FILES("${INCLUDES};${header}" ${var}) + IF (${var}) + SET(INCLUDES ${INCLUDES} ${header}) + ENDIF (${var}) +ENDMACRO (LA_CHECK_INCLUDE_FILE) + +# Some FreeBSD headers assume sys/types.h was already included. +LA_CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) + +# Alphabetize the rest unless there's a compelling reason +LA_CHECK_INCLUDE_FILE("acl/libacl.h" HAVE_ACL_LIBACL_H) +LA_CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H) +LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H) +LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H) +LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) +LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H) +LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H) + +CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS) + +LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) +LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H) +LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) +LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H) +LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H) +LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H) +LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H) +LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H) +LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H) + +CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return FS_IOC_GETFLAGS; }" HAVE_WORKING_FS_IOC_GETFLAGS) + +LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H) +LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H) +LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) +LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H) +LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H) +LA_CHECK_INCLUDE_FILE("process.h" HAVE_PROCESS_H) +LA_CHECK_INCLUDE_FILE("pthread.h" HAVE_PTHREAD_H) +LA_CHECK_INCLUDE_FILE("pwd.h" HAVE_PWD_H) +LA_CHECK_INCLUDE_FILE("readpassphrase.h" HAVE_READPASSPHRASE_H) +LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) +LA_CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H) +LA_CHECK_INCLUDE_FILE("spawn.h" HAVE_SPAWN_H) +LA_CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H) +LA_CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) +LA_CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H) +LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) +LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) +LA_CHECK_INCLUDE_FILE("sys/acl.h" HAVE_SYS_ACL_H) +LA_CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H) +LA_CHECK_INCLUDE_FILE("sys/ioctl.h" HAVE_SYS_IOCTL_H) +LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H) +LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H) +LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H) +LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) +LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H) +LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) +LA_CHECK_INCLUDE_FILE("sys/statfs.h" HAVE_SYS_STATFS_H) +LA_CHECK_INCLUDE_FILE("sys/statvfs.h" HAVE_SYS_STATVFS_H) +LA_CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H) +LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H) +LA_CHECK_INCLUDE_FILE("sys/utsname.h" HAVE_SYS_UTSNAME_H) +LA_CHECK_INCLUDE_FILE("sys/vfs.h" HAVE_SYS_VFS_H) +LA_CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H) +LA_CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H) +LA_CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) +LA_CHECK_INCLUDE_FILE("utime.h" HAVE_UTIME_H) +LA_CHECK_INCLUDE_FILE("wchar.h" HAVE_WCHAR_H) +LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H) +LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H) +IF(ENABLE_CNG) + LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H) +ELSE(ENABLE_CNG) + UNSET(HAVE_BCRYPT_H CACHE) +ENDIF(ENABLE_CNG) +# Following files need windows.h, so we should test it after windows.h test. +LA_CHECK_INCLUDE_FILE("wincrypt.h" HAVE_WINCRYPT_H) +LA_CHECK_INCLUDE_FILE("winioctl.h" HAVE_WINIOCTL_H) + +# +# Check whether use of __EXTENSIONS__ is safe. +# We need some macro such as _GNU_SOURCE to use extension functions. +# +SET(_INCLUDE_FILES) +FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") +ENDFOREACH (it) + +CHECK_C_SOURCE_COMPILES( + "#define __EXTENSIONS__ 1 + ${_INCLUDE_FILES} + int main() { return 0;}" + SAFE_TO_DEFINE_EXTENSIONS) + +# +# Find Nettle +# +IF(ENABLE_NETTLE) + FIND_PACKAGE(Nettle) + IF(NETTLE_FOUND) + SET(HAVE_LIBNETTLE 1) + LIST(APPEND ADDITIONAL_LIBS ${NETTLE_LIBRARIES}) + INCLUDE_DIRECTORIES(${NETTLE_INCLUDE_DIR}) + + LIST(APPEND CMAKE_REQUIRED_INCLUDES ${NETTLE_INCLUDE_DIR}) + LA_CHECK_INCLUDE_FILE("nettle/aes.h" HAVE_NETTLE_AES_H) + LA_CHECK_INCLUDE_FILE("nettle/hmac.h" HAVE_NETTLE_HMAC_H) + LA_CHECK_INCLUDE_FILE("nettle/md5.h" HAVE_NETTLE_MD5_H) + LA_CHECK_INCLUDE_FILE("nettle/pbkdf2.h" HAVE_NETTLE_PBKDF2_H) + LA_CHECK_INCLUDE_FILE("nettle/ripemd160.h" HAVE_NETTLE_RIPEMD160_H) + LA_CHECK_INCLUDE_FILE("nettle/sha.h" HAVE_NETTLE_SHA_H) + + ENDIF(NETTLE_FOUND) + MARK_AS_ADVANCED(CLEAR NETTLE_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR NETTLE_LIBRARIES) +ENDIF(ENABLE_NETTLE) + +# +# Find OpenSSL +# (Except on Mac, where OpenSSL is deprecated.) +# +IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_FOUND) + SET(HAVE_LIBCRYPTO 1) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY}) + ENDIF(OPENSSL_FOUND) +ELSE() + SET(OPENSSL_FOUND FALSE) # Override cached value +ENDIF() + +# FreeBSD libmd +IF(NOT OPENSSL_FOUND) + CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) + IF(LIBMD_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_LIBRARIES "md") + FIND_LIBRARY(LIBMD_LIBRARY NAMES md) + LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(LIBMD_FOUND) +ENDIF(NOT OPENSSL_FOUND) + +# +# How to prove that CRYPTO functions, which have several names on various +# platforms, just see if archive_digest.c can compile and link against +# required libraries. +# +MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + FOREACH(ALGORITHM ${ALGORITHMS}) + IF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) + STRING(TOLOWER "${ALGORITHM}" lower_algorithm) + STRING(TOUPPER "${ALGORITHM}" algorithm) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) + SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) + ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NOT NETTLE_FOUND) + SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) + + IF(NOT DEFINED ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + # Probe the local implementation for whether this + # crypto implementation is available on this platform. + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/libarchive;${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp") + SET(TRY_CRYPTO_REQUIRED_LIBS) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NETTLE_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${NETTLE_INCLUDE_DIR}") + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${NETTLE_LIBRARY}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^LIBMD$" AND LIBMD_FOUND) + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${LIBMD_LIBRARY}") + ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h) + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h" + CONFDEFS_H) + FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/libarchive/archive_digest.c" + ARCHIVE_CRYPTO_C) + + SET(SOURCE "${CONFDEFS_H} + +#define ARCHIVE_${algorithm}_COMPILE_TEST +#define ARCHIVE_CRYPTO_${algorithm}_${IMPLEMENTATION} +#define PLATFORM_CONFIG_H \"check_crypto_md.h\" + +${ARCHIVE_CRYPTO_C} + +int +main(int argc, char **argv) +{ + archive_${lower_algorithm}_ctx ctx; + archive_${lower_algorithm}_init(&ctx); + archive_${lower_algorithm}_update(&ctx, *argv, argc); + archive_${lower_algorithm}_final(&ctx, NULL); + return 0; +} +") + + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.h" "") + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.c" "${SOURCE}") + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}") + + TRY_COMPILE(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_md.c + CMAKE_FLAGS + "${TRY_CRYPTO_REQUIRED_LIBS}" + "${TRY_CRYPTO_REQUIRED_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + # Inform user whether or not we found it; if not, log why we didn't. + IF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} -- found") + SET(ARCHIVE_CRYPTO_${ALGORITHM} 1) + ELSE (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} -- not found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking support for ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT DEFINED ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + + # Add appropriate libs/includes depending on whether the implementation + # was found on this platform. + IF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) + LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) + ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) + ENDFOREACH(ALGORITHM ${ALGORITHMS}) +ENDMACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) + +# +# CRYPTO functions on Windows is defined at archive_windows.c, thus we do not +# need the test what the functions can be mapped to archive_{crypto name}_init, +# archive_{crypto name}_update and archive_{crypto name}_final. +# The functions on Windows use CALG_{crypto name} macro to create a crypt object +# and then we need to know what CALG_{crypto name} macros is available to show +# ARCHIVE_CRYPTO_{crypto name}_WIN macros because Windows 2000 and earlier version +# of Windows XP do not support SHA256, SHA384 and SHA512. +# +MACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) + IF(WIN32 AND NOT CYGWIN) + FOREACH(CRYPTO ${CRYPTO_LIST}) + IF(NOT ARCHIVE_CRYPTO_${CRYPTO}) + IF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN) + STRING(TOUPPER "${CRYPTO}" crypto) + SET(ALGID "") + IF ("${CRYPTO}" MATCHES "^MD5$") + SET(ALGID "CALG_MD5") + ENDIF ("${CRYPTO}" MATCHES "^MD5$") + IF ("${CRYPTO}" MATCHES "^SHA1$") + SET(ALGID "CALG_SHA1") + ENDIF ("${CRYPTO}" MATCHES "^SHA1$") + IF ("${CRYPTO}" MATCHES "^SHA256$") + SET(ALGID "CALG_SHA_256") + ENDIF ("${CRYPTO}" MATCHES "^SHA256$") + IF ("${CRYPTO}" MATCHES "^SHA384$") + SET(ALGID "CALG_SHA_384") + ENDIF ("${CRYPTO}" MATCHES "^SHA384$") + IF ("${CRYPTO}" MATCHES "^SHA512$") + SET(ALGID "CALG_SHA_512") + ENDIF ("${CRYPTO}" MATCHES "^SHA512$") + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h) + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/confdefs.h" + CONFDEFS_H) + + SET(SOURCE "${CONFDEFS_H} + +#define ${crypto}_COMPILE_TEST +#include +#include + +int +main(int argc, char **argv) +{ + return ${ALGID}; +} +") + SET(SOURCE_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_crypto_win.c") + + FILE(WRITE "${SOURCE_FILE}" "${SOURCE}") + MESSAGE(STATUS "Checking support for ARCHIVE_CRYPTO_${CRYPTO}_WIN") + + TRY_COMPILE(ARCHIVE_CRYPTO_${CRYPTO}_WIN + ${CMAKE_BINARY_DIR} + ${SOURCE_FILE} + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/libarchive" + OUTPUT_VARIABLE OUTPUT) + + IF (ARCHIVE_CRYPTO_${CRYPTO}_WIN) + MESSAGE(STATUS + "Checking support for ARCHIVE_CRYPTO_${CRYPTO}_WIN -- found") + SET(ARCHIVE_CRYPTO_${CRYPTO} 1) + ELSE (ARCHIVE_CRYPTO_${CRYPTO}_WIN) + MESSAGE(STATUS + "Checking support for ARCHIVE_CRYPTO_${CRYPTO}_WIN -- not found") + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking support for ARCHIVE_CRYPTO_${CRYPTO}_WIN failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF (ARCHIVE_CRYPTO_${CRYPTO}_WIN) + + ENDIF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN) + ENDIF(NOT ARCHIVE_CRYPTO_${CRYPTO}) + ENDFOREACH(CRYPTO) + ENDIF(WIN32 AND NOT CYGWIN) +ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) + +# +# Find iconv +# POSIX defines the second arg as const char ** +# and requires it to be in libc. But we can accept +# a non-const argument here and can support iconv() +# being in libiconv. +# +MACRO(CHECK_ICONV LIB TRY_ICONV_CONST) + IF(NOT HAVE_ICONV) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR + CMAKE_C_COMPILER_ID MATCHES "^Clang$") + # + # During checking iconv proto type, we should use -Werror to avoid the + # success of iconv detection with a warnig which success is a miss + # detection. So this needs for all build mode(even it's a release mode). + # + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") + ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR + CMAKE_C_COMPILER_ID MATCHES "^Clang$") + IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -qhalt=w -qflag=w:w") + ENDIF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + IF (MSVC) + # NOTE: /WX option is the same as gcc's -Werror option. + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /WX") + ENDIF (MSVC) + # + CHECK_C_SOURCE_COMPILES( + "#include + #include + int main() { + ${TRY_ICONV_CONST} char *ccp; + iconv_t cd = iconv_open(\"\", \"\"); + iconv(cd, &ccp, (size_t *)0, (char **)0, (size_t *)0); + iconv_close(cd); + return 0; + }" + HAVE_ICONV_${LIB}_${TRY_ICONV_CONST}) + IF(HAVE_ICONV_${LIB}_${TRY_ICONV_CONST}) + SET(HAVE_ICONV true) + SET(ICONV_CONST ${TRY_ICONV_CONST}) + ENDIF(HAVE_ICONV_${LIB}_${TRY_ICONV_CONST}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(NOT HAVE_ICONV) +ENDMACRO(CHECK_ICONV TRY_ICONV_CONST) + +IF(ENABLE_ICONV) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + IF(ICONV_INCLUDE_DIR) + #SET(INCLUDES ${INCLUDES} "iconv.h") + SET(HAVE_ICONV_H 1) + INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + CHECK_ICONV("libc" "const") + CHECK_ICONV("libc" "") + + # If iconv isn't in libc and we have a libiconv, try that. + FIND_LIBRARY(LIBICONV_PATH NAMES iconv libiconv) + IF(NOT HAVE_ICONV AND LIBICONV_PATH) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH}) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ICONV_INCLUDE_DIR}" "${LIBICONV_PATH}" + COMPILES + "#include \nint main() {return iconv_close((iconv_t)0);}" + "WITHOUT_LIBICONV_STATIC;LIBICONV_STATIC") + IF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC) + ADD_DEFINITIONS(-DLIBICONV_STATIC) + ENDIF(NOT WITHOUT_LIBICONV_STATIC AND LIBICONV_STATIC) + # + # Set up CMAKE_REQUIRED_* for CHECK_ICONV + # + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBICONV_PATH}) + IF(LIBICONV_STATIC) + # LIBICONV_STATIC is necessary for the success of CHECK_ICONV + # on Windows. + SET(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC") + ELSE(LIBICONV_STATIC) + SET(CMAKE_REQUIRED_DEFINITIONS) + ENDIF(LIBICONV_STATIC) + CHECK_ICONV("libiconv" "const") + CHECK_ICONV("libiconv" "") + IF (HAVE_ICONV) + LIST(APPEND ADDITIONAL_LIBS ${LIBICONV_PATH}) + ENDIF(HAVE_ICONV) + ENDIF(NOT HAVE_ICONV AND LIBICONV_PATH) + ENDIF(ICONV_INCLUDE_DIR) + # + # Find locale_charset() for libiconv. + # + IF(LIBICONV_PATH) + SET(CMAKE_REQUIRED_DEFINITIONS) + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES) + CHECK_INCLUDE_FILES("localcharset.h" HAVE_LOCALCHARSET_H) + FIND_LIBRARY(LIBCHARSET_PATH NAMES charset libcharset) + IF(LIBCHARSET_PATH) + SET(CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_PATH}) + IF(WIN32 AND NOT CYGWIN) + # Test if a macro is needed for the library. + TRY_MACRO_FOR_LIBRARY( + "${ICONV_INCLUDE_DIR}" "${LIBCHARSET_PATH}" + COMPILES + "#include \nint main() {return locale_charset()?1:0;}" + "WITHOUT_LIBCHARSET_STATIC;LIBCHARSET_STATIC") + IF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC) + ADD_DEFINITIONS(-DLIBCHARSET_STATIC) + ENDIF(NOT WITHOUT_LIBCHARSET_STATIC AND LIBCHARSET_STATIC) + IF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC) + SET(HAVE_LOCALE_CHARSET ON CACHE INTERNAL + "Have function locale_charset") + ENDIF(WITHOUT_LIBCHARSET_STATIC OR LIBCHARSET_STATIC) + ELSE(WIN32 AND NOT CYGWIN) + CHECK_FUNCTION_EXISTS_GLIBC(locale_charset HAVE_LOCALE_CHARSET) + ENDIF(WIN32 AND NOT CYGWIN) + IF(HAVE_LOCALE_CHARSET) + LIST(APPEND ADDITIONAL_LIBS ${LIBCHARSET_PATH}) + ENDIF(HAVE_LOCALE_CHARSET) + ENDIF(LIBCHARSET_PATH) + ENDIF(LIBICONV_PATH) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Mar 2 21:13:29 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CD8DCF6E69; Thu, 2 Mar 2017 21:13:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8E6DACB; Thu, 2 Mar 2017 21:13:28 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v22LDSFE090367; Thu, 2 Mar 2017 21:13:28 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v22LDQVI090348; Thu, 2 Mar 2017 21:13:26 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703022113.v22LDQVI090348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Mar 2017 21:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314567 - in vendor/libarchive/dist: . build build/cmake cat/test cpio cpio/test libarchive libarchive/test tar tar/test test_utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 21:13:29 -0000 Author: mm Date: Thu Mar 2 21:13:25 2017 New Revision: 314567 URL: https://svnweb.freebsd.org/changeset/base/314567 Log: Update vendor/libarchive to git a15c7f7b496ba4cefbcaf6f8ac637db4f3009a58 Documentation, style, test suite changes and typo fixes. New bsdtar tests for --acls and --fflags options. Added: vendor/libarchive/dist/tar/test/test_option_acls.c (contents, props changed) vendor/libarchive/dist/tar/test/test_option_fflags.c (contents, props changed) Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/version vendor/libarchive/dist/cat/test/CMakeLists.txt vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_check_magic.c vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_entry_acl.3 vendor/libarchive/dist/libarchive/archive_entry_paths.3 vendor/libarchive/dist/libarchive/archive_entry_perms.3 vendor/libarchive/dist/libarchive/archive_platform.h vendor/libarchive/dist/libarchive/archive_read_disk.3 vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_format.3 vendor/libarchive/dist/libarchive/archive_read_open.3 vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_write_data.3 vendor/libarchive/dist/libarchive/archive_write_disk.3 vendor/libarchive/dist/libarchive/archive_write_disk_acl.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_finish_entry.3 vendor/libarchive/dist/libarchive/archive_write_format.3 vendor/libarchive/dist/libarchive/test/test_acl_platform_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_platform_posix1e.c vendor/libarchive/dist/libarchive/test/test_read_disk_directory_traversals.c vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/test_option_nodump.c vendor/libarchive/dist/test_utils/test_common.h vendor/libarchive/dist/test_utils/test_main.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/CMakeLists.txt Thu Mar 2 21:13:25 2017 (r314567) @@ -15,7 +15,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". @@ -579,6 +579,7 @@ int main(void) { return FS_IOC_GETFLAGS; LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H) LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H) +LA_CHECK_INCLUDE_FILE("membership.h" HAVE_MEMBERSHIP_H) LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H) LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H) @@ -1618,29 +1619,29 @@ IF(ENABLE_ACL) CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP) CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP) CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP) - CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "${INCLUDES}" HAVE_ACL_TYPE_NFS4) + CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "${INCLUDES}" HAVE_DECL_ACL_TYPE_NFS4) # MacOS has an acl.h that isn't POSIX. It can be detected by # checking for ACL_USER - CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_ACL_USER) + CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_DECL_ACL_USER) CHECK_C_SOURCE_COMPILES("#include #include -int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_ACL_TYPE_EXTENDED) +int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_DECL_ACL_TYPE_EXTENDED) + CHECK_C_SOURCE_COMPILES("#include +#include +int main(void) { return ACL_SYNCHRONIZE; }" HAVE_DECL_ACL_SYNCHRONIZE) # Solaris and derivates ACLs - CHECK_LIBRARY_EXISTS(sec "acl_get" "" HAVE_LIBSEC) - IF(HAVE_LIBSEC) - SET(CMAKE_REQUIRED_LIBRARIES "sec") - FIND_LIBRARY(SEC_LIBRARY NAMES sec) - LIST(APPEND ADDITIONAL_LIBS ${SEC_LIBRARY}) - ENDIF(HAVE_LIBSEC) - # CHECK_TYPE_EXISTS(aclent_t "${INCLUDES}" HAVE_ACLENT_T) CHECK_TYPE_EXISTS(ace_t "${INCLUDES}" HAVE_ACE_T) - CHECK_FUNCTION_EXISTS(acl_get HAVE_FACL_GET) - CHECK_FUNCTION_EXISTS(facl_get HAVE_FACL_GET) - CHECK_FUNCTION_EXISTS(acl_set HAVE_FACL_SET) - CHECK_FUNCTION_EXISTS(facl_set HAVE_FACL_SET) + CHECK_FUNCTION_EXISTS(acl HAVE_ACL) + CHECK_FUNCTION_EXISTS(facl HAVE_FACL) + CHECK_SYMBOL_EXISTS(GETACL "${INCLUDES}" HAVE_DECL_GETACL) + CHECK_SYMBOL_EXISTS(GETACLCNT "${INCLUDES}" HAVE_DECL_GETACLCNT) + CHECK_SYMBOL_EXISTS(SETACL "${INCLUDES}" HAVE_DECL_SETACL) + CHECK_SYMBOL_EXISTS(ACE_GETACL "${INCLUDES}" HAVE_DECL_ACE_GETACL) + CHECK_SYMBOL_EXISTS(ACE_GETACLCNT "${INCLUDES}" HAVE_DECL_ACE_GETACLCNT) + CHECK_SYMBOL_EXISTS(ACE_SETACL "${INCLUDES}" HAVE_DECL_ACE_SETACL) ELSE(ENABLE_ACL) # If someone runs cmake, then disables ACL support, we need # to forcibly override the cached values for these. @@ -1655,15 +1656,20 @@ ELSE(ENABLE_ACL) SET(HAVE_ACL_SET_FD FALSE) SET(HAVE_ACL_SET_FD_NP FALSE) SET(HAVE_ACL_SET_FILE FALSE) - SET(HAVE_ACL_TYPE_NFS4 FALSE) - SET(HAVE_ACL_USER FALSE) SET(HAVE_ACL_TYPE_EXTENDED FALSE) - SET(HAVE_ACL_GET FALSE) SET(HAVE_ACLENT_T FALSE) SET(HAVE_ACE_T FALSE) - SET(HAVE_FACL_GET FALSE) - SET(HAVE_ACL_SET FALSE) - SET(HAVE_FACL_SET FALSE) + SET(HAVE_DECL_ACL_TYPE_NFS4 FALSE) + SET(HAVE_DECL_ACL_USER FALSE) + SET(HAVE_DECL_ACL_SYNCHRONIZE FALSE) + SET(HAVE_DECL_GETACL FALSE) + SET(HAVE_DECL_GETACLCNT FALSE) + SET(HAVE_DECL_SETACL FALSE) + SET(HAVE_DECL_ACE_GETACL FALSE) + SET(HAVE_DECL_ACE_GETACLCNT FALSE) + SET(HAVE_DECL_ACE_SETACL FALSE) + SET(HAVE_ACL FALSE) + SET(HAVE_FACL FALSE) ENDIF(ENABLE_ACL) # Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/Makefile.am Thu Mar 2 21:13:25 2017 (r314567) @@ -23,7 +23,7 @@ TESTS_ENVIRONMENT= $(libarchive_TESTS_EN DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio # The next line is commented out by default in shipping libarchive releases. # It is uncommented by default in trunk. -# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g +DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g AM_CFLAGS=$(DEV_CFLAGS) PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS) @@ -951,10 +951,12 @@ bsdtar_test_SOURCES= \ tar/test/test_option_T_upper.c \ tar/test/test_option_U_upper.c \ tar/test/test_option_X_upper.c \ + tar/test/test_option_acls.c \ tar/test/test_option_a.c \ tar/test/test_option_b.c \ tar/test/test_option_b64encode.c \ tar/test/test_option_exclude.c \ + tar/test/test_option_fflags.c \ tar/test/test_option_gid_gname.c \ tar/test/test_option_grzip.c \ tar/test/test_option_j.c \ Modified: vendor/libarchive/dist/build/cmake/config.h.in ============================================================================== --- vendor/libarchive/dist/build/cmake/config.h.in Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/build/cmake/config.h.in Thu Mar 2 21:13:25 2017 (r314567) @@ -326,15 +326,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `acl_set_file' function. */ #cmakedefine HAVE_ACL_SET_FILE 1 -/* True for FreeBSD with NFSv4 ACL support */ -#cmakedefine HAVE_ACL_TYPE_NFS4 1 - -/* True for MacOS ACL support */ -#cmakedefine HAVE_ACL_TYPE_EXTENDED 1 - -/* True for systems with POSIX ACL support */ -#cmakedefine HAVE_ACL_USER 1 - /* Define to 1 if you have the `arc4random_buf' function. */ #cmakedefine HAVE_ARC4RANDOM_BUF 1 @@ -371,6 +362,34 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `cygwin_conv_path' function. */ #cmakedefine HAVE_CYGWIN_CONV_PATH 1 +/* Define to 1 if you have the declaration of `ACE_GETACL', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_ACE_GETACL 1 + +/* Define to 1 if you have the declaration of `ACE_GETACLCNT', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_ACE_GETACLCNT 1 + +/* Define to 1 if you have the declaration of `ACE_SETACL', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_ACE_SETACL 1 + +/* Define to 1 if you have the declaration of `ACL_SYNCHRONIZE', and to 0 if + you don't. */ +#cmakedefine HAVE_DECL_ACL_SYNCHRONIZE 1 + +/* Define to 1 if you have the declaration of `ACL_TYPE_EXTENDED', and to 0 if + you don't. */ +#cmakedefine HAVE_DECL_ACL_TYPE_EXTENDED 1 + +/* Define to 1 if you have the declaration of `ACL_TYPE_NFS4', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_ACL_TYPE_NFS4 1 + +/* Define to 1 if you have the declaration of `ACL_USER', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_ACL_USER 1 + /* Define to 1 if you have the declaration of `INT32_MAX', and to 0 if you don't. */ #cmakedefine HAVE_DECL_INT32_MAX 1 @@ -395,6 +414,10 @@ typedef uint64_t uintmax_t; don't. */ #cmakedefine HAVE_DECL_INTMAX_MIN 1 +/* Define to 1 if you have the declaration of `SETACL', and to 0 if you don't. + */ +#cmakedefine HAVE_DECL_SETACL 1 + /* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you don't. */ #cmakedefine HAVE_DECL_SIZE_MAX 1 @@ -468,6 +491,14 @@ typedef uint64_t uintmax_t; /* Define to 1 if EXTATTR_NAMESPACE_USER is defined in sys/extattr.h. */ #cmakedefine HAVE_DECL_EXTATTR_NAMESPACE_USER 1 +/* Define to 1 if you have the declaration of `GETACL', and to 0 if you don't. + */ +#cmakedefine HAVE_DECL_GETACL 1 + +/* Define to 1 if you have the declaration of `GETACLCNT', and to 0 if you + don't. */ +#cmakedefine HAVE_DECL_GETACLCNT 1 + /* Define to 1 if you have the `fchdir' function. */ #cmakedefine HAVE_FCHDIR 1 @@ -742,6 +773,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `mbrtowc' function. */ #cmakedefine HAVE_MBRTOWC 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMBERSHIP_H 1 + /* Define to 1 if you have the `memmove' function. */ #cmakedefine HAVE_MEMMOVE 1 Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/build/version Thu Mar 2 21:13:25 2017 (r314567) @@ -1 +1 @@ -3003001 +3003002dev Modified: vendor/libarchive/dist/cat/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cat/test/CMakeLists.txt Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/cat/test/CMakeLists.txt Thu Mar 2 21:13:25 2017 (r314567) @@ -29,6 +29,11 @@ IF(ENABLE_CAT AND ENABLE_TEST) # Register target # ADD_EXECUTABLE(bsdcat_test ${bsdcat_test_SOURCES}) + IF(ENABLE_ACL) + IF(HAVE_LIBACL) + TARGET_LINK_LIBRARIES(bsdcat_test ${ACL_LIBRARY}) + ENDIF(HAVE_LIBACL) + ENDIF(ENABLE_ACL) SET_PROPERTY(TARGET bsdcat_test PROPERTY COMPILE_DEFINITIONS LIST_H) # Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/configure.ac Thu Mar 2 21:13:25 2017 (r314567) @@ -4,8 +4,8 @@ dnl First, define all of the version num dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.3.1]) -m4_define([LIBARCHIVE_VERSION_N],[3003001]) +m4_define([LIBARCHIVE_VERSION_S],[3.3.2dev]) +m4_define([LIBARCHIVE_VERSION_N],[3003002]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -699,6 +699,7 @@ AC_ARG_ENABLE([acl], if test "x$enable_acl" != "xno"; then AC_CHECK_HEADERS([acl/libacl.h]) AC_CHECK_HEADERS([sys/acl.h]) + AC_CHECK_HEADERS([membership.h]) AC_CHECK_LIB([acl],[acl_get_file]) AC_CHECK_FUNCS([acl_create_entry acl_get_fd_np]) AC_CHECK_FUNCS([acl_init acl_set_fd acl_set_fd_np acl_set_file]) @@ -737,31 +738,23 @@ if test "x$enable_acl" != "xno"; then #endif ]) - # Check for ACL_TYPE_NFS4 - AC_CHECK_DECL([ACL_TYPE_NFS4], - [AC_DEFINE(HAVE_ACL_TYPE_NFS4, 1, [True for FreeBSD with NFSv4 ACL support])], - [], - [#include ]) - - # MacOS has an acl.h that isn't POSIX. It can be detected by - # checking for ACL_USER - AC_CHECK_DECL([ACL_USER], - [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])], - [], - [#include ]) + # FreeBSD and POSIX + # MacOS has no ACL_USER in acl.h + AC_CHECK_DECLS([ACL_TYPE_NFS4, ACL_USER], + [], [], + [#include + #include ]) - # MacOS has ACL_TYPE_EXTENDED instead - AC_CHECK_DECL([ACL_TYPE_EXTENDED], - [AC_DEFINE(HAVE_ACL_TYPE_EXTENDED, 1, [True for MacOS ACL support])], - [], + # FreeBSD and MacOS ACL support + AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_SYNCHRONIZE], [], [], [#include #include ]) # Solaris and derivates ACLs - AC_CHECK_LIB([sec], [acl_get]) AC_CHECK_TYPES([aclent_t], [], [], [[#include ]]) AC_CHECK_TYPES([ace_t], [], [], [[#include ]]) - AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set) + AC_CHECK_FUNCS(acl facl) + AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT, ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], [], [], [#include ]) fi # Additional requirements Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/cpio/cpio.c Thu Mar 2 21:13:25 2017 (r314567) @@ -108,22 +108,22 @@ static int entry_to_archive(struct cpio static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); static void list_item_verbose(struct cpio *, struct archive_entry *); -static void long_help(void); +static void long_help(void) __LA_DEAD; static const char *lookup_gname(struct cpio *, gid_t gid); static int lookup_gname_helper(struct cpio *, const char **name, id_t gid); static const char *lookup_uname(struct cpio *, uid_t uid); static int lookup_uname_helper(struct cpio *, const char **name, id_t uid); -static void mode_in(struct cpio *); -static void mode_list(struct cpio *); +static void mode_in(struct cpio *) __LA_DEAD; +static void mode_list(struct cpio *) __LA_DEAD; static void mode_out(struct cpio *); static void mode_pass(struct cpio *, const char *); static const char *remove_leading_slash(const char *); static int restore_time(struct cpio *, struct archive_entry *, const char *, int fd); -static void usage(void); -static void version(void); +static void usage(void) __LA_DEAD; +static void version(void) __LA_DEAD; static const char * passphrase_callback(struct archive *, void *); static void passphrase_free(char *); Modified: vendor/libarchive/dist/cpio/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/cpio/test/CMakeLists.txt Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/cpio/test/CMakeLists.txt Thu Mar 2 21:13:25 2017 (r314567) @@ -62,6 +62,11 @@ IF(ENABLE_CPIO AND ENABLE_TEST) # Register target # ADD_EXECUTABLE(bsdcpio_test ${bsdcpio_test_SOURCES}) + IF(ENABLE_ACL) + IF(HAVE_LIBACL) + TARGET_LINK_LIBRARIES(bsdcpio_test ${ACL_LIBRARY}) + ENDIF(HAVE_LIBACL) + ENDIF(ENABLE_ACL) SET_PROPERTY(TARGET bsdcpio_test PROPERTY COMPILE_DEFINITIONS LIST_H) # Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive.h Thu Mar 2 21:13:25 2017 (r314567) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(vo /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.1" +#define ARCHIVE_VERSION_ONLY_STRING "3.3.2dev" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: vendor/libarchive/dist/libarchive/archive_check_magic.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_check_magic.c Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_check_magic.c Thu Mar 2 21:13:25 2017 (r314567) @@ -62,7 +62,7 @@ errmsg(const char *m) } } -static void +static __LA_DEAD void diediedie(void) { #if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) Modified: vendor/libarchive/dist/libarchive/archive_entry.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.c Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_entry.c Thu Mar 2 21:13:25 2017 (r314567) @@ -401,7 +401,7 @@ archive_entry_fflags_text(struct archive return (NULL); } -int64_t +la_int64_t archive_entry_gid(struct archive_entry *entry) { return (entry->ae_stat.aest_gid); @@ -502,7 +502,7 @@ _archive_entry_hardlink_l(struct archive return (archive_mstring_get_mbs_l(&entry->ae_hardlink, p, len, sc)); } -int64_t +la_int64_t archive_entry_ino(struct archive_entry *entry) { return (entry->ae_stat.aest_ino); @@ -514,7 +514,7 @@ archive_entry_ino_is_set(struct archive_ return (entry->ae_set & AE_SET_INO); } -int64_t +la_int64_t archive_entry_ino64(struct archive_entry *entry) { return (entry->ae_stat.aest_ino); @@ -627,7 +627,7 @@ archive_entry_rdevminor(struct archive_e return minor(entry->ae_stat.aest_rdev); } -int64_t +la_int64_t archive_entry_size(struct archive_entry *entry) { return (entry->ae_stat.aest_size); @@ -715,7 +715,7 @@ _archive_entry_symlink_l(struct archive_ return (archive_mstring_get_mbs_l( &entry->ae_symlink, p, len, sc)); } -int64_t +la_int64_t archive_entry_uid(struct archive_entry *entry) { return (entry->ae_stat.aest_uid); @@ -819,7 +819,7 @@ archive_entry_copy_fflags_text_w(struct } void -archive_entry_set_gid(struct archive_entry *entry, int64_t g) +archive_entry_set_gid(struct archive_entry *entry, la_int64_t g) { entry->stat_valid = 0; entry->ae_stat.aest_gid = g; @@ -868,7 +868,7 @@ _archive_entry_copy_gname_l(struct archi } void -archive_entry_set_ino(struct archive_entry *entry, int64_t ino) +archive_entry_set_ino(struct archive_entry *entry, la_int64_t ino) { entry->stat_valid = 0; entry->ae_set |= AE_SET_INO; @@ -876,7 +876,7 @@ archive_entry_set_ino(struct archive_ent } void -archive_entry_set_ino64(struct archive_entry *entry, int64_t ino) +archive_entry_set_ino64(struct archive_entry *entry, la_int64_t ino) { entry->stat_valid = 0; entry->ae_set |= AE_SET_INO; @@ -1209,7 +1209,7 @@ archive_entry_set_rdevminor(struct archi } void -archive_entry_set_size(struct archive_entry *entry, int64_t s) +archive_entry_set_size(struct archive_entry *entry, la_int64_t s) { entry->stat_valid = 0; entry->ae_stat.aest_size = s; @@ -1306,7 +1306,7 @@ _archive_entry_copy_symlink_l(struct arc } void -archive_entry_set_uid(struct archive_entry *entry, int64_t u) +archive_entry_set_uid(struct archive_entry *entry, la_int64_t u) { entry->stat_valid = 0; entry->ae_stat.aest_uid = u; Modified: vendor/libarchive/dist/libarchive/archive_entry.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.h Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_entry.h Thu Mar 2 21:13:25 2017 (r314567) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: vendor/libarchive/dist/libarchive/archive_entry_acl.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_acl.3 Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_entry_acl.3 Thu Mar 2 21:13:25 2017 (r314567) @@ -32,7 +32,7 @@ .Nm archive_entry_acl_clear , .Nm archive_entry_acl_count , .Nm archive_entry_acl_from_text , -.Nm archive_entry_acl_from_text_w, +.Nm archive_entry_acl_from_text_w , .Nm archive_entry_acl_next , .Nm archive_entry_acl_next_w , .Nm archive_entry_acl_reset , Modified: vendor/libarchive/dist/libarchive/archive_entry_paths.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_paths.3 Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_entry_paths.3 Thu Mar 2 21:13:25 2017 (r314567) @@ -31,25 +31,25 @@ .Nm archive_entry_set_hardlink , .Nm archive_entry_copy_hardlink , .Nm archive_entry_copy_hardlink_w , -.Nm archve_entry_update_hardlink_utf8 , +.Nm archive_entry_update_hardlink_utf8 , .Nm archive_entry_set_link , .Nm archive_entry_copy_link , .Nm archive_entry_copy_link_w , -.Nm archve_entry_update_link_utf8 , +.Nm archive_entry_update_link_utf8 , .Nm archive_entry_pathname , .Nm archive_entry_pathname_w , .Nm archive_entry_set_pathname , .Nm archive_entry_copy_pathname , .Nm archive_entry_copy_pathname_w , -.Nm archve_entry_update_pathname_utf8 , +.Nm archive_entry_update_pathname_utf8 , .Nm archive_entry_sourcepath , .Nm archive_entry_copy_sourcepath , -.Nm archive_entry_symlink, -.Nm archive_entry_symlink_w, +.Nm archive_entry_symlink , +.Nm archive_entry_symlink_w , .Nm archive_entry_set_symlink , .Nm archive_entry_copy_symlink , .Nm archive_entry_copy_symlink_w , -.Nm archve_entry_update_symlink_utf8 +.Nm archive_entry_update_symlink_utf8 .Nd functions for manipulating path names in archive entry descriptions .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) Modified: vendor/libarchive/dist/libarchive/archive_entry_perms.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry_perms.3 Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_entry_perms.3 Thu Mar 2 21:13:25 2017 (r314567) @@ -34,8 +34,8 @@ .Nm archive_entry_perm , .Nm archive_entry_set_perm , .Nm archive_entry_strmode , -.Nm archive_entry_uname -.Nm archive_entry_uname_w +.Nm archive_entry_uname , +.Nm archive_entry_uname_w , .Nm archive_entry_set_uname , .Nm archive_entry_copy_uname , .Nm archive_entry_copy_uname_w , Modified: vendor/libarchive/dist/libarchive/archive_platform.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_platform.h Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_platform.h Thu Mar 2 21:13:25 2017 (r314567) @@ -148,23 +148,31 @@ * POSIX.1e draft functions used in archive_read_extract.c. */ #if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE -#if HAVE_ACL_USER +#if HAVE_DECL_ACL_USER #define HAVE_POSIX_ACL 1 -#elif HAVE_ACL_TYPE_EXTENDED +#elif HAVE_DECL_ACL_TYPE_EXTENDED && HAVE_MEMBERSHIP_H #define HAVE_DARWIN_ACL 1 #endif +#if HAVE_DECL_ACL_TYPE_NFS4 +#define HAVE_FREEBSD_NFS4_ACL 1 +#endif #endif /* - * If this platform has , acl_get(), facl_get(), acl_set(), + * If this platform has , acl(), facl() and ACLENT_T * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions */ -#if HAVE_SYS_ACL_H && HAVE_ACL_GET && HAVE_FACL_GET && HAVE_ACL_SET && HAVE_FACL_SET && HAVE_ACLENT_T && HAVE_ACE_T +#if HAVE_SYS_ACL_H && HAVE_ACL && HAVE_FACL && HAVE_ACLENT_T && \ + HAVE_DECL_GETACL && HAVE_DECL_GETACLCNT && HAVE_DECL_SETACL #define HAVE_SUN_ACL 1 +#if HAVE_ACE_T && HAVE_DECL_ACE_GETACL && HAVE_DECL_ACE_GETACLCNT && \ + HAVE_DECL_ACE_SETACL +#define HAVE_SUN_NFS4_ACL 1 +#endif #endif /* Define if platform supports NFSv4 ACLs */ -#if (HAVE_POSIX_ACL && HAVE_ACL_TYPE_NFS4) || HAVE_SUN_ACL || HAVE_DARWIN_ACL +#if HAVE_FREEBSD_NFS4_ACL || HAVE_SUN_NFS4_ACL || HAVE_DARWIN_ACL #define HAVE_NFS4_ACL 1 #endif Modified: vendor/libarchive/dist/libarchive/archive_read_disk.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk.3 Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_read_disk.3 Thu Mar 2 21:13:25 2017 (r314567) @@ -37,10 +37,7 @@ .Nm archive_read_disk_uname , .Nm archive_read_disk_set_uname_lookup , .Nm archive_read_disk_set_gname_lookup , -.Nm archive_read_disk_set_standard_lookup , -.Nm archive_read_close , -.Nm archive_read_finish , -.Nm archive_read_free +.Nm archive_read_disk_set_standard_lookup .Nd functions for reading objects from disk .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -81,12 +78,6 @@ Streaming Archive Library (libarchive, - .Fa "int fd" .Fa "const struct stat *" .Fc -.Ft int -.Fn archive_read_close "struct archive *" -.Ft int -.Fn archive_read_finish "struct archive *" -.Ft int -.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide an API for reading information about objects on disk. @@ -181,17 +172,6 @@ using the currently registered lookup fu This affects the file ownership fields and ACL values in the .Tn struct archive_entry object. -.It Fn archive_read_close -Does nothing for -.Tn archive_read_disk -handles. -.It Fn archive_read_finish -This is a deprecated synonym for -.Fn archive_read_free . -.It Fn archive_read_free -Invokes -.Fn archive_read_close -if it was not invoked manually, then releases all resources. .El More information about the .Va struct archive Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Thu Mar 2 21:04:23 2017 (r314566) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Thu Mar 2 21:13:25 2017 (r314567) @@ -124,11 +124,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ #endif /* NFSv4 platform ACL type */ -#if HAVE_SUN_ACL -#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACE_T -#elif HAVE_DARWIN_ACL +#if HAVE_DARWIN_ACL #define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_EXTENDED -#elif HAVE_ACL_TYPE_NFS4 +#elif HAVE_FREEBSD_NFS4_ACL #define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_NFS4 #endif @@ -435,14 +433,71 @@ static void add_trivial_nfs4_acl(struct #if HAVE_SUN_ACL static int -sun_acl_is_trivial(acl_t *, mode_t, int *trivialp); +sun_acl_is_trivial(void *, int, mode_t, int, int, int *); + +static void * +sunacl_get(int cmd, int *aclcnt, int fd, const char *path) +{ + int cnt, cntcmd; + size_t size; + void *aclp; + + if (cmd == GETACL) { + cntcmd = GETACLCNT; + size = sizeof(aclent_t); + } +#if HAVE_SUN_NFS4_ACL + else if (cmd == ACE_GETACL) { + cntcmd = ACE_GETACLCNT; + size = sizeof(ace_t); + } #endif + else { + errno = EINVAL; + *aclcnt = -1; + return (NULL); + } + + aclp = NULL; + cnt = -2; + + while (cnt == -2 || (cnt == -1 && errno == ENOSPC)) { + if (path != NULL) + cnt = acl(path, cntcmd, 0, NULL); + else + cnt = facl(fd, cntcmd, 0, NULL); + + if (cnt > 0) { + if (aclp == NULL) + aclp = malloc(cnt * size); + else + aclp = realloc(NULL, cnt * size); + if (aclp != NULL) { + if (path != NULL) + cnt = acl(path, cmd, cnt, aclp); + else + cnt = facl(fd, cmd, cnt, aclp); + } + } else { + if (aclp != NULL) { + free(aclp); + aclp = NULL; + } + break; + } + } + + *aclcnt = cnt; + return (aclp); +} +#endif /* HAVE_SUN_ACL */ #if HAVE_POSIX_ACL || HAVE_NFS4_ACL static int translate_acl(struct archive_read_disk *a, struct archive_entry *entry, #if HAVE_SUN_ACL - acl_t *acl, + void *aclp, + int aclcnt, #else acl_t acl, #endif @@ -454,7 +509,8 @@ setup_acls(struct archive_read_disk *a, { const char *accpath; #if HAVE_SUN_ACL - acl_t *acl; + void *aclp; + int aclcnt; #else acl_t acl; #endif @@ -491,14 +547,17 @@ setup_acls(struct archive_read_disk *a, archive_entry_acl_clear(entry); +#if HAVE_SUN_ACL + aclp = NULL; +#else acl = NULL; +#endif #if HAVE_NFS4_ACL /* Try NFSv4 ACL first. */ if (*fd >= 0) #if HAVE_SUN_ACL - /* Solaris reads both POSIX.1e and NFSv4 ACL here */ - facl_get(*fd, 0, &acl); + aclp = sunacl_get(ACE_GETACL, &aclcnt, *fd, NULL); #elif HAVE_ACL_GET_FD_NP acl = acl_get_fd_np(*fd, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #else @@ -512,47 +571,62 @@ setup_acls(struct archive_read_disk *a, && (archive_entry_filetype(entry) == AE_IFLNK)) /* We can't get the ACL of a symlink, so we assume it can't have one. */ +#if HAVE_SUN_ACL + aclp = NULL; +#else acl = NULL; #endif +#endif /* !HAVE_ACL_GET_LINK_NP */ else #if HAVE_SUN_ACL /* Solaris reads both POSIX.1e and NFSv4 ACLs here */ - acl_get(accpath, 0, &acl); + aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, accpath); #else acl = acl_get_file(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); #endif -#if HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL /* Ignore "trivial" ACLs that just mirror the file mode. */ - if (acl != NULL) { #if HAVE_SUN_ACL - if (sun_acl_is_trivial(acl, archive_entry_mode(entry), - &r) == 0 && r == 1) + if (aclp != NULL && sun_acl_is_trivial(aclp, aclcnt, + archive_entry_mode(entry), 1, S_ISDIR(archive_entry_mode(entry)), + &r) == 0 && r == 1) { + free(aclp); + aclp = NULL; + return (ARCHIVE_OK); + } #elif HAVE_ACL_IS_TRIVIAL_NP - if (acl_is_trivial_np(acl, &r) == 0 && r == 1) -#endif - { - acl_free(acl); - acl = NULL; - /* - * Simultaneous NFSv4 and POSIX.1e ACLs for the same - * entry are not allowed, so we should return here - */ - return (ARCHIVE_OK); - } + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { + acl_free(acl); + acl = NULL; + return (ARCHIVE_OK); } -#endif /* HAVE_ACL_IS_TRIVIAL_NP || HAVE_SUN_ACL */ - if (acl != NULL) { - r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); +#endif + +#if HAVE_SUN_ACL + if (aclp != NULL) +#else + if (acl != NULL) +#endif + { + r = translate_acl(a, entry, +#if HAVE_SUN_ACL + aclp, aclcnt, +#else + acl, +#endif + ARCHIVE_ENTRY_ACL_TYPE_NFS4); +#if HAVE_SUN_ACL + free(aclp); + aclp = NULL; +#else acl_free(acl); + acl = NULL; +#endif + if (r != ARCHIVE_OK) { archive_set_error(&a->archive, errno, - "Couldn't translate " -#if !HAVE_SUN_ACL - "NFSv4 " -#endif - "ACLs"); + "Couldn't translate NFSv4 ACLs"); } #if HAVE_DARWIN_ACL /* @@ -569,12 +643,16 @@ setup_acls(struct archive_read_disk *a, } #endif /* HAVE_NFS4_ACL */ -#if HAVE_POSIX_ACL - /* This code path is skipped on MacOS and Solaris */ +#if HAVE_POSIX_ACL || HAVE_SUN_ACL + /* This code path is skipped on MacOS */ /* Retrieve access ACL from file. */ if (*fd >= 0) +#if HAVE_SUN_ACL + aclp = sunacl_get(GETACL, &aclcnt, *fd, NULL); +#else acl = acl_get_fd(*fd); +#endif #if HAVE_ACL_GET_LINK_NP else if (!a->follow_symlinks) acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); @@ -583,25 +661,56 @@ setup_acls(struct archive_read_disk *a, && (archive_entry_filetype(entry) == AE_IFLNK)) /* We can't get the ACL of a symlink, so we assume it can't have one. */ +#if HAVE_SUN_ACL + aclp = NULL; +#else acl = NULL; #endif +#endif /* !HAVE_ACL_GET_LINK_NP */ else +#if HAVE_SUN_ACL + aclp = sunacl_get(GETACL, &aclcnt, 0, accpath); +#else acl = acl_get_file(accpath, ACL_TYPE_ACCESS); +#endif + -#if HAVE_ACL_IS_TRIVIAL_NP /* Ignore "trivial" ACLs that just mirror the file mode. */ - if (acl != NULL && acl_is_trivial_np(acl, &r) == 0) { - if (r) { - acl_free(acl); - acl = NULL; - } +#if HAVE_SUN_ACL + if (aclp != NULL && sun_acl_is_trivial(aclp, aclcnt, + archive_entry_mode(entry), 0, S_ISDIR(archive_entry_mode(entry)), + &r) == 0 && r == 1) { + free(aclp); + aclp = NULL; + } +#elif HAVE_ACL_IS_TRIVIAL_NP + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { + acl_free(acl); + acl = NULL; } #endif - if (acl != NULL) { - r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); +#if HAVE_SUN_ACL + if (aclp != NULL) +#else + if (acl != NULL) +#endif + { + r = translate_acl(a, entry, +#if HAVE_SUN_ACL + aclp, aclcnt, +#else + acl, +#endif + ARCHIVE_ENTRY_ACL_TYPE_ACCESS); +#if HAVE_SUN_ACL + free(aclp); + aclp = NULL; +#else acl_free(acl); acl = NULL; +#endif + if (r != ARCHIVE_OK) { archive_set_error(&a->archive, errno, "Couldn't translate access ACLs"); @@ -609,6 +718,7 @@ setup_acls(struct archive_read_disk *a, } } +#if !HAVE_SUN_ACL /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { #if HAVE_ACL_GET_FD_NP @@ -628,7 +738,8 @@ setup_acls(struct archive_read_disk *a, } } } -#endif /* HAVE_POSIX_ACL */ +#endif /* !HAVE_SUN_ACL */ +#endif /* HAVE_POSIX_ACL || HAVE_SUN_ACL */ return (ARCHIVE_OK); } @@ -674,12 +785,14 @@ static const struct { {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, +#if HAVE_DECL_ACL_SYNCHRONIZE {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +#endif #else /* POSIX.1e ACL permissions */ {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -#if HAVE_ACL_TYPE_NFS4 /* FreeBSD NFSv4 ACL permissions */ +#if HAVE_FREEBSD_NFS4_ACL /* FreeBSD NFSv4 ACL permissions */ {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, @@ -708,14 +821,16 @@ static const struct { const int archive_inherit; const int platform_inherit; } acl_inherit_map[] = { -#if HAVE_SUN_ACL /* Solaris ACL inheritance flags */ +#if HAVE_SUN_NFS4_ACL /* Solaris ACL inheritance flags */ {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACE_DIRECTORY_INHERIT_ACE}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACE_NO_PROPAGATE_INHERIT_ACE}, {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACE_INHERIT_ONLY_ACE}, {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACE_SUCCESSFUL_ACCESS_ACE_FLAG}, {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACE_FAILED_ACCESS_ACE_FLAG}, +#ifdef ACE_INHERITED_ACE {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACE_INHERITED_ACE} +#endif #elif HAVE_DARWIN_ACL /* MacOS NFSv4 inheritance flags */ {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, @@ -730,7 +845,7 @@ static const struct { {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} -#endif /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ +#endif /* !HAVE_SUN_NFS4_ACL && !HAVE_DARWIN_ACL */ }; #endif /* HAVE_NFS4_ACL */ @@ -873,9 +988,11 @@ add_trivial_nfs4_acl(struct archive_entr * This is a FreeBSD acl_is_trivial_np() implementation for Solaris */ static int -sun_acl_is_trivial(acl_t *acl, mode_t mode, int *trivialp) +sun_acl_is_trivial(void *aclp, int aclcnt, mode_t mode, int is_nfs4, + int is_dir, int *trivialp) { int i, p; +#if HAVE_SUN_NFS4_ACL const uint32_t rperm = ACE_READ_DATA; const uint32_t wperm = ACE_WRITE_DATA | ACE_APPEND_DATA; const uint32_t eperm = ACE_EXECUTE; @@ -886,30 +1003,25 @@ sun_acl_is_trivial(acl_t *acl, mode_t mo ace_t *ace; ace_t tace[6]; +#endif - if (acl == NULL || trivialp == NULL) + if (aclp == NULL || trivialp == NULL) return (-1); *trivialp = 0; - /* ACL_IS_TRIVIAL flag must be set for both POSIX.1e and NFSv4 ACLs */ - if ((acl->acl_flags & ACL_IS_TRIVIAL) == 0) - return (0); - /* * POSIX.1e ACLs marked with ACL_IS_TRIVIAL are compatible with * FreeBSD acl_is_trivial_np(). On Solaris they have 4 entries, * including mask. */ - if (acl->acl_type == ACLENT_T) { - if (acl->acl_cnt == 4) + if (!is_nfs4) { + if (aclcnt == 4) *trivialp = 1; return (0); } - if (acl->acl_type != ACE_T || acl->acl_entry_size != sizeof(ace_t)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Mar 2 22:46:05 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D2C6CF6A94; Thu, 2 Mar 2017 22:46:05 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EE5D10A6; Thu, 2 Mar 2017 22:46:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v22Mk4Cn026338; Thu, 2 Mar 2017 22:46:04 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v22Mk4Qv026337; Thu, 2 Mar 2017 22:46:04 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703022246.v22Mk4Qv026337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 2 Mar 2017 22:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314570 - vendor/libarchive/dist/tar/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 22:46:05 -0000 Author: mm Date: Thu Mar 2 22:46:03 2017 New Revision: 314570 URL: https://svnweb.freebsd.org/changeset/base/314570 Log: Update vendor/libarchive to git f4b9b3fe89b4acfef5e3a2283d3bc542315ddb57 Fixes for test_options_fflags tar test Modified: vendor/libarchive/dist/tar/test/test_option_fflags.c Modified: vendor/libarchive/dist/tar/test/test_option_fflags.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_fflags.c Thu Mar 2 22:42:59 2017 (r314569) +++ vendor/libarchive/dist/tar/test/test_option_fflags.c Thu Mar 2 22:46:03 2017 (r314570) @@ -25,6 +25,31 @@ #include "test.h" __FBSDID("$FreeBSD$"); +static void +clear_fflags(const char *pathname) +{ +#if defined(HAVE_STRUCT_STAT_ST_FLAGS) + chflags(pathname, 0); +#elif (defined(FS_IOC_GETFLAGS) && defined(HAVE_WORKING_FS_IOC_GETFLAGS)) || \ + (defined(EXT2_IOC_GETFLAGS) && defined(HAVE_WORKING_EXT2_IOC_GETFLAGS)) + int fd; + + fd = open(pathname, O_RDONLY | O_NONBLOCK); + if (fd < 0) + return; + ioctl(fd, +#ifdef FS_IOC_GETFLAGS + FS_IOC_GETFLAGS, +#else + EXT2_IOC_GETFLAGS, +#endif + 0); +#else + (void)pathname; /* UNUSED */ +#endif + return; +} + DEFINE_TEST(test_option_fflags) { int r; @@ -40,6 +65,9 @@ DEFINE_TEST(test_option_fflags) /* Set nodump flag on the file */ assertSetNodump("f"); + /* FreeBSD ZFS workaround: ZFS sets uarch on all touched files and dirs */ + chmod("f", 0644); + /* Archive it with fflags */ r = systemf("%s -c --fflags -f fflags.tar f >fflags.out 2>fflags.err", testprog); assertEqualInt(r, 0); @@ -50,24 +78,28 @@ DEFINE_TEST(test_option_fflags) /* Extract fflags with fflags */ assertMakeDir("fflags_fflags", 0755); + clear_fflags("fflags_fflags"); r = systemf("%s -x -C fflags_fflags --no-same-permissions --fflags -f fflags.tar >fflags_fflags.out 2>fflags_fflags.err", testprog); assertEqualInt(r, 0); assertEqualFflags("f", "fflags_fflags/f"); /* Extract fflags without fflags */ assertMakeDir("fflags_nofflags", 0755); + clear_fflags("fflags_nofflags"); r = systemf("%s -x -C fflags_nofflags -p --no-fflags -f fflags.tar >fflags_nofflags.out 2>fflags_nofflags.err", testprog); assertEqualInt(r, 0); assertUnequalFflags("f", "fflags_nofflags/f"); /* Extract nofflags with fflags */ assertMakeDir("nofflags_fflags", 0755); + clear_fflags("nofflags_fflags"); r = systemf("%s -x -C nofflags_fflags --no-same-permissions --fflags -f nofflags.tar >nofflags_fflags.out 2>nofflags_fflags.err", testprog); assertEqualInt(r, 0); assertUnequalFflags("f", "nofflags_fflags/f"); /* Extract nofflags with nofflags */ assertMakeDir("nofflags_nofflags", 0755); + clear_fflags("nofflags_nofflags"); r = systemf("%s -x -C nofflags_nofflags -p --no-fflags -f nofflags.tar >nofflags_nofflags.out 2>nofflags_nofflags.err", testprog); assertEqualInt(r, 0); assertUnequalFflags("f", "nofflags_nofflags/f"); From owner-svn-src-vendor@freebsd.org Fri Mar 3 18:34:55 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60701CF751F; Fri, 3 Mar 2017 18:34:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEFA5171D; Fri, 3 Mar 2017 18:34:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v23IYss4017621; Fri, 3 Mar 2017 18:34:54 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v23IYr7N017612; Fri, 3 Mar 2017 18:34:53 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201703031834.v23IYr7N017612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 3 Mar 2017 18:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314608 - in vendor-sys/acpica/dist: . generate/unix source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/componen... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 18:34:55 -0000 Author: jkim Date: Fri Mar 3 18:34:52 2017 New Revision: 314608 URL: https://svnweb.freebsd.org/changeset/base/314608 Log: Import ACPICA 20170303. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/acgetline.c vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahtable.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/cmfsize.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllistsup.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmaputils.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslprune.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/aslxrefout.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbtest.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utascii.c vendor-sys/acpica/dist/source/components/utilities/utbuffer.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/acclib.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acconvert.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acdragonfly.h vendor-sys/acpica/dist/source/include/platform/acdragonflyex.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acenvex.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/acgccex.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/include/platform/acmacosx.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acmsvcex.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acqnx.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osgendbg.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahaml.c vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahasl.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahgrammar.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c vendor-sys/acpica/dist/source/tools/efihello/efihello.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/source/tools/examples/examples.h vendor-sys/acpica/dist/source/tools/examples/exstubs.c vendor-sys/acpica/dist/source/tools/examples/extables.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/changes.txt Fri Mar 3 18:34:52 2017 (r314608) @@ -1,4 +1,44 @@ ---------------------------------------- +03 March 2017. Summary of changes for version 20170303: + + +0) ACPICA licensing: + +The licensing information at the start of each source code module has +been updated. In addition to the Intel license, the dual GPLv2/BSD +license has been added for completeness. Now, a single version of the +source code should be suitable for all ACPICA customers. This is the +major change for this release since it affects all source code modules. + + +1) ACPICA kernel-resident subsystem: + +Fixed two issues with the common asltypes.h header that could cause +problems in some environments: (Kim Jung-uk) + Removed typedef for YY_BUFFER_STATE ? + Fixes an error with earlier versions of Flex. + Removed use of FILE typedef (which is only defined in stdio.h) + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: fixed a regression introduced in 20170224. A fix for a +memory leak related to resource descriptor tags (names) could fault when +the disassembler was generated with 64-bit compilers. + +The ASLTS test suite has been updated to implement a new testing +architecture. During generation of the suite from ASL source, both the +ASL and ASL+ compilers are now validated, as well as the disassembler +itself (Erik Schmauss). The architecture executes as follows: + + For every ASL source module: + Compile (legacy ASL compilation) + Disassemble the resulting AML to ASL+ source code + Compile the new ASL+ module + Perform a binary compare on the legacy AML and the new ASL+ AML + The ASLTS suite then executes normally using the AML binaries. + +---------------------------------------- 24 February 2017. Summary of changes for version 20170224: Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Fri Mar 3 18:34:52 2017 (r314608) @@ -148,6 +148,15 @@ ACPICA_HEADERS = \ OPT_CFLAGS ?= $(CWARNINGFLAGS) # +# Common compiler flags +# The _GNU_SOURCE symbol is required for many hosts. +# +ifeq ($(M32),TRUE) +CFLAGS +=-m32 +LDFLAGS +=-m32 +endif + +# # Optionally disable optimizations. Optimization causes problems on # some compilers such as gcc 4.4 # Modified: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/acfileio.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +131,23 @@ * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ #include "acpi.h" #include "accommon.h" Modified: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/acgetline.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +131,23 @@ * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ #include "acpi.h" #include "accommon.h" Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/adfile.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +131,23 @@ * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ #include "aslcompiler.h" #include "acpi.h" Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +131,23 @@ * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ #include "aslcompiler.h" #include "amlcode.h" @@ -122,24 +230,36 @@ AdInitialize ( Status = AcpiOsInitialize (); if (ACPI_FAILURE (Status)) { + fprintf (stderr, "Could not initialize ACPICA subsystem: %s\n", + AcpiFormatException (Status)); + return (Status); } Status = AcpiUtInitGlobals (); if (ACPI_FAILURE (Status)) { + fprintf (stderr, "Could not initialize ACPICA globals: %s\n", + AcpiFormatException (Status)); + return (Status); } Status = AcpiUtMutexInitialize (); if (ACPI_FAILURE (Status)) { + fprintf (stderr, "Could not initialize ACPICA mutex objects: %s\n", + AcpiFormatException (Status)); + return (Status); } Status = AcpiNsRootInitialize (); if (ACPI_FAILURE (Status)) { + fprintf (stderr, "Could not initialize ACPICA namespace: %s\n", + AcpiFormatException (Status)); + return (Status); } @@ -149,7 +269,7 @@ AdInitialize ( AcpiGbl_RootTableList.CurrentTableCount = 0; AcpiGbl_RootTableList.Tables = LocalTables; - return (Status); + return (AE_OK); } Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/adwalk.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -23,23 +131,23 @@ * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ #include "acpi.h" #include "accommon.h" Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Fri Mar 3 18:34:20 2017 (r314607) +++ vendor-sys/acpica/dist/source/common/ahids.c Fri Mar 3 18:34:52 2017 (r314608) @@ -4,10 +4,118 @@ * *****************************************************************************/ -/* - * Copyright (C) 2000 - 2017, Intel Corp. +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Mar 3 18:36:19 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F839CF75AF; Fri, 3 Mar 2017 18:36:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB2D518B8; Fri, 3 Mar 2017 18:36:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v23IaIdJ017722; Fri, 3 Mar 2017 18:36:18 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v23IaIx3017721; Fri, 3 Mar 2017 18:36:18 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201703031836.v23IaIx3017721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 3 Mar 2017 18:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314609 - vendor-sys/acpica/20170303 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 18:36:19 -0000 Author: jkim Date: Fri Mar 3 18:36:17 2017 New Revision: 314609 URL: https://svnweb.freebsd.org/changeset/base/314609 Log: Tag ACPICA 20170303. Added: vendor-sys/acpica/20170303/ - copied from r314608, vendor-sys/acpica/dist/