Skip to content

Commit

Permalink
crypt: don't include ufc-crypt.h multiple times
Browse files Browse the repository at this point in the history
The file has no inclusion guards, and contains typedefs that
cause errors when included multiple times with older (pre-C11)
compilers such as gcc 4.4.

Save the "#ifdef DOS" content to crypt-private.h even though
it's likely not particularly useful.
  • Loading branch information
Chris Metcalf committed Jun 6, 2014
1 parent 8540f6d commit 4d3ae03
Showing 5 changed files with 17 additions and 23 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2014-06-06 Chris Metcalf <cmetcalf@tilera.com>

* crypt/crypt-private.h [DOS]: Add some includes taken from the
other files in the crypt directory.
* crypt/crypt.c: Remove duplicate includes.
* crypt/crypt-entry.c: Likewise.
* crypt/crypt_util.c: Likewise.

2014-06-06 Joseph Myers <joseph@codesourcery.com>

* Makeconfig (run-program-env): New variable.
10 changes: 0 additions & 10 deletions crypt/crypt-entry.c
Original file line number Diff line number Diff line change
@@ -34,16 +34,6 @@
#define STATIC static
#endif

#ifndef DOS
#include "ufc-crypt.h"
#else
/*
* Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein)
* for DOS patches
*/
#include "ufc.h"
#endif
#include "crypt.h"
#include "crypt-private.h"

/* Prototypes for local functions. */
9 changes: 9 additions & 0 deletions crypt/crypt-private.h
Original file line number Diff line number Diff line change
@@ -28,7 +28,16 @@
#include <features.h>
#include <stdbool.h>

#ifndef DOS
#include "ufc-crypt.h"
#else
/*
* Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein)
* for DOS patches
*/
#include "pl.h"
#include "ufc.h"
#endif
#include "crypt.h"

/* crypt.c */
2 changes: 0 additions & 2 deletions crypt/crypt.c
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@
*
*/

#include "ufc-crypt.h"
#include "crypt.h"
#include "crypt-private.h"

#ifdef _UFC_32_
11 changes: 0 additions & 11 deletions crypt/crypt_util.c
Original file line number Diff line number Diff line change
@@ -33,17 +33,6 @@
#define STATIC static
#endif

#ifndef DOS
#include "ufc-crypt.h"
#else
/*
* Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein)
* for DOS patches
*/
#include "pl.h"
#include "ufc.h"
#endif
#include "crypt.h"
#include "crypt-private.h"

/* Prototypes for local functions. */

0 comments on commit 4d3ae03

Please sign in to comment.