File: socket

package info (click to toggle)
firedns 0.9.12-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,192 kB
  • ctags: 322
  • sloc: ansic: 4,026; sh: 964; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#require compiletest
#require cflags
#phase init
#after init_cflags
#phase header
case $PHASE in
	init)
		dispn "Checking to see if compiler needs -lsocket -lnsl..."
		PROGRAM="#include <sys/types.h>
#include <sys/socket.h>
int main () {
	socket(0,0,0);
	return 0;
}"
		compile_test_wrapper "$PROGRAM" "" "" "-lsocket -lnsl" || \
		disp "no"
		;;
	header)
		disp "Adding \"#include <sys/types.h>\" to header"
		$ECHO "#include <sys/types.h>"
		disp "Adding \"#include <sys/socket.h>\" to header"
		$ECHO "#include <sys/socket.h>"
		;;
esac