Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solaris 2.3



Hi;
I managed to compile crossfire-0.90.2 on solaris 2.3!
But with the following modifications, which I hope may be
included in the next release; I made the same changes in
crossfire-0.90.1{,a}.
I suggest to remove the
#ifdef SOLARIS2_1
instructions.
If they are needed for a special SOLARIS version, change them to
#if (__sun__) && OSMajorVersion >= 5 && OSMinorVersion == 1
...

The last patch will be needed for all systems to enable the search command
(Which I think is very usefull)

For all files I include an individual patch out of a context diff.
Please feed all the lines between corresponding
----------------- snip snip ----------------------------
lines one after another to patch 
Or remove those lines and the comments and give them all advance.

So here they are:

for make install.man in doc and lib target xbmtobdf change:
----------------- snip snip ----------------------------
0 root@isg-200: diff -c doc/Imakefile.dist doc/Imakefile
*** doc/Imakefile.dist  Mon Mar  7 07:57:31 1994
--- doc/Imakefile       Tue Mar  8 15:15:54 1994
***************
*** 32,38 ****
        crossfire.doc crossfire.man crosslib.doc \
        editable.README mapguide mapmakers_guide_to_runes \
        spell_params.doc spellcasters_guide_to_runes spoiler.ps \
!       xbmtobdf.man xledit.man 
  
  
  spoiler.ps: force_depend
--- 32,38 ----
        crossfire.doc crossfire.man crosslib.doc \
        editable.README mapguide mapmakers_guide_to_runes \
        spell_params.doc spellcasters_guide_to_runes spoiler.ps \
!       xledit.man 
  
  
  spoiler.ps: force_depend
***************
*** 50,56 ****
  /* InstallManPage(xledit) */
  
  InstallManPage(crossfire, $(MANDIR))
- InstallManPage(xbmtobdf, $(MANDIR))
  InstallManPage(xledit, $(MANDIR))
  
  depend::
--- 50,55 ----
----------------- snip snip ----------------------------
for daemon.c to include the right header files
----------------- snip snip ----------------------------
1 root@isg-200: diff -c server/daemon.c.dist server/daemon.c
*** server/daemon.c.dist        Mon Mar  7 07:57:41 1994
--- server/daemon.c     Tue Mar  8 14:48:49 1994
***************
*** 88,94 ****
        (void) ioctl (i, TIOCTTY, &zero);
  #else
  #ifndef TIOCNOTTY /********* !!!!!!!!! **********/
! #ifdef SOLARIS2_1
  #include <sys/termios.h>
  #else
  #include <sys/ttycom.h>
--- 88,94 ----
        (void) ioctl (i, TIOCTTY, &zero);
  #else
  #ifndef TIOCNOTTY /********* !!!!!!!!! **********/
! #if defined (__sun__) && defined(SVR4)
  #include <sys/termios.h>
  #else
  #include <sys/ttycom.h>
***************
*** 101,107 ****
  
  
  #ifdef SYSV
! #if defined(hpux) || defined(sgi) /* Added sgi. -Frank */
      setsid();
  #else
      setpgrp (0, 0);
--- 101,107 ----
  
  
  #ifdef SYSV
! #if defined(__sun__) || defined(hpux) || defined(sgi) /* Added sgi. -Frank */
      setsid();
  #else
      setpgrp (0, 0);
----------------- snip snip ----------------------------
for socket.c 
----------------- snip snip ----------------------------
1 root@isg-200: diff -c server/socket.c.dist server/socket.c
*** server/socket.c.dist        Mon Mar  7 07:57:43 1994
--- server/socket.c     Tue Mar  8 15:45:02 1994
***************
*** 66,72 ****
    if(server_mode == SERVER_ENABLED || debug)
      LOG(llevError,"Opening add user socket on %d\n",PORT);
  
! #if defined(hpux) || defined (SOLARIS2_1)
    max_filedescriptors = sysconf(_SC_OPEN_MAX);
  #else
    max_filedescriptors = getdtablesize();
--- 66,72 ----
    if(server_mode == SERVER_ENABLED || debug)
      LOG(llevError,"Opening add user socket on %d\n",PORT);
  
! #if defined(hpux) || (defined(__sun__) && defined (SVR4))
    max_filedescriptors = sysconf(_SC_OPEN_MAX);
  #else
    max_filedescriptors = getdtablesize();
***************
*** 105,111 ****
      perror("error on setsockopt LINGER (NULL version)");
  #endif
  
