pkgsrc/devel/mad-flute/patches/patch-ah
agc 07090676a4 Initial import of mad-flute-1.7 into the packages collection
MAD project implemented two protocols designed for reliable content
	delivery.  File Delivery over Unidirectional Transport (FLUTE) is a
	protocol for the unidirectional delivery of files over the Internet,
	which is particularly suited to multicast networks.  FLUTE builds on
	Asyncronous Layered Coding (ALC), the base protocol designed for
	massively scalable multicast distribution.  Asynchronous Layered
	Coding combines the Layered Coding Transport (LCT) building block, a
	multiple rate congestion control building block and the Forward Error
	Correction (FEC) building block to provide congestion controlled
	reliable asynchronous delivery of content to an unlimited number of
	concurrent receivers from a single sender.

	MAD-ALCLIB library is an implementation of the ALC/LCT protocol, along
	with the RLC congestion control protocol and Compact No-Code, Simple
	XOR and Reed-Solomon FEC schemes.  Session Description Protocol (SDP)
	can be used to describe FLUTE sessions.  MAD-SDPLIB library is an
	implementation of "SDP Descriptors for FLUTE" Internet-Draft.
	MAD-FLUTELIB is an implementation of the FLUTE protocol, and it builds
	on MAD-ALCLIB and MAD-SDPLIB libraries.  MAD-FLUTE is a multicast file
	transfer tool build on the above mentioned libraries.
2012-05-02 04:43:11 +00:00

146 lines
4.1 KiB
Text

$NetBSD: patch-ah,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $
portability patches
--- flutelib/fdt_gen.c 2011/12/21 19:05:12 1.1
+++ flutelib/fdt_gen.c 2011/12/21 19:09:05
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/param.h>
#ifdef _MSC_VER
#include <windows.h>
@@ -142,6 +143,8 @@
#ifdef _MSC_VER
struct __stat64 file_stats;
+#elif (defined(BSD) && BSD >= 199506)
+ struct stat file_stats;
#else
struct stat64 file_stats;
#endif
@@ -159,6 +162,8 @@
#ifdef _MSC_VER
struct __stat64 enc_file_stats;
+#elif (defined(BSD) && BSD >= 199506)
+ struct stat enc_file_stats;
#else
struct stat64 enc_file_stats;
#endif
@@ -200,6 +205,8 @@
#ifdef _MSC_VER
if(_stat64(fullpath, &file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(fullpath, &file_stats) == -1) {
#else
if(stat64(fullpath, &file_stats) == -1) {
#endif
@@ -307,6 +314,8 @@
strcat(enc_fullpath, GZ_SUFFIX);
#ifdef _MSC_VER
if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(enc_fullpath, &enc_file_stats) == -1) {
#else
if(stat64(enc_fullpath, &enc_file_stats) == -1) {
#endif
@@ -439,6 +448,8 @@
#ifdef _MSC_VER
struct __stat64 file_stats;
+#elif (defined(BSD) && BSD >= 199506)
+ struct stat file_stats;
#else
struct stat64 file_stats;
#endif
@@ -453,6 +464,8 @@
char enc_fullpath[MAX_PATH_LENGTH];
#ifdef _MSC_VER
struct __stat64 enc_file_stats;
+#elif (defined(BSD) && BSD >= 199506)
+ struct stat enc_file_stats;
#else
struct stat64 enc_file_stats;
#endif
@@ -549,6 +562,8 @@
#ifdef _MSC_VER
if(_stat64(fullpath, &file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(fullpath, &file_stats) == -1) {
#else
if(stat64(fullpath, &file_stats) == -1) {
#endif
@@ -632,6 +647,8 @@
strcat(enc_fullpath, GZ_SUFFIX);
#ifdef _MSC_VER
if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(enc_fullpath, &enc_file_stats) == -1) {
#else
if(stat64(enc_fullpath, &enc_file_stats) == -1) {
#endif
@@ -765,6 +782,8 @@
#ifdef _MSC_VER
if(_stat64(fullpath, &file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(fullpath, &file_stats) == -1) {
#else
if(stat64(fullpath, &file_stats) == -1) {
#endif
@@ -831,6 +850,8 @@
#ifdef _MSC_VER
if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(enc_fullpath, &enc_file_stats) == -1) {
#else
if(stat64(enc_fullpath, &enc_file_stats) == -1) {
#endif
@@ -973,7 +994,11 @@
strcat(fullpath, fullname);
+#if (defined(BSD) && BSD >= 199506)
+ if(stat(fullpath, &file_stats) == -1) {
+#else
if(stat64(fullpath, &file_stats) == -1) {
+#endif
printf("Error: %s is not valid file name\n", fullpath);
fflush(stdout);
entry = readdir(dirptr);
@@ -1046,7 +1071,11 @@
strcpy(enc_fullpath, fullpath);
strcat(enc_fullpath, GZ_SUFFIX);
+#if (defined(BSD) && BSD >= 199506)
+ if(stat(enc_fullpath, &enc_file_stats) == -1) {
+#else
if(stat64(enc_fullpath, &enc_file_stats) == -1) {
+#endif
printf("Error: %s is not valid file name\n", enc_fullpath);
fflush(stdout);
entry = readdir(dirptr);
@@ -1158,6 +1187,8 @@
#ifdef _MSC_VER
struct __stat64 file_stats;
+#elif (defined(BSD) && BSD >= 199506)
+ struct stat file_stats;
#else
struct stat64 file_stats;
#endif
@@ -1263,6 +1294,8 @@
strcat(fullpath, token);
#ifdef _MSC_VER
if(_stat64(fullpath, &file_stats) == -1) {
+#elif (defined(BSD) && BSD >= 199506)
+ if(stat(fullpath, &file_stats) == -1) {
#else
if(stat64(fullpath, &file_stats) == -1) {
#endif