mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Simplify configure, quiet warnings (from Wacko).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2674 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
abd9af2aa3
commit
d286ed38b2
21 changed files with 85 additions and 92 deletions
36
ChangeLog
36
ChangeLog
|
@ -1,3 +1,39 @@
|
|||
Thu Dec 11 13:58:39 1997 Adam Fedor <fedor@doc.com>
|
||||
|
||||
* configure.in: Remove unneeded tests.
|
||||
* GNUmakefile (SUBPROJECTS): Remove checks and examples.
|
||||
|
||||
Tue Dec 9 17:47:21 1997 Yoo C. Chung <wacko@laplace.snu.ac.kr>
|
||||
|
||||
* src/include/behavior.h: Include <objc/objc-api.h>.
|
||||
* src/NSProcessInfo.m: Include <unistd.h>.
|
||||
* src/NSPipe.m: Include <unistd.h>.
|
||||
* src/NSPage.m: Include <string.h>.
|
||||
* src/NSLog.m: Include <unistd.h>.
|
||||
* src/NSHost.m: Include <unistd.h>.
|
||||
* src/NSDistributedLock.m: Include <string.h>.
|
||||
* src/NSDictionary.m: Include <gnustep/base/behavior.h>.
|
||||
|
||||
* src/NSBundle.m ([NSBundle
|
||||
+_bundleResourcePathsWithRootPath:subPath:]): Removed unused
|
||||
variables.
|
||||
|
||||
* src/NSArray.m: Include <gnustep/base/behavior.h>
|
||||
([NSArrayNonCore -descriptionWithIndent:]): Changed argument to
|
||||
unsigned.
|
||||
|
||||
* src/UnixFileHandle.m: Include <arpa/inet.h> and <string.h>.
|
||||
* src/UdpPort.m: Include <unistd.h>.
|
||||
* src/StdioStream.m: Include <string.h>.
|
||||
* src/Coder.m: Include <gnustep/base/behavior.h>.
|
||||
|
||||
* src/NSUser.m (NSHomeDirectoryForUser): Use objc_malloc().
|
||||
|
||||
* src/NSData.m ([NSDataMalloc -initWithCoder:]): Check malloc.
|
||||
([NSMutableDataMalloc -initWithCoder:]): Likewise.
|
||||
|
||||
* src/List.m: Removed unused macros.
|
||||
|
||||
Sun Dec 7 23:22:07 1997 Stevo Crvenkovski <stevo@btinternet.com>
|
||||
|
||||
* src/NSGCString.m ([NSGMutableCString
|
||||
|
|
|
@ -47,7 +47,7 @@ DIST_FILES = \
|
|||
#
|
||||
# The list of subproject directories
|
||||
#
|
||||
SUBPROJECTS = src Tools doc checks examples NSCharacterSets NSTimeZones admin
|
||||
SUBPROJECTS = src Tools doc NSCharacterSets NSTimeZones admin
|
||||
|
||||
-include Makefile.preamble
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#ifndef __behavior_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __behavior_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <objc/objc-api.h>
|
||||
|
||||
/* Call this method from CLASS's +initialize method to add a behavior
|
||||
to CLASS. A "behavior" is like a protocol with an implementation.
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <gnustep/base/behavior.h>
|
||||
#include <gnustep/base/Coder.h>
|
||||
#include <gnustep/base/CoderPrivate.h>
|
||||
#include <gnustep/base/MemoryStream.h>
|
||||
|
|
|
@ -33,17 +33,6 @@
|
|||
|
||||
#define LIST_GROW_FACTOR 2
|
||||
|
||||
#if !defined(NX_MALLOC)
|
||||
#define NX_MALLOC(VAR,TYPE,NUM ) \
|
||||
((VAR) = (TYPE *) malloc((unsigned)(NUM)*sizeof(TYPE)))
|
||||
#endif
|
||||
#if !defined(NX_REALLOC)
|
||||
#define NX_REALLOC(VAR,TYPE,NUM ) \
|
||||
((VAR) = (TYPE *) realloc((VAR), (unsigned)(NUM)*sizeof(TYPE)))
|
||||
#endif
|
||||
#if !defined(NX_FREE)
|
||||
#define NX_FREE(VAR) free(VAR)
|
||||
#endif
|
||||
|
||||
/* memcpy() is a gcc builtin */
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gnustep/base/behavior.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSGArray.h>
|
||||
|
@ -393,7 +394,7 @@ static Class NSMutableArray_concrete_class;
|
|||
return [self descriptionWithIndent: 0];
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithIndent: (int)level
|
||||
- (NSString*) descriptionWithIndent: (unsigned)level
|
||||
{
|
||||
id string;
|
||||
id desc;
|
||||
|
|
|
@ -524,8 +524,6 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
NSArray* languages;
|
||||
NSMutableArray* array;
|
||||
NSEnumerator* enumerate;
|
||||
NSDictionary *envd = [[NSProcessInfo processInfo] environment];
|
||||
NSString *gnustep_env;
|
||||
|
||||
array = [NSMutableArray arrayWithCapacity: 8];
|
||||
languages = [NSUserDefaults userLanguages];
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
#include <objc/objc-api.h>
|
||||
#include <gnustep/base/NSDate.h>
|
||||
#include <gnustep/base/NSString.h>
|
||||
#include <gnustep/base/NSException.h>
|
||||
|
@ -217,7 +219,7 @@ static id long_day[7] = {@"Sunday",
|
|||
// Find the order of date elements
|
||||
// and translate format string into scanf ready string
|
||||
order = 1;
|
||||
newf = malloc(lf+1);
|
||||
newf = objc_malloc(lf+1);
|
||||
for (i = 0;i < lf; ++i)
|
||||
{
|
||||
newf[i] = f[i];
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <objc/objc-api.h>
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <gnustep/base/MallocAddress.h>
|
||||
#include <Foundation/byte_order.h>
|
||||
|
@ -1218,6 +1219,12 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
|
|||
|
||||
[aCoder decodeValueOfObjCType:"I" at: &l];
|
||||
b = malloc(l);
|
||||
if (b == 0)
|
||||
{
|
||||
NSLog(@"[NSDataMalloc -initWithCode:] unable to allocate %lu bytes", l);
|
||||
[self dealloc];
|
||||
return nil;
|
||||
}
|
||||
[aCoder decodeArrayOfObjCType:"C" count: l at: b];
|
||||
return [self initWithBytesNoCopy: b length: l];
|
||||
}
|
||||
|
@ -1585,7 +1592,13 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
|
|||
void* b;
|
||||
|
||||
[aCoder decodeValueOfObjCType:"I" at: &l];
|
||||
b = malloc(l);
|
||||
b = objc_malloc(l);
|
||||
if (b == 0)
|
||||
{
|
||||
NSLog(@"[NSMutableDataMalloc -initWithCode:] unable to allocate %lu bytes", l);
|
||||
[self dealloc];
|
||||
return nil;
|
||||
}
|
||||
[aCoder decodeArrayOfObjCType:"C" count: l at: b];
|
||||
return [self initWithBytesNoCopy: b length: l];
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gnustep/base/behavior.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSGDictionary.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
#include <Foundation/NSDistributedLock.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSException.h>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#ifdef WIN32
|
||||
#include <Windows32/Sockets.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSProcessInfo.h>
|
||||
|
||||
#ifndef __WIN32__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
NSLog_printf_handler *_NSLog_printf_handler;
|
||||
|
||||
static void
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <string.h>
|
||||
#ifndef __WIN32__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSFileHandle.h>
|
||||
|
||||
#ifndef __WIN32__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@implementation NSPipe
|
||||
|
||||
// Allocating and Initializing a FileHandle Object
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
/* One of these two should have MAXHOSTNAMELEN */
|
||||
#ifndef __WIN32__
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
#include <netdb.h>
|
||||
#endif /* !__WIN32__ */
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <objc/objc-api.h>
|
||||
#include <gnustep/base/preface.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
|
@ -94,7 +95,7 @@ NSHomeDirectoryForUser (NSString *login_name)
|
|||
if (n > 1024)
|
||||
{
|
||||
/* Buffer not big enough, so dynamically allocate it */
|
||||
nb = (char *)malloc(sizeof(char)*(n+1));
|
||||
nb = (char *)objc_malloc(sizeof(char)*(n+1));
|
||||
n = GetEnvironmentVariable("HOMEPATH", nb, n+1);
|
||||
nb[n] = '\0';
|
||||
s = [NSString stringWithCString: nb];
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h> /* SEEK_* on SunOS 4 */
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <gnustep/base/Array.h>
|
||||
#include <assert.h>
|
||||
#ifndef __WIN32__
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN */
|
||||
#endif /* !__WIN32__ */
|
||||
#if _AIX
|
||||
|
|
|
@ -40,8 +40,10 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
|
|
81
configure.in
81
configure.in
|
@ -185,23 +185,6 @@ AC_SUBST(NEXT_INCLUDES)
|
|||
#--------------------------------------------------------------------
|
||||
OBJC_SYS_DYNAMIC_FLAGS()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Determine the target platform
|
||||
#--------------------------------------------------------------------
|
||||
if test "x$target" = "xNONE"; then
|
||||
PLATFORM_OS=`$srcdir/config.guess`
|
||||
else
|
||||
PLATFORM_OS="$target"
|
||||
fi
|
||||
AC_SUBST(PLATFORM_OS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Find some programs
|
||||
#--------------------------------------------------------------------
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_LN_S
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Generic settings needed by NSZone.m
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -235,10 +218,10 @@ AC_CHECK_FUNCS(statvfs)
|
|||
# These two headers (functions) needed by Time.m
|
||||
#--------------------------------------------------------------------
|
||||
dnl AC_REPLACE_FUNCS(getrusage gettimeofday)
|
||||
AC_CHECK_HEADER(sys/time.h, TIME_H=1, TIME_H=0)
|
||||
AC_CHECK_HEADER(sys/resource.h, RESOURCE_H=1, RESOURCE_H=0)
|
||||
AC_CHECK_HEADER(sys/time.h)
|
||||
AC_CHECK_HEADER(sys/resource.h)
|
||||
|
||||
if test TIME_H = 0 -o RESOURCE_H = 0 ; then
|
||||
if test $ac_cv_header_sys_time_h = no -o $ac_cv_header_sys_resource_h = no ; then
|
||||
AC_MSG_ERROR(Could not find headers needed by class Time)
|
||||
fi
|
||||
|
||||
|
@ -247,11 +230,11 @@ AC_CHECK_HEADERS(sys/rusage.h ucbinclude/sys/resource.h)
|
|||
#--------------------------------------------------------------------
|
||||
# These headers/functions needed by SocketPort.m
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_HEADER(sys/socket.h, SOCKET_H=1, SOCKET_H=0)
|
||||
AC_CHECK_HEADER(netinet/in.h, IN_H=1, IN_H=0)
|
||||
AC_CHECK_HEADER(sys/socket.h)
|
||||
AC_CHECK_HEADER(netinet/in.h)
|
||||
dnl AC_REPLACE_FUNCS(recvfrom)
|
||||
|
||||
if test SOCKET_H = 0 -o IN_H = 0 ; then
|
||||
if test $ac_cv_header_sys_socket_h = no -o $ac_cv_header_netinet_in_h = no ; then
|
||||
AC_MSG_ERROR(Could not find headers needed by class SocketPort)
|
||||
fi
|
||||
|
||||
|
@ -259,7 +242,7 @@ fi
|
|||
# This function needed by StdioStream.m
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_FUNCS(vsprintf)
|
||||
if [ $HAVE_VSPRINTF ] ; then
|
||||
if test $ac_cv_func_vsprintf = yes ; then
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.vsprintf.c"],
|
||||
VSPRINTF_RETURNS_LENGTH=1,
|
||||
VSPRINTF_RETURNS_LENGTH=0,
|
||||
|
@ -308,62 +291,12 @@ AC_CHECK_FUNCS(strerror)
|
|||
#--------------------------------------------------------------------
|
||||
AC_CHECK_FUNCS(register_printf_function)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These libraries needed by the check programs for distributed objects
|
||||
# on Solaris where the socket/network code isn't the regular place. Yuck!
|
||||
# I'm assuming that if the socket/network code is in the regular place,
|
||||
# we won't find these libraries, or if we do find them, they aren't
|
||||
# something weird I wouldn't want to link with.
|
||||
# It's just for the programs in "checks" and "examples" anyway; it
|
||||
# doesn't affect the compilation of the library.
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_LIB(socket, main)
|
||||
AC_CHECK_LIB(nsl, main)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Tools for making a DLL.
|
||||
#--------------------------------------------------------------------
|
||||
DLLTOOL='dlltool'
|
||||
AC_SUBST(DLLTOOL)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Make a static library?
|
||||
# Import library is the library for linking with a DLL.
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(static,
|
||||
[ --disable-static Do not build the static library],
|
||||
echo $enable_static
|
||||
if [[ x$enable_static = xno ]]; then
|
||||
STATIC_LIBRARY=''
|
||||
else
|
||||
STATIC_LIBRARY='lib$(LIBRARY_NAME)$(LIBEXT)'
|
||||
fi,
|
||||
STATIC_LIBRARY='lib$(LIBRARY_NAME)$(LIBEXT)')
|
||||
IMPORT_LIBRARY=$STATIC_LIBRARY
|
||||
AC_SUBST(STATIC_LIBRARY)
|
||||
AC_SUBST(IMPORT_LIBRARY)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Make a shared library?
|
||||
#--------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(shared,
|
||||
[ --enable-shared Build the library as a shared library],
|
||||
SHARED_LIBRARY='lib$(LIBRARY_NAME).so.$(VERSION)',
|
||||
SHARED_LIBRARY=)
|
||||
AC_SUBST(SHARED_LIBRARY)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# What flags to pass for making a shared library?
|
||||
# xxx This should be smarter and more general
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECKING(for flags to use when making a shared lib...)
|
||||
if ($srcdir/config.guess | grep solaris); then
|
||||
CFLAGS_SHAREDLIB='$(CFLAGS_SHAREDLIB_SOLARIS)'
|
||||
else
|
||||
CFLAGS_SHAREDLIB='$(CFLAGS_SHAREDLIB_GNU)'
|
||||
fi
|
||||
AC_SUBST(CFLAGS_SHAREDLIB)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Custom configuration based upon the target
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue