From 4a7ea90a4567d69b79a8c93c3116ed335f7f9eb8 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Mon, 13 Sep 2004 03:17:12 +0000 Subject: [PATCH] Updates for new make system... mouse.c and ciolib.c need to include <stdlib.h> for malloc() etc. --- src/conio/Common.make | 4 ++-- src/conio/GNUmakefile | 24 +++++------------------- src/conio/Makefile | 4 ---- src/conio/ciolib.c | 6 ++++-- src/conio/cterm.c | 2 ++ src/conio/mouse.c | 2 ++ src/conio/objects.mk | 8 -------- src/conio/targets.mk | 4 +--- src/conio/win32cio.h | 1 + 9 files changed, 17 insertions(+), 38 deletions(-) diff --git a/src/conio/Common.make b/src/conio/Common.make index 892516ca77..bc80e802e7 100644 --- a/src/conio/Common.make +++ b/src/conio/Common.make @@ -1,5 +1,5 @@ -CIOLIB-MT = $(CIOLIB_SRC)$(DIRSEP)$(LIBODIR)$(DIRSEP)$(LIBPREFIX)ciolib$(LIBFILE) +CIOLIB-MT = $(CIOLIB_SRC)$(DIRSEP)$(LIBODIR)$(DIRSEP)$(LIBPREFIX)ciolib-mt$(LIBFILE) CIOLIB-MT_CFLAGS = -I$(CIOLIB_SRC) CIOLIB-MT_LDFLAGS = -L$(CIOLIB_SRC)$(DIRSEP)$(LIBODIR) -CIOLIB-MT_LIBS = -lciolib +CIOLIB-MT_LIBS = -lciolib-mt diff --git a/src/conio/GNUmakefile b/src/conio/GNUmakefile index b0dd2fb719..52c5ca6cf0 100644 --- a/src/conio/GNUmakefile +++ b/src/conio/GNUmakefile @@ -1,28 +1,14 @@ -# smblib/Makefile - -######################################################################### -# Makefile for Synchronet Message Base Library (SMBLIB) # -# For use with Borland C++ Builder 5+ or Borland C++ 5.5 for Win32 # -# @format.tab-size 4 # -# # -# usage: make # -######################################################################### - -# $Id$ - -# Macros -#DEBUG = 1 # Comment out for release (non-debug) version - SRC_ROOT = .. # Cross platform/compiler definitions include $(SRC_ROOT)/build/Common.gmake # defines clean and output directory rules -CFLAGS += -I$(XPDEV_SRC) -I$(CIOLIB_SRC) -OBJS += $(OBJODIR)$(DIRSEP)curs_cio$(OFILE) +CFLAGS += $(XPDEV-MT_CFLAGS) $(CIOLIB-MT_CFLAGS) + +OBJS += $(MTOBJODIR)$(DIRSEP)curs_cio$(OFILE) ifndef NO_X CFLAGS += -I/usr/X11R6/include - OBJS += $(OBJODIR)$(DIRSEP)console$(OFILE) \ - $(OBJODIR)$(DIRSEP)x_cio$(OFILE) + OBJS += $(MTOBJODIR)$(DIRSEP)console$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)x_cio$(OFILE) endif # CIOLIB Library Link Rule diff --git a/src/conio/Makefile b/src/conio/Makefile index 613fa91176..db5ae8cb28 100644 --- a/src/conio/Makefile +++ b/src/conio/Makefile @@ -13,10 +13,6 @@ # Macros #DEBUG = 1 # Comment out for release (non-debug) version -# Enable auto-dependency checking -.autodepend -.cacheautodepend - SRC_ROOT = .. # Cross platform/compiler definitions !include ..\build\Common.bmake # defines clean and output directory rules diff --git a/src/conio/ciolib.c b/src/conio/ciolib.c index 9407887b89..e9554f80db 100644 --- a/src/conio/ciolib.c +++ b/src/conio/ciolib.c @@ -2,6 +2,8 @@ #include <stdlib.h> /* malloc */ #include <stdio.h> +#include <threadwrap.h> + #define CIOLIB_NO_MACROS #include "ciolib.h" @@ -371,10 +373,10 @@ char *ciolib_getpass(const char *prompt) CIOLIB_INIT(); ciolib_cputs((char *)prompt); - while((ch=getch())!='\n') { + while((ch=ciolib_getch())!='\n') { switch(ch) { case 0: /* Skip extended keys */ - getch(); + ciolib_getch(); break; case '\r': /* Skip \r (ToDo: Should this be treeated as a \n? */ break; diff --git a/src/conio/cterm.c b/src/conio/cterm.c index 25cb53047c..96489be13c 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -1,3 +1,5 @@ +#include <stdlib.h> + #include <genwrap.h> #include <ciolib.h> #include <keys.h> diff --git a/src/conio/mouse.c b/src/conio/mouse.c index 3bd60727c4..896457e577 100644 --- a/src/conio/mouse.c +++ b/src/conio/mouse.c @@ -1,3 +1,5 @@ +#include <stdlib.h> + #include <genwrap.h> #include <semwrap.h> #include <threadwrap.h> diff --git a/src/conio/objects.mk b/src/conio/objects.mk index 43f925bba6..2ad2bc4cb1 100644 --- a/src/conio/objects.mk +++ b/src/conio/objects.mk @@ -1,11 +1,3 @@ -# smblib/objects.mk - -# Make 'include file' listing object files for SMBLIB - -# $Id$ - -# OBJODIR, DIRSEP, and OFILE must be pre-defined - OBJS = $(MTOBJODIR)$(DIRSEP)ansi_cio$(OFILE)\ $(MTOBJODIR)$(DIRSEP)ciolib$(OFILE)\ $(MTOBJODIR)$(DIRSEP)cterm$(OFILE)\ diff --git a/src/conio/targets.mk b/src/conio/targets.mk index 7d4f5a2d0a..5694aaec05 100644 --- a/src/conio/targets.mk +++ b/src/conio/targets.mk @@ -1,4 +1,2 @@ # conio/targets.mk -default: mtlib - -mtlib: $(LIBODIR) $(CIOLIB-MT) +mtlib: $(MTOBJODIR) $(LIBODIR) $(CIOLIB-MT) diff --git a/src/conio/win32cio.h b/src/conio/win32cio.h index 34ab0aa771..13f8814e4f 100644 --- a/src/conio/win32cio.h +++ b/src/conio/win32cio.h @@ -30,6 +30,7 @@ int win32_putch(int); int win32_wherex(void); int win32_wherey(void); void win32_settitle(const char *title); +int win32_initciolib(long inmode); #ifdef __cplusplus } -- GitLab