home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / coherent / 4517 < prev    next >
Encoding:
Text File  |  1992-09-14  |  3.7 KB  |  109 lines

  1. Newsgroups: comp.os.coherent
  2. Path: sparky!uunet!spool.mu.edu!darwin.sura.net!pirates!daler
  3. From: daler@Armstrong.EDU (Dale Reagan)
  4. Subject: Coherent Porting Tips #1 (send your tips!)
  5. Message-ID: <1992Sep15.024507.27374@Armstrong.EDU>
  6. Followup-To: comp.os.coherent
  7. Summary: several tips for porting software to Coherent
  8. Keywords: port, software, tips, Coherent
  9. Organization: Dale Reagan, Consultant
  10. Date: Tue, 15 Sep 1992 02:45:07 GMT
  11. Lines: 96
  12.  
  13.  
  14. Port tips included below!
  15. ************************************************************************
  16. If you have tips, then please post them (and mail a copy to me) and I will
  17. compile them and release a Coherent software porting FAQ or info file or 
  18. tip file according to the type of information sent.
  19.  
  20. When using email, send to:
  21.  
  22.         coh_tips@dreagan.UUCP
  23.                 OR
  24.         dreagan!coh_tips@pirates.armstrong.edu
  25.  
  26. When POSTING to the net or when using email it would be helpful if you 
  27. included the word 'tip' in the subject line.  
  28.  
  29. i.e. Subject: Porting xyz program under Coherent (tip) 
  30.  
  31. I look forward to some positive feedback and tons of good mail!
  32.  
  33. :)
  34. Dale
  35. ************************************************************************
  36.  
  37. From emory!beehive!paul  Fri Sep  4 07:33:17 1992 remote from pirates
  38.  
  39. 1. These are a set of notes to help port code to Mark Williams' Coherent.  Often
  40. it is obvious what is wrong ("ld: can't open libtermcap.a"), but it isn't clear
  41. how to fix it.
  42.  
  43. Replace -ltermcap with -lterm.
  44.  
  45. 2. Include time.h, not sys/time.h.
  46. 3. Include sys/poll.h, not poll.h.
  47. 4. Terminal ioctl is in sgtty.h, not sys/file.h.
  48.  
  49. 5. Random number functions are srand() (to "seed" or set the random number
  50. generator) and rand() (to return random numbers).  Some systems use random48()
  51. or rnd().
  52.  
  53. 6. Coherent 386 has small (16 bit) ints, while most work stations have 32 bit
  54. ints.  Thus where 70000 is okay as an int on some machines, it should be
  55. declared as long (70000L) for Coherent.  Remember to change the variables
  56. holding those values from int to long, too.
  57.  
  58. 7. A make failed with
  59.     350: letters.c: call of non function
  60. the source code said
  61.     int (*ding)();
  62.         ...
  63.     ding();
  64. when it should have been
  65.     (*ding)();
  66. Apparently the system(s) it was developed on were more forgiving about the
  67. function call.
  68.  
  69. 8. COHERENT is defined, so you can change source code with
  70.     #ifdef COHERENT
  71.     code which works on coherent
  72.     #else
  73.     code which doesn't work on coherent
  74.     #endif
  75.  
  76. 9. Every Makefile target (line with a ':') must have an action even if it is
  77. empty.  Otherwise make says, "don't know how to make target."  For example
  78.     all:    update backdate ingrate
  79. won't work
  80.     all:    update backdate ingrate
  81.         
  82. (second line is just a tab) works fine.
  83. ************************************************************************
  84.  
  85. From: pirates!ccwf.cc.utexas.edu!vax (Vax)
  86.  
  87. 10. I have had much luck with specifying interactive 386 and version 7 as
  88. the operating system.  szrz1202 compiled with no modifications with i386
  89. as the make option.
  90.  
  91. Include files:
  92. 11. This can get hairy.  The changes that come to mind are:
  93. <time.h> must often be changed to <sys/time.h>
  94. <strings.h> is sometimes present; should be <string.h> in Coherent.
  95. You may wish to double check these, I may have inverted them.  Since I'm
  96. using DOS right now, I can't shell out & check myself.  Look in /usr/include.
  97. ************************************************************************
  98. end of port notes #1...
  99.  
  100. Enjoy!
  101.  
  102. :)
  103. Dale
  104. -- 
  105. ------------------------------------------------------------------------------
  106. Dale E. Reagan          |         daler@armstrong.edu        |  (912) 236-1686
  107. Consulting Programmer |      or dreagan!dale@armstrong.edu |  (912) 238-8279
  108. Savannah, GA 31404    |       or dreagan@novavax.nova.edu  |
  109.