Change so rint is only defined when needed.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13464 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-04-12 02:15:51 +00:00
parent 04616b85ac
commit b9f0e1a9cd
7 changed files with 28 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2002-04-11 Adam Fedor <fedor@gnu.org>
* Headers/gnustep/gui/config.h.bot: New define if rint missing
* Source/NSBrowser.m: Use it.
* Source/NSRulerView.m: Idem.
* Source/NSMatrix.m: Idem.
* Source/NSClipView.m: Idem.
Thu Apr 11 22:51:09 2002 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSButtonCell.m ([-cellSize]): Use more space around

View file

@ -4,9 +4,12 @@
#define rintf rint
#endif
#ifndef HAVE_RINT
static double rint(double a)
{
return (floor(a+0.5));
#define DEFINE_RINT_IF_MISSING \
static double rint(double a) \
{ \
return (floor(a+0.5)); \
}
#else
#define DEFINE_RINT_IF_MISSING
#endif

View file

@ -14,9 +14,12 @@
#define rintf rint
#endif
#ifndef HAVE_RINT
static double rint(double a)
{
return (floor(a+0.5));
#define DEFINE_RINT_IF_MISSING \
static double rint(double a) \
{ \
return (floor(a+0.5)); \
}
#else
#define DEFINE_RINT_IF_MISSING
#endif

View file

@ -51,6 +51,8 @@
#include <AppKit/NSEvent.h>
#include <AppKit/NSWindow.h>
DEFINE_RINT_IF_MISSING
/* Cache */
static float scrollerWidth; // == [NSScroller scrollerWidth]

View file

@ -36,6 +36,8 @@
#include <math.h>
DEFINE_RINT_IF_MISSING
@class NSTableView;
/*

View file

@ -57,6 +57,8 @@
#include <math.h>
DEFINE_RINT_IF_MISSING
static NSNotificationCenter *nc;
#define STRICT 0

View file

@ -38,6 +38,8 @@
#include <AppKit/NSScrollView.h>
#include <AppKit/PSOperators.h>
DEFINE_RINT_IF_MISSING
#define MIN_LABEL_DISTANCE 40
#define MIN_MARK_DISTANCE 5