compile_et: compile_et.o error_table.o
$(Q)case $(SYS_NAME) in \
*_linux* | *_umlinux* | *_darwin* ) \
- $(AFS_LDRULE_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr;; \
+ $(LT_LDRULE_static_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr $(buildtool_roken) $(MT_LIBS);; \
* ) \
- $(AFS_LDRULE_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr -ll;; \
+ $(LT_LDRULE_static_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr -ll $(buildtool_roken) $(MT_LIBS);; \
esac
libafscom_err.a: $(LT_objs)
char c_file[MAXPATHLEN]; /* output file */
char h_file[MAXPATHLEN]; /* output */
char msf_file[MAXPATHLEN];
-char et_file[MAXPATHLEN]; /* full path to input file */
static void
usage(void)
main(int argc, char **argv)
{
char *p, *ename;
+ char *et_file;
char const *const *cpp;
int got_language = 0;
char *got_include = 0;
filename = p;
}
- sprintf(et_file, "%s/%s", got_prefix, filename);
+ if (asprintf(&et_file, "%s/%s", got_prefix, filename) < 0) {
+ fprintf(stderr, "Couldn't allocate memory for filename\n");
+ exit(1);
+ }
yyin = fopen(et_file, "r");
if (!yyin) {
exit(1);
}
+ free(et_file);
+
/* on NT, yyout is not initialized to stdout */
if (!yyout) {
yyout = stdout;