This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with -std=gnu99 to get the proper definitions of struct addrinfo | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <netinet/in.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use with a default value as in: | |
// runningScalaVersion getOrElse "2.8.0" | |
lazy val runningScalaVersion = { | |
val matcher = """version (\d+\.\d+\.\d+).*""".r | |
util.Properties.versionString match { | |
case matcher(vsn) => Some(vsn) | |
case _ => None | |
} | |
} |