! #if defined(__osf__) || defined(hpux) || defined(sgi) || defined(NeXT)
    {
      const char tmp =1;
  
--- 105,111 ----
      perror("error on setsockopt LINGER (NULL version)");
  #endif
  
! #if defined(__osf__) || defined(hpux) || defined(sgi) || defined(NeXT) || defined(__sun__)
    {
      const char tmp =1;
  
----------------- snip snip ----------------------------
for client.c memcpy is available under sunsos[45]
----------------- snip snip ----------------------------
1 root@isg-200: diff -c client/client.c{.dist,}
*** client/client.c.dist        Mon Mar  7 07:57:46 1994
--- client/client.c     Tue Mar  8 15:00:40 1994
***************
*** 234,244 ****
        fprintf(stderr,"Unknown host: %s\n",hostname);
        return 1;
      }
- #ifdef SOLARIS2_1
      memcpy(&insock.sin_addr, hostbn->h_addr, hostbn->h_length);
- #else
-     bcopy(hostbn->h_addr, &insock.sin_addr, hostbn->h_length);
- #endif
      sprintf(buf,"xhost +%s",hostbn->h_name);
    }
    if (optcmd == (char *) NULL)
--- 234,240 ----
----------------- snip snip ----------------------------
I resorted sunos.h and removed duplicate entries and some invalid one:
----------------- snip snip ----------------------------
1 root@isg-200: diff -c include/sunos.h{.dist,}
*** include/sunos.h.dist        Mon Mar  7 07:58:12 1994
--- include/sunos.h     Tue Mar  8 14:46:17 1994
***************
*** 38,119 ****
  #else
  #include <unistd.h>
  #endif
! int strcasecmp(char *, char *);
  char *getenv();
  char *index();
  int _flsbuf();
  int cfree();
- /* extern int free(); */
  int close();
  int fclose();
- int pclose();
- void rewind();
  int fgetc();
  int fputs();
  int fscanf();
  int ftime();
! int fread();
! int getpid();
  int printf();
  int puts();
  int read();
! int rename(char *s1, char *s2);
  int scanf();
  int sscanf();
! int ungetc();
! int unlink();
! int write();
! long atol();
! long RANDOM();
  long strtol();
  time_t time();
! void bcopy();
! /* void exit(); */
! void perror();
! void srandom();
! uid_t getuid();
! uid_t geteuid();
! int seteuid();
! gid_t getgid();
! gid_t getegid();
! int setegid();
! char *_crypt();
! int rmdir();
! int getdtablesize();
! void bzero();
! int select();
! int dup();
  int vprintf();
  int vsprintf();
! int socket();
! int setsockopt();
! int bind();
! int listen();
! int accept();
! char *strdup_local(char *txt);
! int socket();
! int setsockopt();
! int bind();
! int connect();
! int listen();
! int accept();
! int gettimeofday();
! int strncasecmp();
! int gethostname();
! int fork();
! int dup2();
! int ioctl();
! int setpgrp();
  
! #ifndef SOLARIS2_1
! int printf();
! int fprintf();
! int fscanf();
! int scanf();
! int sscanf();
! int system(char *);
! char *memset();
  void fseek (FILE *,long,int);
  int strftime();
! void fflush();
  #endif
--- 38,109 ----
  #else
  #include <unistd.h>
  #endif
! 
! char *_crypt();
  char *getenv();
  char *index();
+ char *memset();
+ char *strdup_local(char *txt);
+ long RANDOM();
  int _flsbuf();
+ int accept();
+ long atol();
+ void bcopy();
+ int bind();
+ void bzero();
  int cfree();
  int close();
+ int connect();
+ int dup();
+ int dup2();
  int fclose();
  int fgetc();
+ int fprintf();
  int fputs();
  int fscanf();
  int ftime();
! int getdtablesize();
! gid_t getegid();
! uid_t geteuid();
! gid_t getgid();
! int gethostname();
! int gettimeofday();
! uid_t getuid();
! int ioctl();
! int listen();
! int pclose();
! void perror();
  int printf();
  int puts();
  int read();
! void rewind();
! int rmdir();
  int scanf();
+ int select();
+ int setegid();
+ int seteuid();
+ int setsockopt();
+ int socket();
+ void srandom();
  int sscanf();
! int strcasecmp(char *, char *);
! int strncasecmp();
  long strtol();
  time_t time();
! int ungetc();
! int unlink();
  int vprintf();
  int vsprintf();
! int write();
  
! #ifndef SVR4
! void fflush();
! int fork();
! int fread();
  void fseek (FILE *,long,int);
+ int getpid();
+ int rename(char *s1, char *s2);
+ int setpgrp(void);
  int strftime();
! int system(char *);
  #endif
----------------- snip snip ----------------------------
for the search command to be available:
0 root@isg-200: diff -c include/sproto.h{.dist,}
*** include/sproto.h.dist       Mon Mar  7 07:58:12 1994
--- include/sproto.h    Tue Mar  8 14:33:26 1994
***************
*** 185,190 ****
--- 185,191 ----
  extern int command_rotateinventory ( object *op, char *params );
  extern int command_invisible ( object *op, char *params );
  extern int command_rotateshoottype ( object *op, char *params );
+ extern int command_search ( object *op, char *params );
  extern int command_show ( object *op, char *params );
  extern int command_throw ( object *op, char *params );
  extern int command_brace ( object *op, char *params );
----------------- snip snip ----------------------------


I hope this helps
MfG
Klaus