[cs631apue] HW5 questions

Kiran kbhamra at stevens.edu
Thu Dec 8 11:31:27 EST 2011

I am also having problems with compiling it. I was also wondering, if we change it to work for linux then we would have changed the orginal code for netbsd, which means it may or may not work on netbsd when you ran the patch. Since diff will catch all changes we made to the code.


Rob Hoffmann <rhoffman at stevens.edu> wrote:

>I am struggling with this issue as well. When I run "gcc -Wall cmp.c 
>ls.c main.c print.c util.c -o ls" there are a /lot/ of errors shown. I 
>understand that Linux has functionally equivalent functions for some 
>things, but many of these errors have to do with undefined constants 
>(HN_AUTOSCALE, HN_NOSPACE), missing header files (util.h, tzfile.h), and 
>missing data structure members (no st_mtimensec in struct stat).
>Even compiling without -Wall, I count 64 warnings and errors.
>I don't know if all this was the intent of the assignment, but at what 
>point do we draw the line between trying to fix everything and simply 
>removing code that is not defined?
>On 12/4/2011 5:40 PM, Jan Schaumann wrote:
>> Simon Sidhom<ssidhom at stevens.edu>  wrote:
>>> I'm not sure if we talked about this in class but I am having a lot of
>>> trouble getting the NetBSD version of ls to compile on the linux lab. There
>>> is no util.h and I get a long list of errors from references to functions
>>> that don't exist. Did you teach us a more practical way of dealing with
>>> this instead of re-writing all of the missing functions?
>> You don't have to write any new functions yourself.  Whatever functions
>> are called that are not available on linux can be replaced with
>> functionally equivalent calls to existing functions or with minor tweaks
>> here and there.
>>> I feel like I'm working too hard for this to be a homework about CVS,
>>> diff, and patch.
>> The "porting" of the software is one of the so-called "hidden
>> requirements", but in this case the changes you'd have to make to have
>> this version of ls build and function on the linux systems are not very
>> large.
>> -Jan
>> _______________________________________________
>> cs631apue mailing list
>> cs631apue at lists.stevens.edu
>> https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue
>cs631apue mailing list
>cs631apue at lists.stevens.edu

More information about the cs631apue mailing list