#!/usr/bin/perl -w # Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) use strict; open(my $fh, "<../include/boost/asio/detail/config.hpp") or die("can't open config.hpp"); my $current_comment = ""; my %has_macros = (); my %disable_macros = (); while (my $line = <$fh>) { chomp($line); if ($line =~ /^$/) { $current_comment = ""; } elsif ($line =~ /^\/\/ (.*)$/) { $current_comment = $current_comment . $1 . "\n"; } elsif ($line =~ /^# *define *BOOST_ASIO_HAS_([A-Z-0-9_]*) 1/) { if (not defined($has_macros{$1})) { $has_macros{$1} = $current_comment; } } elsif ($line =~ /BOOST_ASIO_DISABLE_([A-Z-0-9_]*)/) { $disable_macros{$1} = 1; } } my $intro = <