Annotation of GNUtools/cc/make-support.c, revision 1.1.1.1

1.1       root        1: 
                      2: #include "make.h"
                      3: #include <string.h>
                      4: #include <stdio.h>
                      5: #include <stdlib.h>
                      6: #include <mach/mach.h>
                      7: #include <servers/netname.h>
                      8: #include <sys/param.h>
                      9: 
                     10: void
                     11: make_support (type, name, file, line, msg, arg1, arg2, arg3)
                     12:       int type;
                     13:       char *name;
                     14:       char *file;
                     15:       int line;
                     16:       char *msg;
                     17:       int arg1;
                     18:       int arg2;
                     19:       int arg3;
                     20: {
                     21:   static port_t port = PORT_NULL;
                     22:   static int already_tried = 0;
                     23:   static char directory[MAXPATHLEN];
                     24:   char message[1000];
                     25:   
                     26:   if (port == PORT_NULL && already_tried == 0)
                     27:     {
                     28:       char *port_name = getenv ("MAKEPORT");
                     29:       char *host_name = getenv ("MAKEHOST");
                     30:       
                     31:       already_tried = 1;
                     32:       
                     33:       if (port_name == NULL)
                     34:         return;
                     35:       
                     36:       if (host_name == NULL)
                     37:         host_name = "";
                     38:       
                     39:       netname_look_up (name_server_port, host_name, port_name, &port);
                     40:       
                     41:       if (port == PORT_NULL)
                     42:        return;
                     43:       
                     44:       getwd (directory);
                     45:     }
                     46:   
                     47:   if (name == NULL)
                     48:     name = "";
                     49:   
                     50:   if (file == NULL)
                     51:     file = "";
                     52:   
                     53:   if (msg == NULL)
                     54:     message[0] = '\0';
                     55:   else
                     56:     sprintf (message, msg, arg1, arg2, arg3);
                     57:   
                     58:   make_alert (port,
                     59:              type,
                     60:              name, strlen (name) + 1,
                     61:              file, strlen (file) + 1,
                     62:              directory, strlen (directory) + 1,
                     63:              line,
                     64:              message, strlen (message) + 1);
                     65: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.