[comp.unix.questions] getwd and floor function calls

young@hamavnet (01/31/91)

I have been doing some porting from DEC Ultrix to Motorola System V/88K.  It
seems that Ultrix is BSD in nature and Motorola is POSIX system V.  I have
some source code written in c that uses the following functions:

getwd()
floor()

They do not seem to be supported in System V.  The following seems to be the
output:

        cc -O -DDIRENT -o xv xv.o xvmisc.o xv24to8.o xvgif.o xvpm.o xvinfo.o
xvc
trl.o xvscrl.o  xvgifwr.o xvdir.o xvbutt.o xvpbm.o xvxbm.o xvgam.o xvfish.o
-lMr
m -lUil -lX11 -lXaw -lXm -lXmu -lXt -lXtm -lbsd -lci -lcrypt -lcs -lcurses -lg
-
lgen -ll -lmnt -lnls -lns -lnsl -lomalloc -lrobot -lsec -ltermcap -ltermlib -ly
undefined                       first referenced
 symbol                             in file
_getwd                              xv.o
_floor                              xvgam.o
ld fatal: Symbol referencing errors. No output written to xv
*** Error code 13

Stop.


If any of you know what the equvalent of the above functions are for system V
I would appreciate it!!


-- 
Brian A. Young       | young@hamavnet.com               | Who gives a rip!
Engineering Services | mcdapps!mcdhwd!briany            | 
Avnet Computer       | fax: 213 280 3944                |

yang@nff.ncl.omron.co.jp (YANG Liqun) (02/05/91)

<young@hamavnet> writes:

>I have been doing some porting from DEC Ultrix to Motorola System V/88K.  It
>seems that Ultrix is BSD in nature and Motorola is POSIX system V.  I have
>some source code written in c that uses the following functions:

>getwd()
>floor()

>They do not seem to be supported in System V.

For floor(), you must use -lm cc option.
For getwd(), getcwd() is the equvalent in System V(but it is slower because
getcwd calls popen to excecute "sh -c pwd".)
Yang
--
-------------------------------------------------------------------------------
|		Yang Li-qun                                                   |
|		OE, OMRON Corporation                                         |
|		20, Igadera Shimokaiinji Nagaokakyo-City                      |
|		Kyoto 617 Japan                                               |
|		Tel: 075-951-5111  Fax: 075-956-7403                          |
|  		E-mail:yang@nff.ncl.omron.co.jp                               |
-------------------------------------------------------------------------------