File:  [MW Coherent from dump] / coherent / g / usr / lib / misc / ifcoh.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Return 1 if under Coherent else 0.
 */
#include	<sys/utsname.h>
#include	<string.h>

if_COHERENT()
{
	static char OS_VERSION[] = "COHERENT";
	struct utsname	tsname;

	if (uname(&tsname) < 0)
		return (0);
	return (!strncmp(tsname.version, OS_VERSION, sizeof(OS_VERSION) - 1));
}

#ifdef TEST
main()
{
	puts(if_COHERENT()
		? "Congratulations! This is COHERENT!"
		: "You fool! This is not COHERENT!");
}
#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.