Print this page
make: unifdef SUN5_0 (defined)

@@ -57,27 +57,18 @@
 get_target_being_reported_for(void)
 {
         return(target_being_reported_for);
 }
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern "C" {
 static void
 close_report_file(void)
 {
         (void)fputs("\n", report_file);
         (void)fclose(report_file);
 }
 } // extern "C"
-#else
-static void
-close_report_file(int, ...)
-{
-        (void)fputs("\n", report_file);
-        (void)fclose(report_file);
-}
-#endif
 
 static void
 clean_up(FILE *nse_depinfo_fp, FILE *merge_fp, char *nse_depinfo_file, char *merge_file, int unlinkf)
 {
         fclose(nse_depinfo_fp);

@@ -95,18 +86,13 @@
  *  Update the file, if necessary.  We don't want to rewrite
  *  the file if we don't have to because we don't want the time of the file
  *  to change in that case.
  */
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern "C" {
 static void
 close_file(void)
-#else
-static void
-close_file(int, ...)
-#endif
 {
         char            line[MAXPATHLEN+2];
         char            buf[MAXPATHLEN+2];
         FILE            *nse_depinfo_fp;
         FILE            *merge_fp;

@@ -212,13 +198,11 @@
         if (file_locked) {
                 unlink(lock_file);
         }
 }
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 } // extern "C"
-#endif
 
 static void
 report_dep(char *iflag, char *filename)
 {
 

@@ -230,15 +214,11 @@
                         return;
                 }
                 if ((search_dir = getenv(NOCATGETS("NSE_DEP"))) == NULL) {
                         return;
                 }
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
                 atexit(close_file);
-#else
-                on_exit(close_file, 0);
-#endif
                 strcpy(sfile, filename);
                 if (iflag == NULL || *iflag == '\0') {
                         return;
                 }
                 fprintf(command_output_fp, "%s:", sfile);

@@ -286,15 +266,11 @@
         ptr = strchr(p, ' ');
         if( ! ptr ) {
                 return;
         }
         sprintf(filename, NOCATGETS("%s-CPP"), ptr+1);
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
         getcwd(curdir, sizeof(curdir));
-#else
-        getwd(curdir);
-#endif
         if (strcmp(curdir, sdir) != 0 && strlen(iflag) > 2 && 
             iflag[2] != '/') {
                 /* Makefile must have had an "cd xx; cc ..." */
                 /* Modify the -I path to be relative to the cd */
                 newiflag = (char *)malloc(strlen(iflag) + strlen(curdir) + 2);

@@ -336,15 +312,11 @@
                         if ((report_file= fopen(filename, "w")) == NULL) {
                                 report_file= (FILE *)-1;
                                 return;
                         }
                 }
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
                 atexit(close_report_file);
-#else
-                (void)on_exit(close_report_file, (char *)report_file);
-#endif
                 if ((p2= strchr(p+1, ' ')) != NULL)
                         *p2= 0;
                 target_being_reported_for= (char *)malloc((unsigned)(strlen(p+1)+1));
                 (void)strcpy(target_being_reported_for, p+1);
                 (void)fputs(p+1, report_file);