* configure.ac

* GSWeb/GSWUtils.m
* GSWeb/GSWApplication+Defaults.m
* GSWeb/GSWHTTPIO.m

Fixed for non-Apple platforms, patch from Sebastian Reitenbach.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@36230 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Dave Wetzel 2013-03-01 23:56:56 +00:00
parent 2658ffe6b6
commit 6049e5892a
5 changed files with 46 additions and 64 deletions

View file

@ -1,3 +1,11 @@
2013-03-01 David Wetzel <dave@turbocat.de>
* configure.ac
* GSWeb/GSWUtils.m
* GSWeb/GSWApplication+Defaults.m
* GSWeb/GSWHTTPIO.m
Fixed for non-Apple platforms, patch from Sebastian Reitenbach.
2013-02-26 David Wetzel <dave@turbocat.de> 2013-02-26 David Wetzel <dave@turbocat.de>
* added GSWeb/GSWApplication+Defaults.h * added GSWeb/GSWApplication+Defaults.h
* GSWeb/GNUmakefile: use -Werror * GSWeb/GNUmakefile: use -Werror

View file

@ -275,7 +275,7 @@ GSWeb_InitializeGlobalAppDefaultOptions(void)
LOGOPT_NC(GSWOPTValue_SessionStoreClassName); LOGOPT_NC(GSWOPTValue_SessionStoreClassName);
LOGOPT_NC(GSWOPT_SessionStoreClassName); LOGOPT_NC(GSWOPT_SessionStoreClassName);
LOGOPT_NC(GSWOPTVALUE_DirectConnectEnabled); LOGOPT (GSWOPTVALUE_DirectConnectEnabled);
LOGOPT_NC(GSWOPT_DirectConnectEnabled); LOGOPT_NC(GSWOPT_DirectConnectEnabled);
LOGOPT (GSWOPTVALUE_FrameworksBaseURL); LOGOPT (GSWOPTVALUE_FrameworksBaseURL);

View file

