Index of /rsquared/download/sys-sizes
Name Last modified Size Description
Parent Directory 04-Oct-2009 14:11 -
sys-sizes.tar.bz2 05-Oct-2009 23:16 9k
**************************************************************************
Copyright 2005, 2006, 2007, 2008, 2009 RSquared
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 2 of the License, or (at your option)
any later version.
This program 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 General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************
sys-sizes 0.1 README
--------------------
Contact: mr_semantics |at| {hotmail} [dott] <com>
This program, when run, computes various sizes of machine dependant
variables. In its basic form, it will display (in bytes) the sizes of
Signed: char, short, int, long, long long
Unsigned: char, short, int, long, long long
Miscellaneous: Single precision float, double precision float,
long double precision float, pointer data type, size_t
(optionally): ssize_t
(optionally): Max (per process, soft limit) stack size in Kb.
1) Obtaining Source files:
-----------------------
The latest version of this software can be found at
http://www3.sympatico.ca/rsquared/download/sys-sizes/
The software package is available as a tar.bz2 file.
2) Extracting source files:
------------------------
Extract the sourcefiles by issuing the command
tar -jxvf sys-sizes.tar.bz2
This will extract the bzipped tarball into its own directory 'sys-sizes';
inside you should find this file (README), as well as the Makefile,
and the source file sys-sizes.c. You will also find a copy of the GNU GPL
v. 2 license agreement, which this software is released under.
3) Using the Makefile
------------------
NOTE: Though this software will build on FreeBSD systems, it will not work
with the default 'make' which is actually 'pmake.' The Makefile included
with this distribution works with the GNU make utility, and not pmake.
To build with GNU make, ensure that gmake is installed on your system, and
issue the 'gmake' command in place of 'make'. See Section 4 of this
README for further system requirements.
Once you are in the directory 'sys-sizes' you can use make to do a variety
of tasks:
a) Simply typing 'make' will invoke the compiler and the source
will be built producing the executable 'sys-sizes'. It can be run from
the current directory by issuing the command ./sys-sizes from the
shell.
b) Typing 'make sys-sizes-ssize_t' will add the option
of displaying the size of ssize_t on your machine.
c) Typing 'make sys-sizes-max_stack' will add the option
of displaying the current maximum stack size of a process on your
machine. The number is in Kilobytes, and corresponds to issuing the
'ulimit -s' command under Linux.
d) Typing 'make sys-sizes-full' will add both of the optional
features above, i.e., sys-sizes-ssize_t and sys-sizes-max_stack.
e) Typing 'make install' will install the executable in ~/bin/
If you do not have a bin/ directory in your home directory, make will
complain. You can either make a bin/ directory in your /home/
directory, or change the relevant line in the Makefile to have it
install the sys-sizes executable to the directory of your choosing.
If you do create your own bin/ directory, remember that you need to
add it to your $PATH variable. Alternatively, you could manually copy
the executable to the desired installation directory.
Assuming the Makefile is able to sucessfully copy the executable to
the destination directory, it then sets the permissions on the
executable to 544. Then it executes 'make distclean' (see below,
point 'f')
f) Typing 'make distclean' removes all files in the current directory
that were not part of the original distribution. In other words,
after doing make distclean, the only files that should be left in the
current directory, sys-sizes, should be this README, a Makefile,
sys-sizes.c and a copy of the GNU GPL v. 2 license.
g) Typing 'make clean' removes all files in the current directory that
were not part of the original distribution, *except* for the
executable 'sys-sizes,' assuming that it has been built already.
4) Software/System Requirements
----------------------------
This software should build if you have the following software:
* gcc 4.1.2 (Enter gcc -v at the command prompt)
* GNU make 3.81 (Enter make -v at the command prompt, or gmake -v
on FreeBSD)
* bash 3.2.33 (Enter /bin/bash --version at the command prompt)
* GNU/Linux system
* FreeBSD system
It is quite likely that this program will compile and build with older
versions of the above software, but there are no guarantees.
Additionally, the optional parts of the program, i.e.,
sys-sizes-ssize_t and sys-sizes-max_stack, are NOT considered part of
ANSI C (whereas the rest of the program is), and may not build on
different *nix machines (i.e., Solaris, AIX, Mac OSX, etc.)