report.cc revision 10d63b7db37a83b39c7f511cf9426c9d03ea0760
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libintl.h>
static FILE *report_file;
static FILE *command_output_fp;
static char *target_being_reported_for;
static char *search_dir;
static char command_output_tmpfile[30];
static int is_path = 0;
static char sfile[MAXPATHLEN];
extern "C" {
static void (*warning_ptr) (char *, ...) = (void (*) (char *, ...)) NULL;
}
FILE *
get_report_file(void)
{
return(report_file);
}
char *
{
return(target_being_reported_for);
}
extern "C" {
static void
close_report_file(void)
{
(void)fclose(report_file);
}
} // extern "C"
static void
clean_up(FILE *nse_depinfo_fp, FILE *merge_fp, char *nse_depinfo_file, char *merge_file, int unlinkf)
{
if (unlinkf)
else
}
/*
* 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.
*/
extern "C" {
static void
close_file(void)
{
char nse_depinfo_file[MAXPATHLEN];
char merge_file[MAXPATHLEN];
char lock_file[MAXPATHLEN];
int err;
int len;
int changed = 0;
int file_locked;
return;
}
if (err) {
if (warning_ptr != (void (*) (char *, ...)) NULL) {
}
return;
}
/* If .nse_depinfo file doesn't exist */
if (is_path) {
if ((nse_depinfo_fp =
return;
}
!= NULL) {
}
}
if (file_locked) {
}
return;
}
if (file_locked) {
}
return;
}
!= NULL) {
if (is_path) {
/* changed */
changed = 1;
}
}
break;
}
}
!= NULL) {
}
nse_depinfo_file, merge_file, 0);
} else {
}
if (file_locked) {
}
return;
} /* entry found */
}
/* Entry never found. Add it if there is a search path */
if (is_path) {
}
}
if (file_locked) {
}
}
} // extern "C"
static void
{
if (command_output_fp == NULL) {
return;
}
return;
}
return;
}
}
is_path = 1;
}
}
void
{
char *ptr;
char filename[MAXPATHLEN];
char *p;
return;
}
if(ptr) {
is_path = 1;
}
}
void
report_search_path(char *iflag)
{
char curdir[MAXPATHLEN];
char *sdir;
char *newiflag;
char filename[MAXPATHLEN];
char *p, *ptr;
return;
}
return;
}
if( ! ptr ) {
return;
}
/* Makefile must have had an "cd xx; cc ..." */
/* Modify the -I path to be relative to the cd */
} else {
}
}
void
report_dependency(const char *name)
{
register char *filename;
register char *p;
register char *p2;
char nse_depinfo_file[MAXPATHLEN];
if (report_file == NULL) {
return;
}
return;
}
if(p) {
*p= 0;
} else {
return;
}
return;
}
}
*p2= 0;
*p= ' ';
*p2= ' ';
}
return;
}