From: Pierre-Emmanuel Patry Date: Mon, 11 Sep 2023 10:13:01 +0000 (+0200) Subject: gccrs: Add license text to libproc_macro rust interface X-Git-Tag: basepoints/gcc-15~2122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a2219668d26d9b2191b1e7ef9627b589efb3c86;p=thirdparty%2Fgcc.git gccrs: Add license text to libproc_macro rust interface The license text was missing in rust files producing the libproc_macro interface to the libproc_macro_internal library. libgrust/ChangeLog: * libproc_macro/bridge.rs: Add license text. * libproc_macro/bridge/ffistring.rs: Likewise. * libproc_macro/bridge/group.rs: Likewise. * libproc_macro/bridge/ident.rs: Likewise. * libproc_macro/bridge/literal.rs: Likewise. * libproc_macro/bridge/punct.rs: Likewise. * libproc_macro/bridge/span.rs: Likewise. * libproc_macro/bridge/token_stream.rs: Likewise. * libproc_macro/group.rs: Likewise. * libproc_macro/ident.rs: Likewise. * libproc_macro/lib.rs: Likewise. * libproc_macro/literal.rs: Likewise. * libproc_macro/punct.rs: Likewise. * libproc_macro/span.rs: Likewise. * libproc_macro/token_stream.rs: Likewise. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/libgrust/libproc_macro/bridge.rs b/libgrust/libproc_macro/bridge.rs index 3900ae1884b5..4f33af187eac 100644 --- a/libgrust/libproc_macro/bridge.rs +++ b/libgrust/libproc_macro/bridge.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + pub mod ffistring; pub mod group; pub mod ident; diff --git a/libgrust/libproc_macro/bridge/ffistring.rs b/libgrust/libproc_macro/bridge/ffistring.rs index 73162e901fed..09de02a026f6 100644 --- a/libgrust/libproc_macro/bridge/ffistring.rs +++ b/libgrust/libproc_macro/bridge/ffistring.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use std::convert::TryInto; use std::ffi::c_uchar; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/group.rs b/libgrust/libproc_macro/bridge/group.rs index 254a3db746d2..007c3c6b574d 100644 --- a/libgrust/libproc_macro/bridge/group.rs +++ b/libgrust/libproc_macro/bridge/group.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge::span::Span; use bridge::token_stream::TokenStream; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/ident.rs b/libgrust/libproc_macro/bridge/ident.rs index d58896dbd3e5..465fe3bfdb69 100644 --- a/libgrust/libproc_macro/bridge/ident.rs +++ b/libgrust/libproc_macro/bridge/ident.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge::ffistring::FFIString; use bridge::span::Span; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/literal.rs b/libgrust/libproc_macro/bridge/literal.rs index 598250489705..4a108cc05583 100644 --- a/libgrust/libproc_macro/bridge/literal.rs +++ b/libgrust/libproc_macro/bridge/literal.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge::{ffistring::FFIString, span::Span}; use std::fmt; use std::str::FromStr; diff --git a/libgrust/libproc_macro/bridge/punct.rs b/libgrust/libproc_macro/bridge/punct.rs index e835472f233a..ebe5ed401f12 100644 --- a/libgrust/libproc_macro/bridge/punct.rs +++ b/libgrust/libproc_macro/bridge/punct.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge::span::Span; use std::convert::TryFrom; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/span.rs b/libgrust/libproc_macro/bridge/span.rs index 06537c93d69b..f22b4e7dffa5 100644 --- a/libgrust/libproc_macro/bridge/span.rs +++ b/libgrust/libproc_macro/bridge/span.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + //! Bridge internal span representation and functions //! //! # Note diff --git a/libgrust/libproc_macro/bridge/token_stream.rs b/libgrust/libproc_macro/bridge/token_stream.rs index 094f91f13701..42cba6264ce6 100644 --- a/libgrust/libproc_macro/bridge/token_stream.rs +++ b/libgrust/libproc_macro/bridge/token_stream.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge::{ffistring::FFIString, group::Group, ident::Ident, literal::Literal, punct::Punct}; use std::convert::TryInto; use std::fmt; diff --git a/libgrust/libproc_macro/group.rs b/libgrust/libproc_macro/group.rs index 29bfb9d7132f..46286d566ce8 100644 --- a/libgrust/libproc_macro/group.rs +++ b/libgrust/libproc_macro/group.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge; use std::fmt; use Span; diff --git a/libgrust/libproc_macro/ident.rs b/libgrust/libproc_macro/ident.rs index 809c9939e09b..21a3a999ead9 100644 --- a/libgrust/libproc_macro/ident.rs +++ b/libgrust/libproc_macro/ident.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge; use std::fmt; use Span; diff --git a/libgrust/libproc_macro/lib.rs b/libgrust/libproc_macro/lib.rs index a1be0ac57e7a..8b7662a8337f 100644 --- a/libgrust/libproc_macro/lib.rs +++ b/libgrust/libproc_macro/lib.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + pub use group::{Delimiter, Group}; pub use ident::Ident; pub use literal::Literal; diff --git a/libgrust/libproc_macro/literal.rs b/libgrust/libproc_macro/literal.rs index 171ca56536e6..05cc28b1af24 100644 --- a/libgrust/libproc_macro/literal.rs +++ b/libgrust/libproc_macro/literal.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge; use std::fmt; use std::str::FromStr; diff --git a/libgrust/libproc_macro/punct.rs b/libgrust/libproc_macro/punct.rs index 0f7830e0f7c9..40c378e10d94 100644 --- a/libgrust/libproc_macro/punct.rs +++ b/libgrust/libproc_macro/punct.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge; use std::convert::TryInto; use std::fmt; diff --git a/libgrust/libproc_macro/span.rs b/libgrust/libproc_macro/span.rs index b5d573cc5afe..5ea2db85af58 100644 --- a/libgrust/libproc_macro/span.rs +++ b/libgrust/libproc_macro/span.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + use bridge; use std::fmt; diff --git a/libgrust/libproc_macro/token_stream.rs b/libgrust/libproc_macro/token_stream.rs index 9333e3ea2fc1..4981ddebb737 100644 --- a/libgrust/libproc_macro/token_stream.rs +++ b/libgrust/libproc_macro/token_stream.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro 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 +// . + //! Public implementation details for the `TokenStream` type, such as iterators. use bridge; use std::convert::TryInto;