[Libreoffice-commits] core.git: soltools/cpp

Stephan Bergmann sbergman at redhat.com
Thu Apr 10 06:31:53 PDT 2014


 soltools/cpp/_getopt.c |    2 ++
 soltools/cpp/_getopt.h |   29 +++++++++++++++++++++++++++++
 soltools/cpp/_unix.c   |    4 +---
 3 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit 691a54ccdf89489b64ea9dfffd07b824b2f1a964
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 10 15:31:22 2014 +0200

    Clean up function declaration
    
    Change-Id: I92c54f61fe8608d788cc236956f4a5a58e20a7df

diff --git a/soltools/cpp/_getopt.c b/soltools/cpp/_getopt.c
index cbbfc82..82506fa 100644
--- a/soltools/cpp/_getopt.c
+++ b/soltools/cpp/_getopt.c
@@ -20,6 +20,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <_getopt.h>
+
 #define EPR                 fprintf(stderr,
 #define ERR(str, chr)       if(opterr) { EPR "%s%c\n", str, chr); }
 
diff --git a/soltools/cpp/_getopt.h b/soltools/cpp/_getopt.h
new file mode 100644
index 0000000..8a8fccd
--- /dev/null
+++ b/soltools/cpp/_getopt.h
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SOLTOOLS_CPP_GETOPT_H
+#define INCLUDED_SOLTOOLS_CPP_GETOPT_H
+
+int stgetopt(int, char *const *, const char *);
+extern char *optarg;
+extern int optind;
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c
index e5f9eab..d1cd208 100644
--- a/soltools/cpp/_unix.c
+++ b/soltools/cpp/_unix.c
@@ -32,9 +32,7 @@
 #include "cpp.h"
 
 #if defined MACOSX || defined AIX || defined WNT
-extern int stgetopt(int, char *const *, const char *);
-extern char *optarg;
-extern int optind;
+#include <_getopt.h>
 #else
 #include <getopt.h>
 #endif


More information about the Libreoffice-commits mailing list