VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/util/mkbuildinf.pl@ 97673

最後變更 在這個檔案從97673是 94082,由 vboxsync 提交於 3 年 前

libs/openssl-3.0.1: started applying and adjusting our OpenSSL changes to 3.0.1. bugref:10128

  • 屬性 svn:executable 設為 *
檔案大小: 1.5 KB
 
1#! /usr/bin/env perl
2# Copyright 2014-2017 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 ($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 Apache License 2.0 (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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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