@ -26,9 +26,6 @@
#include <Foundation/NSString.h> #include <Foundation/NSString.h>
#include <Foundation/NSFileHandle.h> #include <Foundation/NSFileHandle.h>
#include <Foundation/NSData.h> #include <Foundation/NSData.h>
#ifdef GNUSTEP
#include <GNUstepBase/GSFileHandle.h>
#endif
#include <GNUstepBase/NSString+GNUstepBase.h> #include <GNUstepBase/NSString+GNUstepBase.h>
#include <Foundation/NSError.h> #include <Foundation/NSError.h>
#include <Foundation/NSException.h> #include <Foundation/NSException.h>
@ -374,9 +371,10 @@ void _sendMessage(GSWResponse * message, NSFileHandle* fh, NSString * httpVersio
uint16_t rPort = 0; uint16_t rPort = 0;
NSString * rAddress = nil; NSString * rAddress = nil;
#ifdef GNUSTEP // checkme.
[(GSFileHandle*) fh setNonBlocking: NO]; //#ifdef GNUSTEP
#endif // [(GSFileHandle*) fh setNonBlocking: NO];
//#endif
// get info about who talks to us // get info about who talks to us

View file

@ -989,9 +989,9 @@ void ValidationExceptionRaiseFn0(const char *func,
when other threads invoke description on us. */ when other threads invoke description on us. */
if (self == [NSThread currentThread]) if (self == [NSThread currentThread])
{ {
return (*nsString_stringWithFormatIMP)(nsStringClass,stringWithFormatSEL, @"<%s: %p (%p)>", return (*nsString_stringWithFormatIMP)(nsStringClass,stringWithFormatSEL, @"<%s: %p>",
GSClassNameFromObject(self), GSClassNameFromObject(self),
self, objc_thread_id()); self);
} }
return [super description]; return [super description];
} }
@ -1002,30 +1002,7 @@ void ValidationExceptionRaiseFn0(const char *func,
static NSString * static NSString *
volatileInternalDescription(NSLock *self) volatileInternalDescription(NSLock *self)
{ {
#ifdef GNUSTEP
struct objc_mutex *mutex = 0;
const char *type;
NSUInteger size;
int offset;
if (GSObjCFindVariable(self, "_mutex", &type, &size, &offset))
{
GSObjCGetVariable(self, offset, size, &mutex);
}
if (mutex != 0)
{
return (*nsString_stringWithFormatIMP)(nsStringClass,stringWithFormatSEL, @"(%@ mutex:%p owner:%p depth:%d)",
self, mutex, mutex->owner, mutex->depth);
}
else
{
return (*nsString_stringWithFormatIMP)(nsStringClass,stringWithFormatSEL, @"(%@ mutex:%p)",
self, mutex);
}
#else
return [self description]; return [self description];
#endif
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@ -1039,12 +1016,8 @@ loggedLockBeforeDateFromFunctionInFileInLine(id self,
{ {
BOOL isLocked = YES; BOOL isLocked = YES;
NSThread *thread; NSThread *thread;
void *threadID = 0;
thread = [NSThread currentThread]; thread = [NSThread currentThread];
#ifdef GNUSTEP
threadID = objc_thread_id();
#endif
if (limit == nil) if (limit == nil)
{ {
@ -1072,11 +1045,11 @@ loggedLockBeforeDateFromFunctionInFileInLine(id self,
NSString *name; NSString *name;
NSDebugFLLog(@"locking", NSDebugFLLog(@"locking",
@"tried lock FAILED thread %@(%p) " @"tried lock FAILED thread %@ "
@"date:%@ file:%s function:%s line:%li " @"date:%@ file:%s function:%s line:%li "
@"lock:%@ " @"lock:%@ "
@"exception:%@ reason:%@ info:%@", @"exception:%@ reason:%@ info:%@",
thread, threadID, thread,
limit, file, function, line, limit, file, function, line,
volatileInternalDescription(self)); volatileInternalDescription(self));
@ -1089,12 +1062,12 @@ loggedLockBeforeDateFromFunctionInFileInLine(id self,
} }
NSDebugFLLog(@"locking", NSDebugFLLog(@"locking",
@"%@ %@ thread %@(%p) " @"%@ %@ thread %@ "
@"date:%@ file:%s function:%s line:%li " @"date:%@ file:%s function:%s line:%li "
@"result:%d lock:%@", @"result:%d lock:%@",
(try ? @"tried lock" : @"lock"), (try ? @"tried lock" : @"lock"),
(isLocked ? @"SUCCEEDED" : @"FAILED"), (isLocked ? @"SUCCEEDED" : @"FAILED"),
thread, threadID, thread,
limit, file, function, line, limit, file, function, line,
isLocked, volatileInternalDescription(self)); isLocked, volatileInternalDescription(self));
@ -1108,29 +1081,26 @@ loggedUnlockFromFunctionInFileInLine(id self,
const char *function, const char *function,
long line) long line)
{ {
NSThread *thread; NSThread *thread;
void *threadID = 0;
thread = [NSThread currentThread];
thread = [NSThread currentThread];
#ifdef GNUSTEP NSDebugFLLog(@"locking",
threadID = objc_thread_id(); @"unlock thread %@ "
#endif @"file:%s function:%s line:%li "
NSDebugFLLog(@"locking", @"lock:%@",
@"unlock thread %@(%p) " thread,
@"file:%s function:%s line:%li " file, function, line,
@"lock:%@", volatileInternalDescription(self));
thread, threadID, [self unlock];
file, function, line, NSDebugFLLog(@"locking",
volatileInternalDescription(self)); @"unlock SUCCEEDED thread %@ "
[self unlock]; @"file:%s function:%s line:%li "
NSDebugFLLog(@"locking", @"lock:%@",
@"unlock SUCCEEDED thread %@(%p) " thread,
@"file:%s function:%s line:%li " file, function, line,
@"lock:%@", volatileInternalDescription(self));
thread, threadID,
file, function, line,
volatileInternalDescription(self));
} }
//==================================================================== //====================================================================

View file

@ -133,6 +133,12 @@ AC_ARG_ENABLE(png,
enable_png=yes) enable_png=yes)
if test $enable_png = yes; then if test $enable_png = yes; then
PNG_CPPFLAGS="`pkg-config --cflags libpng`"
CPPFLAGS="$CPPFLAGS $PNG_CPPFLAGS"
AUX_INCS="$AUX_INCS $PNG_CPPFLAGS"
AC_CHECK_HEADER(png.h, [], [], [])
AC_CHECK_LIB(png, png_sig_cmp) AC_CHECK_LIB(png, png_sig_cmp)
fi fi