[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (e2aee1a681638b45d90efbae458dd8568e0f1ae2)



The branch, master has been updated
       via  e2aee1a681638b45d90efbae458dd8568e0f1ae2 (commit)
      from  0d9ba68b6cf49aa5a468b8196a7c6a5612df5914 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/misc.c |   14 ++++++++++++++
 src/misc.h |    5 ++++-
 2 files changed, 18 insertions(+), 1 deletions(-)


=================
 Commit Messages
=================

commit e2aee1a681638b45d90efbae458dd8568e0f1ae2
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix mkdir() in plugins.
    
    Plugins include misc.h without having a valid config.h, which
    meant they'd get a build error.  This patch moves the error
    check into pcb's misc.c, which always has a config.h, and lets
    plugins have a MKDIR() macro that uses pcb's detected values.

:100644 100644 ca42e97... a8e08ea... M	src/misc.c
:100644 100644 affff00... ac3d442... M	src/misc.h

=========
 Changes
=========

commit e2aee1a681638b45d90efbae458dd8568e0f1ae2
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Fix mkdir() in plugins.
    
    Plugins include misc.h without having a valid config.h, which
    meant they'd get a build error.  This patch moves the error
    check into pcb's misc.c, which always has a config.h, and lets
    plugins have a MKDIR() macro that uses pcb's detected values.

diff --git a/src/misc.c b/src/misc.c
index ca42e97..a8e08ea 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -2186,6 +2186,20 @@ GetInfoString (void)
 }
 
 /* ---------------------------------------------------------------------------
+ * mkdir() implentation, mostly for plugins, which don't have our config.h.
+ */
+
+#ifdef MKDIR_IS_PCBMKDIR
+#error "Don't know how to create a directory on this system."
+#endif
+
+int
+pcb_mkdir (const char *path, int mode)
+{
+  return MKDIR (path, mode);
+}
+
+/* ---------------------------------------------------------------------------
  * Returns a best guess about the orientation of an element.  The
  * value corresponds to the rotation; a difference is the right value
  * to pass to RotateElementLowLevel.  However, the actual value is no
diff --git a/src/misc.h b/src/misc.h
index affff00..ac3d442 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -145,9 +145,12 @@ void NetlistChanged (int force_unfreeze);
          /* plain Windows 32 */
          #define MKDIR(a, b) _mkdir(a)
         #else
-         #error "Don't know how to create a directory on this system."
+         #define MKDIR(a, b) pcb_mkdir(a, b)
+         #define MKDIR_IS_PCBMKDIR 1
+         int pcb_mkdir (const char *path, int mode);
         #endif
 #endif
 
+
 #endif /* __MISC_INCLUDED__ */
 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs