Remove non-Openstep classes. More WIN32 changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6669 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2000-06-13 14:50:40 +00:00
parent 93f1bc859a
commit 0704032dc4
12 changed files with 84 additions and 57 deletions

View file

@ -1,3 +1,15 @@
2000-06-13 Adam Fedor <fedor@gnu.org>
* configure.in: Look for getopt.h
* Source/NSBundle.m (+_absolutePathOfExecutable:): Add '.' if not
already in path.
* Source/NSPage.m: Use malloc if no valloc.
* Testing/GNUmakefile: Remove non-OpenStep tests.
* Tools/gdomap.c: Change WIN32 to MINGW. Check if IFF_POINTOPOINT
is defined.
2000-06-11 Adam Fedor <fedor@gnu.org>
* Headers/gnustep/base/preface.h.in: Define MINGW if MINW32.

View file

@ -322,6 +322,12 @@ _bundle_load_callback(Class theClass, Category *theCategory)
#else
patharr = [pathlist componentsSeparatedByString:@":"];
#endif
/* Add . if not already in path */
if ([patharr indexOfObject: @"."] == NSNotFound)
{
patharr = AUTORELEASE([patharr mutableCopy]);
[patharr addObject: @"."];
}
patharr = [patharr objectEnumerator];
while ((prefix = [patharr nextObject]))
{

View file

@ -25,6 +25,9 @@
#include <base/preface.h>
#include <Foundation/NSZone.h>
#include <string.h>
#ifdef __WIN32__
#include <malloc.h>
#endif
#ifndef __MINGW__
#include <unistd.h>
#endif
@ -136,7 +139,11 @@ NSAllocateMemoryPages (unsigned bytes)
return NULL;
return where;
#else
#if HAVE_VALLOC
where = valloc (bytes);
#else
where = malloc (bytes);
#endif
if (where == NULL)
return NULL;
memset (where, 0, bytes);

View file

@ -2124,7 +2124,9 @@ handle_printf_atsign (FILE *stream,
#if defined(__MINGW__)
return self;
#else
const int MAX_PATH = 1024;
#ifndef MAX_PATH
#define MAX_PATH 1024
#endif
char new_buf[MAX_PATH];
#if HAVE_REALPATH

View file

@ -34,55 +34,50 @@ include ../config.mak
# The tools to be compiled
TEST_TOOL_NAME = \
awake \
basic \
benchmark \
test01 \
test02 \
heap \
prepend \
pipes \
server \
containers \
cstream \
client \
string \
values \
diningPhilosophers \
fref \
gstcpport-server \
gstcpport-client \
nsarray \
nsattributedstring \
nsbundle \
nsdata \
nsdictionary \
nsfilehandle \
nshost \
nsinvocation \
nsset \
nsprocessinfo \
nsarchiver \
invocation \
invocation_int \
invocation_char \
invocation_short \
invocation_long \
diningPhilosophers \
nsmaptable \
nsarray \
nsarchiver \
nsattributedstring \
nsbundle \
nscharacterset \
nsdata \
NSData-test \
nsdate \
nsdictionary \
nsfilehandle \
nshashtable \
tcpport-server \
tcpport-client \
nshost \
nsinvocation \
nsmaptable \
nsnotification \
nsprocessinfo \
nsscanner \
nsset \
nstask \
nstimer \
coder \
cstream \
fref \
basic \
release \
nsscanner \
nsdate \
awake \
thread-except \
nscharacterset \
NSData-test \
containers \
nstimezone \
pipes \
release \
server \
string \
tcpport-server \
tcpport-client \
thread-except \
values \
create-abbrevs \
create-regions
@ -177,7 +172,7 @@ DIST_FILES = $(SRCS) $(HDRS) $(DYNAMIC_MFILES) $(DYNAMIC_HFILES) \
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/test-tool.make
#include $(GNUSTEP_MAKEFILES)/test-tool.make
include $(GNUSTEP_MAKEFILES)/bundle.make
-include Makefile.postamble

View file

@ -8,13 +8,14 @@
*/
#include "MyCategory.h"
#include <Foundation/NSString.h>
@implementation NSObject(MyCategory)
- printMyName
{
printf("Class %s had MyCategory added to it\n", [self name]);
return self;
printf("Class %s had MyCategory added to it\n", [[self description] cString]);
return self;
}
@end

View file

@ -8,6 +8,7 @@
*/
#include "SecondClass.h"
#include <Foundation/NSString.h>
@implementation SecondClass
@ -21,8 +22,8 @@
- printName
{
printf("Hi my name is %s\n", [self name]);
return self;
printf("Hi my name is %s\n", [[self description] cString]);
return self;
}
@end

View file

@ -9,10 +9,6 @@
#if defined(__svr4__) || defined(__hpux) || defined(_SEQUENT_)
long lrand48();
#define random lrand48
#else
#if _WIN32 || __WIN32__
#define random rand
#endif
#endif
int main()

View file

@ -6,7 +6,6 @@
#include <Foundation/NSString.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSRunLoop.h>
#include <base/Coder.h>
#include <base/BinaryCStream.h>
#include <Foundation/NSAutoreleasePool.h>
#include "server.h"

View file

@ -31,7 +31,7 @@ include ../Version
include ../config.mak
# The application to be compiled
TOOL_NAME = gdnc defaults dread dwrite dremove plmerge \
TOOL_NAME = gdnc defaults plmerge \
plparse sfparse pldes plser
OBJC_PROGRAM_NAME = gdomap

View file

@ -24,17 +24,17 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> /* for gethostname() */
#ifndef __WIN32__
#ifndef __MINGW32__
#include <sys/param.h> /* for MAXHOSTNAMELEN */
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h> /* for inet_ntoa() */
#endif /* !__WIN32__ */
#endif /* !__MINGW32__ */
#include <errno.h>
#include <limits.h>
#include <string.h> /* for strchr() */
#include <ctype.h> /* for strchr() */
#ifdef __WIN32__
#ifdef __MINGW32__
#include <winsock.h>
#else
#include <sys/time.h>
@ -55,7 +55,7 @@
#include <netinet/in.h>
#include <net/if.h>
#ifndef SIOCGIFCONF
#if !defined(SIOCGIFCONF) || defined(__CYGWIN__)
#include <sys/ioctl.h>
#ifndef SIOCGIFCONF
#include <sys/sockio.h>
@ -65,7 +65,11 @@
#if defined(__svr4__)
#include <sys/stropts.h>
#endif
#endif /* !__WIN32__ */
#endif /* !__MINGW32__ */
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "gdomap.h"
/*
@ -782,10 +786,12 @@ init_iface()
{
broadcast = 1;
}
#ifdef IFF_POINTOPOINT
if (ifreq.ifr_flags & IFF_POINTOPOINT)
{
pointopoint = 1;
}
#endif
if (ioctl(desc, SIOCGIFADDR, (char *)&ifreq) < 0)
{
perror("SIOCGIFADDR");
@ -805,6 +811,7 @@ init_iface()
addr[interfaces] =
((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr;
bcok[interfaces] = (broadcast | pointopoint);
#ifdef IFF_POINTOPOINT
if (pointopoint)
{
if (ioctl(desc, SIOCGIFDSTADDR, (char*)&ifreq) < 0)
@ -819,6 +826,7 @@ init_iface()
}
}
else
#endif
{
if (ioctl(desc, SIOCGIFBRDADDR, (char*)&ifreq) < 0)
{

View file

@ -511,8 +511,7 @@ AC_CHECK_HEADERS(sys/time.h sys/rusage.h ucbinclude/sys/resource.h)
#--------------------------------------------------------------------
# These headers/functions needed by TcpPort.m
#--------------------------------------------------------------------
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(sys/socket.h netinet/in.h)
dnl AC_REPLACE_FUNCS(recvfrom)
#--------------------------------------------------------------------
@ -541,14 +540,15 @@ if test $ac_cv_func_vasprintf = yes ; then
fi
#--------------------------------------------------------------------
# This function needed by NSFileManager.m and find_exec.c
# This function needed by NSFileManager.m
#--------------------------------------------------------------------
AC_CHECK_FUNCS(getcwd)
AC_HEADER_DIRENT
#--------------------------------------------------------------------
# DIR definitions needed by NSBundle.m
# This function needed by gdomap.c
#--------------------------------------------------------------------
AC_HEADER_DIRENT
AC_CHECK_HEADERS(getopt.h)
#--------------------------------------------------------------------
# This function needed by NSPage.m