VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1l/util/mkbuildinf.pl@ 95000

Last change on this file since 95000 was 91772, checked in by vboxsync, 3 years ago

openssl-1.1.1l: Applied and adjusted our OpenSSL changes to 1.1.1l. bugref:10126

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

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