1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-10 22:13:00 +00:00

merged features ioctl, setsockopt, generic-socket

This commit is contained in:
Gerhard Rieger 2008-09-22 22:52:03 +02:00
commit d78b080ef0
44 changed files with 2035 additions and 263 deletions

View file

@ -142,7 +142,7 @@ int statname(const char *file, int fd, int filetype, FILE *outfile) {
if (file) fprintf(outfile, " %s", file);
break;
case (S_IFSOCK>>12): /* 12, socket */
#if WITH_SOCKET
#if _WITH_SOCKET
if (fd >= 0) {
result = sockname(fd, outfile);
} else if (file) {
@ -153,7 +153,7 @@ int statname(const char *file, int fd, int filetype, FILE *outfile) {
#else
Error("SOCKET support not compiled in");
return -1;
#endif /* !WITH_SOCKET */
#endif /* !_WITH_SOCKET */
break;
}
/* ioctl() */
@ -188,7 +188,7 @@ int cdevname(int fd, FILE *outfile) {
}
#if WITH_SOCKET
#if _WITH_SOCKET
int sockname(int fd, FILE *outfile) {
#define FDNAME_OPTLEN 256
#define FDNAME_NAMELEN 256
@ -323,7 +323,7 @@ int sockname(int fd, FILE *outfile) {
#undef FDNAME_OPTLEN
#undef FDNAME_NAMELEN
}
#endif /* WITH_SOCKET */
#endif /* _WITH_SOCKET */