Fix build with -fno-common

This commit is contained in:
Stefan Eßer 2020-09-26 12:54:58 +00:00
parent a69a6ecc26
commit 06412f62ef
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550177
7 changed files with 93 additions and 8 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= retail
PORTVERSION= 1.0.1
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://xjack.org/retail/download/ \
http://www.bsdstore.ru/downloads/

View File

@ -1,12 +1,11 @@
--- Makefile.in-orig 2010-05-23 01:04:54.000000000 +0400
+++ Makefile.in 2010-05-23 01:05:04.000000000 +0400
@@ -1,6 +1,8 @@
--- Makefile.in.orig 2003-04-04 20:41:30 UTC
+++ Makefile.in
@@ -3,6 +3,8 @@ DESTDIR =
default:
cd src ; make
cd src ; make
+all: default
+
clean:
cd src ; make clean
rm -f *~
cd src ; make clean
rm -f *~

View File

@ -0,0 +1,13 @@
--- src/getopt.c.orig 2003-03-18 18:24:14 UTC
+++ src/getopt.c
@@ -21,6 +21,10 @@
/* Yee ole includes (I put this all in one file for my sanity) */
#include "include.h"
+short int debug; /* do we go into debug mode? (developer test only */
+char *suffix; /* suffix of the file we open to store stats in */
+char *prefix; /* prefix directory for where we put stats files */
+
/* our 'print usage to user' function */
void proc_args_usage(char *myname) {
fprintf(stderr, "retail v %s\n", VERSION);

View File

@ -0,0 +1,11 @@
--- src/main.c.orig 2003-03-18 17:48:18 UTC
+++ src/main.c
@@ -21,6 +21,8 @@
/* Yee ole includes (I put this all in one file for my sanity) */
#include "include.h"
+short int retval; /* what value do we return at the end of all this */
+char **files; /* an array of all the file's we'll be opening */
int main(int argc, char **argv) {
long int i;

View File

@ -0,0 +1,13 @@
--- src/open_files.c.orig 2003-03-18 17:48:22 UTC
+++ src/open_files.c
@@ -21,6 +21,10 @@
/* Yee ole includes (I put this all in one file for my sanity) */
#include "include.h"
+FILE *in_file; /* the files we'll be reading for input */
+FILE *in_stat; /* the file we're using to store our place in in_file */
+char *st_filename; /* the var we store the name of the offset file */
+
int open_infile(char *fname) {
/* open our input file read only */
in_file = fopen(fname, "r");

View File

@ -0,0 +1,11 @@
--- src/read_files.c.orig 2003-03-18 17:48:28 UTC
+++ src/read_files.c
@@ -21,6 +21,8 @@
/* Yee ole includes (I put this all in one file for my sanity) */
#include "include.h"
+FILE_STAT f;
+
int read_infile_llcheck() {
long int i;
short int found = 0;

View File

@ -0,0 +1,37 @@
--- src/retail.h.orig 2003-03-18 17:48:46 UTC
+++ src/retail.h
@@ -19,16 +19,16 @@
*/
/* global variables */
-short int retval; /* what value do we return at the end of all this */
-short int debug; /* do we go into debug mode? (developer test only */
-FILE *in_file; /* the files we'll be reading for input */
-FILE *in_stat; /* the file we're using to store our place in in_file */
-char *st_filename; /* the var we store the name of the offset file */
-
-char **files; /* an array of all the file's we'll be opening */
-char *suffix; /* suffix of the file we open to store stats in */
-char *prefix; /* prefix directory for where we put stats files */
+extern short int retval; /* what value do we return at the end of all this */
+extern short int debug; /* do we go into debug mode? (developer test only */
+extern FILE *in_file; /* the files we'll be reading for input */
+extern FILE *in_stat; /* the file we're using to store our place in in_file */
+extern char *st_filename; /* the var we store the name of the offset file */
+extern char **files; /* an array of all the file's we'll be opening */
+extern char *suffix; /* suffix of the file we open to store stats in */
+extern char *prefix; /* prefix directory for where we put stats files */
+
/* structure for our info on the file */
typedef struct {
long int ipos; /* last position as an int */
@@ -36,7 +36,7 @@ typedef struct {
char *last_line; /* last known line in the file */
} FILE_STAT;
-FILE_STAT f;
+extern FILE_STAT f;
/* our local functions */
int proc_args(int argc, char **argv);