File: README.WINDOWS

package info (click to toggle)
apcalc 2.12.1.5-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,548 kB
  • ctags: 4,129
  • sloc: ansic: 53,374; makefile: 5,589; awk: 96; sed: 33; sh: 13
file content (169 lines) | stat: -rw-r--r-- 5,718 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Dear calc user on a Windoz based system,

See the HOWTO.INSTALL file for information on how to build and install calc.
See also the README file.

NOTE: The main developers do not have access to a Windoz based platform.
      While we will make an effort to not break calc Windoz based system,
      our lack of a Windoz test environment will mean we will make mistakes
      from time to time.  Hopefully Windowz users can overcome these mistakes.
      Of course you are welcome to send us any patches that fix your
      Windoz build environment.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= compiling under DJGPP =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

You might want to try using the DJGPP system to compile calc.  See:

	http://www.delorie.com/djgpp/

for DJGPP details and availability.

To compile with DJGPP, one needs to select a number of Makefile
variable changes.  Eli Zaretskii <eliz at is dot elta dot co dot il>
recommends the following settings:

	TERMCONTROL= -DUSE_TERMIOS
	BYTE_ORDER= -DLITTLE_ENDIAN
	LONG_BITS= 32
	HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS
	FPOS_BITS= 32
	OFF_T_BITS= 32
	DEV_BITS= 32
	INODE_BITS= 32
	HAVE_USTAT= -DHAVE_NO_USTAT
	HAVE_GETSID= -DHAVE_NO_GETSID
	HAVE_GETPGID= -DHAVE_NO_GETPGID
	HAVE_GETTIME= -DHAVE_NO_GETTIME
	HAVE_GETPRID= -DHAVE_NO_GETPRID
	HAVE_URANDOM_H= NO
	ALIGN32= -UMUST_ALIGN32
	HAVE_MALLOC_H= YES
	HAVE_STDLIB_H= YES
	HAVE_STRING_H= YES
	HAVE_TIMES_H= NO
	HAVE_SYS_TIMES_H= YES
	HAVE_TIME_H= YES
	HAVE_SYS_TIME_H= YES
	HAVE_UNISTD_H= YES
	BINDIR= /dev/env/DJDIR/bin
	INCDIR= /dev/env/DJDIR/include
	LIBDIR= /dev/env/DJDIR/lib
	MANDIR= /dev/env/DJDIR/man/man1
	CATDIR= /dev/env/DJDIR/man/cat1
	NROFF= groff
	CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR}
	CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit
	CALCPAGER= less.exe -ci
	DEBUG= -O2 -gstabs+

The 'Linux set' or 'gcc set' (see the Select your compiler type section)
should work for DJGPP systems if you set the above Makefile variables.

Look for Makefile comments of the form:

	# Select ...something... for DJGPP.

Follow those recommendations.  In cases where they conflict with
the above Makefile list, follow the recommendation in the Makefile.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= compiling with Cygwin =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

An effort is being made to allow windows users to compile calc using the
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
and Un*x tools for Windows.

The major porting work was performed by Thomas Jones-Low
(tjoneslo at softstart dot com).  He said:

    I had previous stated to this group that I have successfully managed
    to port a version of Calc to Windows, and promised some point to
    post what was required, so here it is.

    One obvious manner of doing this port is to get the latest version
    of the Cygwin project (http://sources.redhat.com/cygwin/) with the
    GCC compiler and Un*x tools for Windows and recompile.

    I built my working version using Calc ... I am using Visual C++
    version 7.0, which is an older version of the Microsoft development
    tools. The make file provided with Calc is not compatible with
    NMAKE, so I used the Visual Studio tools to generate another one
    (not included). Calc is built in two parts, calc.dll, which is the
    library, and calc.exe which is the command line interface.

He recommended that you generate by hand all of the header files that
by the Makefile.  This has been done for you via the makefile rule:

	make win32_hsrc

which uses the Makefile variables in win32.mkdef to form these header
files under win32 directory.

You will find generated versions of these files located in the win32
sub-directory.  These files may be appropriate for your Cygwin building
needs.

In particular:

	Just copy the win32/*.[ch] files up into the top level calc
	source directory, edit them (if needed) and build using the
	Cygwin GCC compiler and Cygwin build environment.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-= calc maintenance folk =-=-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

People who maintain calc need to keep in mind the following:

The following was added to opcodes.h, config.h, zmath.h and value.h:

	#if defined(_WIN32)
	#ifdef _EXPORTING
	  #define DLL	__declspec(dllexport)
	#else
	  #define DLL	__declspec(dllimport)
	#endif

	#else /* Windoz free systems */

	  #define DLL

	#endif /* Windoz free systems */

Then DLL was added in front of all the exported functions.  For example:

    extern int configtype(char*);

was changed to:

    DLL extern int configtype(char*);


## Copyright (C) 2002  Landon Curt Noll and Thomas Jones-Low
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL.  You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
##
## @(#) $Revision: 29.12 $
## @(#) $Id: README.WINDOWS,v 29.12 2004/07/28 12:52:01 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/RCS/README.WINDOWS,v $
##
## Under source code control:	2001/02/25 14:00:05
## File existed as early as:	2001
##
## chongo <was here> /\oo/\	http://www.isthe.com/chongo/
## Share and enjoy!  :-)	http://www.isthe.com/chongo/tech/comp/calc/