From patchwork Fri Feb 2 13:27:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 195861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp425702dyc; Fri, 2 Feb 2024 05:28:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1S7UWu4ToaehOKsdcCMWcTlZat+FK4QTpaxxYwNuT2od6bCkJXbK0sn1xgedyIYv3ts1t X-Received: by 2002:ac8:59d5:0:b0:42b:fbfe:f6ee with SMTP id f21-20020ac859d5000000b0042bfbfef6eemr3893115qtf.41.1706880536735; Fri, 02 Feb 2024 05:28:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706880536; cv=pass; d=google.com; s=arc-20160816; b=gYz4rDp7P4sHivUsebiJjrUMEos9G+it0p5m9alS8JM6XjV5DUjnlwyPOyVxRKOwd6 wZifoDKUO0eiROBnwMJcd2kxn/Mo0R7o/XRYvc+ABJ0o6JfCHT1pCuIvG30LO9W77KRC xFNHmXNfL/CjC13fCnO/Bm8+l5XjOwWRjhOCVnK3IiGVFRhLdY9ejgYxSrBpUHwhemoX 6mj2H2ZV0knIUIrhElQ+Qx7eP8v0ZIuAqjpolbnsA7VaUg6USF+ABmAh006KewEKTR2z h0IB01OXpQBn8JRskcY3QvDJLBK3HkkWA2W+6b2EPtm/5hflrBHiE1riaKtR+IrpAWCn Bocw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=QSzSwdJ2murlE0Owodi2pw+w0czYhEqppQNmsPZ3sxM=; fh=SpxnaTR3SzF1uFoSMNku1lkCZcYax9AVpYo8FshA9TY=; b=lk3c6mENqM2IicMxPuZBAC+/KV+BhOOgWU/tY7tArOlB/qwAcb93tWyR1NiJKBbBJY 5zkppRnp3m1ncnH0oASPSInnhp2nGt9ASSNl5OvN5+m8YGNdGDR5irflyyc5CkzF34Wl AAI2pPiWxl2P4EP//lES+YWRZjBi+RjOSbQEqP48RJd0NZONIv/ySOQdht6ea5MddF6P G61Kf143aVHVPm1DuGeoUgiOjzyVQq+eOtLt3GPyMjOKACPDyEYnIhBZ/2iQF0cHM5RU tJ/ohCoYIUadmf/35ozv6C5yPVmk99pAwwGUhShc+YvRjCZftYHm6iWabz/u/GpSOFqO d+yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GlZJUTtk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUrmm2zXKxIxM8Q+43YNqyp8wYGltqw7fSYLJg3pa43WSaJXj9pvE4cxqS1ZWT/PNabvEyjj/azk+JY7hi5tpGDMBIIiQ== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id x8-20020ac85f08000000b0042a1115649dsi2034747qta.211.2024.02.02.05.28.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GlZJUTtk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AB273857B87 for ; Fri, 2 Feb 2024 13:28:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8DFE43858020 for ; Fri, 2 Feb 2024 13:27:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DFE43858020 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DFE43858020 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706880482; cv=none; b=bBcotkharkLa1RVpoLR1Ik5/E95RwRBJn0L+qFpPUS6Nv7OWGEiHnB3myKzC/oSR2Il2ev79lmgJ5Bu5hOsQ4ki2m2OioBTHHn4q8BGXsGuKCb1v1B7mlvTymt3q8yGybJurn0wCwMSdDLDddB7mR9u9Q/AEUdBIREqCj6AMUic= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706880482; c=relaxed/simple; bh=XfXNudFRWYrdMmIBNqOEgXTGo8zYZ19AiTtE959jHlg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=NAkSaot4U51rNh1kONH2Z8r9jOhwBfX+gIKkP8nS0ue/aba3v605mvB9mwPP0oY01/8TYkbh3V01PWaGKjd7w915c255SNqQlK1RjTclx7FSVezC9CUajw/181BSTEQjh73j2DQYGKwFrO4sXTeMx9N1cH0QeJjuzhQiQ/cQzUU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706880479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSzSwdJ2murlE0Owodi2pw+w0czYhEqppQNmsPZ3sxM=; b=GlZJUTtkIhZj8ebJfQEr/X6ZJEaI2iL4CqSdfwH8NwoXsvWVZTau+KLMOaANHLQzVqkjzB zyeeOxvJVpkFjwN37tM4fcmigBgqo0LWuzavq+YlcAq/z52ikyIdAzyzBYMLElWoqQtjUX O8zFt40D3waOOX8Ht9FhY98yvaM3zz0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-114-REN5_JrVPsOChe3Qfk_mbg-1; Fri, 02 Feb 2024 08:27:56 -0500 X-MC-Unique: REN5_JrVPsOChe3Qfk_mbg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CFE2C1C060CD; Fri, 2 Feb 2024 13:27:55 +0000 (UTC) Received: from localhost (unknown [10.42.28.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D5FD492BE5; Fri, 2 Feb 2024 13:27:55 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Add copyright and license text to new generated headers Date: Fri, 2 Feb 2024 13:27:12 +0000 Message-ID: <20240202132750.2282701-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789793965909081995 X-GMAIL-MSGID: 1789793965909081995 These new headers should probably have the usual boilerplate at the top, so make the Python scripts output it. -- >8 -- contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Add copyright and license text to the output. libstdc++-v3/ChangeLog: * include/bits/text_encoding-data.h: Regenerate. * include/bits/unicode-data.h: Regenerate. * scripts/gen_text_encoding_data.py: Add copyright and license text to the output. --- contrib/unicode/gen_libstdcxx_unicode_data.py | 30 ++++++++++++++++++- .../include/bits/text_encoding-data.h | 27 +++++++++++++++++ libstdc++-v3/include/bits/unicode-data.h | 27 +++++++++++++++++ .../scripts/gen_text_encoding_data.py | 30 ++++++++++++++++++- 4 files changed, 112 insertions(+), 2 deletions(-) diff --git a/contrib/unicode/gen_libstdcxx_unicode_data.py b/contrib/unicode/gen_libstdcxx_unicode_data.py index f2f2f8a8ec2..2341a442f6a 100755 --- a/contrib/unicode/gen_libstdcxx_unicode_data.py +++ b/contrib/unicode/gen_libstdcxx_unicode_data.py @@ -30,7 +30,35 @@ import sys import re import math -print("// Generated by contrib/unicode/gen_std_format_width.py, do not edit.\n") +print("""// Generated by contrib/unicode/gen_std_format_width.py, do not edit. + +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/unicode-data.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{format} + */ +""") print("#ifndef _GLIBCXX_GET_UNICODE_DATA") print('# error "This is not a public header, do not include it directly"') print("#elif _GLIBCXX_GET_UNICODE_DATA != 150100") diff --git a/libstdc++-v3/include/bits/text_encoding-data.h b/libstdc++-v3/include/bits/text_encoding-data.h index 5041e738d21..81bd94e6c3a 100644 --- a/libstdc++-v3/include/bits/text_encoding-data.h +++ b/libstdc++-v3/include/bits/text_encoding-data.h @@ -1,5 +1,32 @@ // Generated by gen_text_encoding_data.py, do not edit. +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/text_encoding-data.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{text_encoding} + */ + #ifndef _GLIBCXX_GET_ENCODING_DATA # error "This is not a public header, do not include it directly" #endif diff --git a/libstdc++-v3/include/bits/unicode-data.h b/libstdc++-v3/include/bits/unicode-data.h index 83968096499..69b8f2926c3 100644 --- a/libstdc++-v3/include/bits/unicode-data.h +++ b/libstdc++-v3/include/bits/unicode-data.h @@ -1,5 +1,32 @@ // Generated by contrib/unicode/gen_std_format_width.py, do not edit. +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/unicode-data.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{format} + */ + #ifndef _GLIBCXX_GET_UNICODE_DATA # error "This is not a public header, do not include it directly" #elif _GLIBCXX_GET_UNICODE_DATA != 150100 diff --git a/libstdc++-v3/scripts/gen_text_encoding_data.py b/libstdc++-v3/scripts/gen_text_encoding_data.py index f0ebb42d8c2..13792b5f5e7 100755 --- a/libstdc++-v3/scripts/gen_text_encoding_data.py +++ b/libstdc++-v3/scripts/gen_text_encoding_data.py @@ -31,7 +31,35 @@ if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0], file=sys.stderr) sys.exit(1) -print("// Generated by gen_text_encoding_data.py, do not edit.\n") +print("""// Generated by gen_text_encoding_data.py, do not edit. + +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file bits/text_encoding-data.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{text_encoding} + */ +""") print("#ifndef _GLIBCXX_GET_ENCODING_DATA") print('# error "This is not a public header, do not include it directly"') print("#endif\n")