diff options
author | MySQL Build Team <build@mysql.com> | 2009-06-04 18:47:38 +0200 |
---|---|---|
committer | MySQL Build Team <build@mysql.com> | 2009-06-04 18:47:38 +0200 |
commit | 8ad237190a8d3ae259570a9018de06cad76becc6 (patch) | |
tree | 1cd8246b31eaf2ef21d833ff366fe214edb2bdd7 | |
parent | 508084bca621a1ad80ba23a49d6d33414fe5f837 (diff) | |
download | mariadb-git-8ad237190a8d3ae259570a9018de06cad76becc6.tar.gz |
Some portability fixes.
include/Makefile.am: use @PERL@ to call scripts/dheadgen.pl - don't rely on #! /usr/bin/perl
scripts/dheadgen.pl: use 2-arg open() for compatibility with older Perl versions
storage/innobase/srv/srv0srv.c: Don't use C++-style comments in C code
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/dheadgen.pl | 12 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.c | 22 |
3 files changed, 18 insertions, 18 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 214ef8862e9..dd6f53f7ca2 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -87,7 +87,7 @@ probes_mysql_dtrace.h: $(DTRACEPROVIDER) endif probes_mysql_nodtrace.h: $(DTRACEPROVIDER) - $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@ + @PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@ # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/scripts/dheadgen.pl b/scripts/dheadgen.pl index 5ead0f90a31..374b232a04e 100755 --- a/scripts/dheadgen.pl +++ b/scripts/dheadgen.pl @@ -267,23 +267,23 @@ usage() if ($infile !~ /(.+)\.d$/); # If the system has native support for DTrace, we'll use that binary instead. # if (-x '/usr/sbin/dtrace' && !$force) { - open(my $dt, '-|', "/usr/sbin/dtrace -C -h -s $infile -o /dev/stdout") + open(DTRACE, "-| /usr/sbin/dtrace -C -h -s $infile -o /dev/stdout") or die "can't invoke dtrace(1M)"; - while (<$dt>) { + while (<DTRACE>) { emit_dtrace($_); } - close($dt); + close(DTRACE); exit(0); } emit_prologue($infile); -open(my $d, '<', $infile) or die "couldn't open $infile"; -@lines = <$d>; -close($d); +open(D, "< $infile") or die "couldn't open $infile"; +@lines = <D>; +close(D); while (1) { my $nl = 0; diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index e0fe6f40197..21aafcfd7d7 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -422,28 +422,28 @@ FILE* srv_misc_tmpfile; ulint srv_main_thread_process_no = 0; ulint srv_main_thread_id = 0; -// The following count work done by srv_master_thread. +/* The following count work done by srv_master_thread. */ -// Iterations by the 'once per second' loop. +/* Iterations by the 'once per second' loop */ ulint srv_main_1_second_loops = 0; -// Calls to sleep by the 'once per second' loop. +/* Calls to sleep by the 'once per second' loop */ ulint srv_main_sleeps = 0; -// Iterations by the 'once per 10 seconds' loop. +/* Iterations by the 'once per 10 seconds' loop */ ulint srv_main_10_second_loops = 0; -// Iterations of the loop bounded by the 'background_loop' label. +/* Iterations of the loop bounded by the 'background_loop' label */ ulint srv_main_background_loops = 0; -// Iterations of the loop bounded by the 'flush_loop' label. +/* Iterations of the loop bounded by the 'flush_loop' label */ ulint srv_main_flush_loops = 0; -// Calls to log_buffer_flush_to_disk. +/* Calls to log_buffer_flush_to_disk */ ulint srv_sync_flush = 0; -// Calls to log_buffer_flush_maybe_sync. +/* Calls to log_buffer_flush_maybe_sync */ ulint srv_async_flush = 0; -// Number of microseconds threads wait because of -// innodb_thread_concurrency +/* Number of microseconds threads wait because of +innodb_thread_concurrency */ static ib_longlong srv_thread_wait_mics = 0; -// Number of microseconds for spinlock delay +/* Number of microseconds for spinlock delay */ static ib_longlong srv_timed_spin_delay = 0; /* |