All pastes #762009 Raw Edit

Perl and Inline::C

public text v1 · immutable
·published 2007-11-05 07:10 UTC
rendered paste body
#!/usr/bin/perl
use warnings;
use strict;
use Inline C => <<'__END_C__';

void ehlo_linux() {
  printf("Ehlo Linux!\n");
}

__END_C__

use Inline C => <<'__END_C__';

void ehlo_no() {
  printf("Ehlo Again!\n");
}
__END_C__

use Filter::cpp;

#ifdef __linux__
ehlo_linux;
#else
ehlo_no;
#endif