Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 423997
Collapse All | Expand All

(-)socket.cpp (-3 / +14 lines)
Lines 1-5 Link Here
1
#include <fcntl.h>
2
#include <sys/ioctl.h>
3
#include <stdio.h>
1
4
2
3
#ifdef WIN32
5
#ifdef WIN32
4
	#include <Winsock2.h>
6
	#include <Winsock2.h>
5
	typedef SOCKET SOCKET_T;
7
	typedef SOCKET SOCKET_T;
Lines 152-165 Link Here
152
154
153
void Socket::setBlocking(bool doBlock)
155
void Socket::setBlocking(bool doBlock)
154
{
156
{
157
   int flags;
158
   int r;
159
	
160
   flags = fcntl (_sock->s, F_GETFL);
161
155
	if( doBlock )
162
	if( doBlock )
156
	{
163
	{
157
		u_long iMode = 0;	// blocking
164
		u_long iMode = 0;	// blocking
158
		int r = ioctlsocket(_sock->s, FIONBIO, &iMode);
165
		//int r = ioctlsocket(_sock->s, FIONBIO, &iMode);
166
		//int r = fcntl(_sock->s, F_SETFL, &iMode) ;
167
      		r = fcntl (_sock->s, F_SETFL, flags & ~O_NONBLOCK);	
159
	} else {
168
	} else {
160
		//set client to non-blocking mode: (is server is non-blocking, so will the clients be)
169
		//set client to non-blocking mode: (is server is non-blocking, so will the clients be)
161
		u_long iMode = 1;	// non-blocking
170
		u_long iMode = 1;	// non-blocking
162
		int r = ioctlsocket(_sock->s, FIONBIO, &iMode);
171
		//int r = ioctlsocket(_sock->s, FIONBIO, &iMode);
172
		//int r = fcntl(_sock->s, F_SETFL, &iMode) ;
173
      		r = fcntl (_sock->s, F_SETFL, flags | O_NONBLOCK);	
163
	}
174
	}
164
	//return r==0;	//return True if no error.
175
	//return r==0;	//return True if no error.
165
}
176
}
(-)taglib/taglib/taglib_export.h (-11 / +8 lines)
Lines 26-42 Link Here
26
#ifndef TAGLIB_EXPORT_H
26
#ifndef TAGLIB_EXPORT_H
27
#define TAGLIB_EXPORT_H
27
#define TAGLIB_EXPORT_H
28
28
29
29
#if defined(_WIN32) || defined(_WIN64)
30
/*
30
#ifdef MAKE_TAGLIB_LIB
31
#if (defined(_WIN32) || defined(_WIN64)) && (!defined(MAKE_TAGLIB_STATIC))
31
#define TAGLIB_EXPORT __declspec(dllexport)
32
	#ifdef MAKE_TAGLIB_LIB
33
		#define TAGLIB_EXPORT __declspec(dllexport)
34
	#else
35
		#define TAGLIB_EXPORT __declspec(dllimport)
36
	#endif
37
#else
32
#else
38
*/
33
#define TAGLIB_EXPORT __declspec(dllimport)
39
	#define TAGLIB_EXPORT
34
#endif
40
//#endif
35
#else
36
#define TAGLIB_EXPORT
37
#endif
41
38
42
#endif
39
#endif

Return to bug 423997