gnu

Working with GNU regex functions in C or C++

Can anyone give me complete example program how to work with GNU regex functions in gcc C or C++ (http://docs.freebsd.org/info/regex/regex.info.GNU_Regex_Functions.html), with re_pattern_buffer, re_compile_fastmap? For example, translate this small Python program: import re unlucky = re.compile('1\d*?3') nums = ("13", "31", "777", "1...

Are there any good tools for examining Makefiles?

Large complex make files can be daunting to read and examine. What tools are good for visualizing or otherwise examining a gnu make file? ...

Microsof Assembler to GNU Assembler conversion

I have an ARM assembly code that compiles well with Visual Studio. I would like to now use the same ARM assembly code and compile it with GNU Assembler. As you know the syntax of both assemblers are different. I was wondering if there is any tool that can convert from these Assembly syntaxes. ...

Android - NDK - GNU make problems

I'm new to the NDK. (using Windows) I have downloaded cygwin and the NDK. I have unzipped the NDK in C:\ When I run cygwin I change to the NDK directory and I run the command build/host-setup.sh But I get Error: could not find a valid GNU Make executable. I have downloaded GNU make 3.81 but still no luck, What do I have to do with ...

oracle's pro*C compiler and gnu C (__builtin_va_list, __attribute__, etc)

I'm compiling a database library with pro*C which converts the .ppc library file to a .c file that gcc can use. However, I'm getting a lot of errors in pro*C like the following PCC-S-02201, Encountered the symbol "__ attribute__ " when expecting one of the following ... , Encountered the symbol "__builtin_va_list" wh...

C: Running Unix configure file in Windows

I would like to port a few applications that I use on Linux to Windows. In particular I have been working on wdiff. A program that compares the differences word by word of two files. Currently I have been able to successfully compile the program on windows through Cygwin. However, I would like to run the program natively on Windows simi...

GLOB_BRACE portability?

In this question, I was made aware of glob()'s GLOB_BRACE option that allows for a limited set of regular expressions when searching for files. This looks just like what I need, but according to the manual, GLOB_BRACE is "not available on some Non-GNU Operating systems." Among those seems to be Solaris. I am building an application th...

Linking the Linker script file to source code

Hello , I am new to GNU compiler. I have a C source code file which contains some structures and variables in which I need to place certain variables at a particular locations. So, I have written a linker script file and used the __ attribute__("SECTION") at variable declaration, in C source code. I am using a GNU compiler (cygwi...

GNU make copy files to distro directory

I keep my source html (and images etc.) in separate directories for source control. Part of making the distro is to have make copy files to output folder and set the attributes. Today my makefile shows (extract): %.html: /usr/bin/install -c -p -m 644 $< $@ www: $(HTMLDST)/firmware.html $(HTMLDST)/firmware_status.html $(HTMLDST)/i...

Why it's can be compiled in GNU/C++, can't compiled in VC++2010 RTM?

#include <stdlib.h> #include <iostream> #include <memory> #include "copy_of_auto_ptr.h" #ifdef _MSC_VER #pragma message("#include <string>") #include <string> // http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas #endif /* case 1-4 is the requirement of the auto_ptr. which form http://ptgmedia.pearsoncmg.com/...

Legality Of Re-Implementing An Existing API (e.g. GNU implementing the UNIX APIs)

I've often wondered about this. I'm not looking for legal advice, just casual opinions ;) If some company publishes an API on the web for their closed-source library, would it be legal for another party to release an open-source implementation of that API? Are function declarations considered source code? Take GNU implementing the UNIX...

Memory section handling error

I'm getting a link time error: WARNING: /home/gulevich/development/camac-fedorov/camac/linux/k0607-lsi6/camac-k0607-lsi6.o (.ctors): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. The code causing the error (assemb...

How do you define the options you see in ./configure --help?

I'm currently trying to set up a package to be installed with autotools. In most, if not all, major software packages, configure --help lists a large number of options like ./configure --ENABLE-FLOAT, etc. I was wondering where I can define these options. Thanks, Sam ...

What's the output object file format of GNU assembler as?

I have checked the assembler options of GNU assembler as and I didn't find an option to specify the output object file format. If I am using the following command as -o foobar.o foobar.s What object file format will I get? The as manual says that "The GNU as can be configured to produce several alternative object file formats." But h...

Strange behavior of std::cout &operator<<...

Hey ppl, I came across something weird today, and I was wondering if any of you here could explain what's happening... Here's a sample: #include <iostream> #include <cassert> using namespace std; #define REQUIRE_STRING(s) assert(s != 0) #define REQUIRE_STRING_LEN(s, n) assert(s != 0 || n == 0) class String { public: ...

How can you determine installed versions of the glibc (etc.) libraries?

I'm working with an embedded Linux deployment and am using a cross compiler tool chain that doesn't compile I2C library function calls. How do I determine the precise versions of the libraries on the system so that I may rebuild the tool chain? I don't intend to replace the libraries deployed, as I do know they work (including I2C), s...

GNU Makefile book

Any books you would recommend to learn scripting makefiles? I know gnu.org has manual, but hope there is a book with better explanations and examples. ...

Working with timezones in C

Hi, I'm currently migrating some of my code from Cocoa (Apple's Objective-C API) to C, in order to make it available for other operating systems, such as GNU/Linux. In Cocoa, there were many great things like creating NSTimeZone objects from their string descriptors using timeZoneWithAbbreviation:. This allowed me to use values like "E...

How to deal with source code file auto-generated in the build process

Hi all, Please help I'm trying to build a third party library which uses auto-generated source code files. In normal case, this kind of files is generated by gnu build tools. My question is How can I tell the Android NDK build tools to generate and build this kind of files. Thanks in advance ...

GNU GPL - access to data?

Hi, I realise that modified versions of the software should be freely available, but what about the content that is held within a mysql database for instance? does that have to be available too? Cheers ke ...