VirtualBox

source: vbox/trunk/src/libs/openssl-3.4.1/util/mkbuildinf.pl@ 109052

Last change on this file since 109052 was 109052, checked in by vboxsync, 3 weeks ago

openssl-3.4.1: Applied our changes, regenerated files, added missing files and functions. This time with a three way merge. ​bugref:10890

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1#! /usr/bin/env perl
2# Copyright 2014-2025 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9use strict;
10use warnings;
11
12my $platform = pop @ARGV;
13my $cflags = join(' ', @ARGV);
14$cflags =~ s(\\)(\\\\)g;
15$cflags = "compiler: $cflags";
16
17# Use the value of the envvar SOURCE_DATE_EPOCH, even if it's
18# zero or the empty string.
19my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} // time()) . " UTC";
20
21print <<"END_OUTPUT";
22/*
23 * WARNING: do not edit!
24 * Generated by util/mkbuildinf.pl
25 *
26 * Copyright 2014-2025 The OpenSSL Project Authors. All Rights Reserved.
27 *
28 * Licensed under the Apache License 2.0 (the "License"). You may not use
29 * this file except in compliance with the License. You can obtain a copy
30 * in the file LICENSE in the source distribution or at
31 * https://www.openssl.org/source/license.html
32 */
33
34#define PLATFORM "platform: $platform"
35#define DATE "built on: $date"
36
37/*
38 * Generate compiler_flags as an array of individual characters. This is a
39 * workaround for the situation where CFLAGS gets too long for a C90 string
40 * literal
41 */
42static const char compiler_flags[] = {
43END_OUTPUT
44
45my $ctr = 0;
46foreach my $c (split //, $cflags) {
47 $c =~ s|([\\'])|\\$1|;
48 # Max 16 characters per line
49 if (($ctr++ % 16) == 0) {
50 if ($ctr != 1) {
51 print "\n";
52 }
53 print " ";
54 }
55 print "'$c',";
56}
57print <<"END_OUTPUT";
58'\\0'
59};
60END_OUTPUT
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette