Merge branch 'master' of github.com:RetroBSD/retrobsd

This commit is contained in:
Matt Jenkins
2016-07-03 16:48:42 +01:00
11 changed files with 42 additions and 6 deletions

View File

@@ -38,6 +38,7 @@
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <time.h>
# include <errno.h>
# include <getopt.h>
#else

View File

@@ -97,7 +97,7 @@ typedef struct {
/* Header structure internal format. */
typedef struct {
off_t size; /* size of the object in bytes */
long date; /* date */
time_t date; /* date */
int lname; /* size of the long name in bytes */
int gid; /* group */
int uid; /* owner */

View File

@@ -2,7 +2,7 @@
#include <fcntl.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/termios.h>
#include <termios.h>
#include <strings.h>
#include <errno.h>
#include <unistd.h>

View File

@@ -33,6 +33,17 @@ ifndef MIPS_GCC_PREFIX
endif
endif
# Generic MIPS toolchain on *BSD
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can build it from sources, as described on page
# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips
# Maybe you can install it from packages one day too.
ifndef MIPS_GCC_PREFIX
ifeq (/usr/local/mips-elf/bin/mips-elf-gcc,$(wildcard /usr/local/mips-elf/bin/mips-elf-gcc))
MIPS_GCC_PREFIX = /usr/local/mips-elf/bin/mips-elf-
endif
endif
# Mentor Sourcery CodeBench Lite toolchain
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ifndef MIPS_GCC_PREFIX

View File

@@ -41,6 +41,19 @@ ifeq (/usr/local/mips-gcc-4.8.1/bin/mips-elf-gcc,$(wildcard /usr/local/mips-gcc-
endif
endif
# Generic MIPS toolchain on *BSD
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can build it from sources, as described on page
# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips
# Maybe you can install it from packages one day too.
ifndef GCCPREFIX
ifeq (/usr/local/mips-elf/bin/mips-elf-gcc,$(wildcard /usr/local/mips-elf/bin/mips-elf-gcc))
GCCPREFIX = /usr/local/mips-elf/bin/mips-elf-
LDFLAGS =
INCLUDES =
endif
endif
# Mentor Sourcery CodeBench Lite toolchain
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# You can download a Linux or Windows binary package from

View File

@@ -2,6 +2,7 @@
BIN = config
SRCS = main.cpp config.cpp mapping.cpp device.cpp cluster.cpp util.cpp core.cpp gstore.cpp
OBJS = main.o config.o mapping.o device.o cluster.o util.o core.o gstore.o
CXX = g++
CXXFLAGS = -Wall -O
all: .depend $(BIN)

View File

@@ -22,6 +22,7 @@
* this software.
*/
#include <stdio.h>
#include <time.h>
#include "bsdfs.h"
extern int verbose;

View File

@@ -77,7 +77,7 @@ typedef struct {
unsigned ilock; /* lock during I list manipulation */
unsigned fmod; /* super block modified flag */
unsigned ronly; /* mounted read-only flag */
long utime; /* current date of last update */
time_t utime; /* current date of last update */
unsigned tfree; /* total free blocks */
unsigned tinode; /* total free inodes */
char fsmnt [MAXMNTLEN]; /* ordinary file mounted on */
@@ -127,9 +127,9 @@ typedef struct {
#define SYS_IMMUTABLE 0x0200 /* file may not be changed */
#define SYS_APPEND 0x0400 /* writes to file may only append */
long atime; /* time last accessed */
long mtime; /* time last modified */
long ctime; /* time created */
time_t atime; /* time last accessed */
time_t mtime; /* time last modified */
time_t ctime; /* time created */
} fs_inode_t;
typedef struct {

View File

@@ -23,6 +23,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "bsdfs.h"
extern int verbose;

View File

@@ -131,10 +131,17 @@ static void add_entry (manifest_t *m, int filetype, char *path, char *link,
/*
* Compare two entries of file traverse scan.
*/
#ifdef __FreeBSD__
static int ftsent_compare (const FTSENT * const *a, const FTSENT *const *b)
{
return strcmp((*a)->fts_name, (*b)->fts_name);
}
#else
static int ftsent_compare (const FTSENT **a, const FTSENT **b)
{
return strcmp((*a)->fts_name, (*b)->fts_name);
}
#endif
/*
* Scan the directory and create a manifest from it's contents.

View File

@@ -13,6 +13,7 @@
#define _GNU_SOURCE
#include <sys/signal.h>
#include <sys/socket.h>
#include <string.h>
#include "vm.h"