home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / mac / config.h < prev    next >
C/C++ Source or Header  |  1994-10-23  |  3KB  |  88 lines

  1. /* RCS      -- $Header: /u5/dvadura/src/public/dmake/src/mac/RCS/config.h,v 1.1 1994/10/06 17:42:55 dvadura Exp $
  2. -- SYNOPSIS -- Configurarion include file for the Macintosh.
  3. -- 
  4. -- DESCRIPTION
  5. --  There is one of these for each specific machine configuration.
  6. --  It can be used to further tweek the machine specific sources
  7. --  so that they compile.
  8. --
  9. -- AUTHOR
  10. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  11. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  12. --
  13. -- COPYRIGHT
  14. --      Copyright (c) 1992,1994 by Dennis Vadura.  All rights reserved.
  15. -- 
  16. --      This program is free software; you can redistribute it and/or
  17. --      modify it under the terms of the GNU General Public License
  18. --      (version 1), as published by the Free Software Foundation, and
  19. --      found in the file 'LICENSE' included with this distribution.
  20. -- 
  21. --      This program is distributed in the hope that it will be useful,
  22. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  23. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. --      GNU General Public License for more details.
  25. -- 
  26. --      You should have received a copy of the GNU General Public License
  27. --      along with this program;  if not, write to the Free Software
  28. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29. --
  30. -- LOG
  31. --     $Log: config.h,v $
  32.  * Revision 1.1  1994/10/06  17:42:55  dvadura
  33.  * dmake Release Version 4.0, Initial revision
  34.  *
  35. */
  36.  
  37. /* Definitions left out of StdArg.h */
  38. #define va_alist     ...
  39. #define va_dcl
  40.  
  41. #define CONST const
  42.  
  43. #define FALSE 0
  44. #define TRUE 1
  45.  
  46. /* signal extensions */
  47. #define SIGQUIT SIGTERM
  48.  
  49.  
  50. /* Mac doesn't have a stat function or structure so we have to add one in. */
  51. typedef long off_t;
  52. struct stat {
  53.     unsigned short st_mode;
  54.     off_t st_size;
  55.     time_t st_mtime;
  56.     time_t st_ctime;
  57.     /* struct stat has lots of other fields, but we don't need them for dmake */
  58. }; /* struct stat */
  59. #define S_IFDIR  0040000    /* directory */
  60. #define S_IFREG  0100000    /* regular */
  61. #define S_IFMT   (S_IFDIR | S_IFREG)    /* Format */
  62. #define S_IREAD  0000400    /* read owner permission */
  63. #define S_IWRITE 0000200    /* write owner permission */
  64. #define S_IEXEC  0000100    /* execute owner permission */
  65.  
  66.  
  67. /* Global for environmental variables */
  68. extern char **environ;
  69.  
  70.  
  71. /* We really want main to be in the mac directory
  72.    so that we get the envp argument */
  73. #define main(argc, argv)    dmakemain(argc, argv)
  74.  
  75. /* Directory/file info. and directory moving */
  76. int stat (char *pPath, struct stat *pStat);
  77. char *getcwd (char *pPath, size_t pathSize);
  78. int chdir (char *pPath);
  79. int utime (char *pPath, time_t *pTimes);
  80.  
  81. /* Routines to handle conversion from Unix file names to Mac file names */
  82. char *Unix2MacFName(char *pUnixName);
  83. FILE *MacFOpen (char *pName, char *pMode);
  84. #define fopen(pFName, pMode)    MacFOpen(pFName, pMode)
  85.  
  86. /* a small problem with pointer to voids on some unix machines needs this */
  87. #define PVOID void *
  88.